AABB¶
-
class
gimpact.
AABB
¶ Bases:
object
Represents an axis-aligned bounding boxes (AABB). If the AABB is returned by an AABBSet, the AABB still “belongs to” to that AABBSet, so modifying it will alter the AABBSet; make a copy of it if you wish to modify it seperately.
Parameters: - min_x (float) – minimum of x axis
- max_x (float) – maximum of x axis
- min_y (float) – minimum of y axis
- max_y (float) – maximum of y axis
- min_z (float) – minimum of z axis
- max_z (float) – maximum of z axis
-
bounds
¶ Gets and Sets Bounds of the AABB as a tuple (min_x, max_x, min_y, max_y, min_z, max_z)
-
intersection
()¶ Finds intersection between the AABB and a given AABB. The resulting intersection will an invalid bounding box (i.e minimum will be greater than maximum in the non-overlapping axis) if both boxes do not intersect.
Parameters: aabb (AABB) – bounding box Returns: intersection of boxes Return type: AABB
-
intersects
()¶ Checks if the AABB intersects with a given AABB.
Parameters: aabb (AABB) – bounding box Returns: flag indicating if the boxes intersect Return type: bool
-
max_x
¶ Gets and Sets maximum x-axis value of the AABB
-
max_y
¶ Gets and Sets maximum y-axis value of the AABB
-
max_z
¶ Gets and Sets maximum z-axis value of the AABB
-
min_x
¶ Gets and Sets minimum x-axis value of the AABB
-
min_y
¶ Gets and Sets minimum x-axis value of the AABB
-
min_z
¶ Gets and Sets minimum z-axis value of the AABB