Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Math.AxisAlignedBox.AxisAlignedBox Class Reference

Public Member Functions

None __init__ (self, Vector minimum=Vector.Null, Vector maximum=Vector.Null)
 
"AxisAlignedBox" set (self, Optional[Vector] minimum=None, Optional[Vector] maximum=None, Optional[float] left=None, Optional[float] right=None, Optional[float] top=None, Optional[float] bottom=None, Optional[float] front=None, Optional[float] back=None)
 
"AxisAlignedBox" __add__ (self, object other)
 
"AxisAlignedBox" __iadd__ (self, object other)
 
float width (self)
 
float height (self)
 
float depth (self)
 
Vector center (self)
 
float left (self)
 
float right (self)
 
float bottom (self)
 
float top (self)
 
float back (self)
 
float front (self)
 
Vector minimum (self)
 
Vector maximum (self)
 
Tuple[Vector, Vector, Vector, Vector, Vector, Vector, Vector, Vectorpoints (self)
 
bool isValid (self)
 
Union[Tuple[float, float], bool] intersectsRay (self, Ray ray)
 
int intersectsBox (self, "AxisAlignedBox" box)
 
str __repr__ (self)
 

Static Public Attributes

 Null = None
 

Protected Attributes

 _min
 
 _max
 

Detailed Description

Axis aligned bounding box.

Member Function Documentation

◆ intersectsBox()

int UM.Math.AxisAlignedBox.AxisAlignedBox.intersectsBox ( self,
"AxisAlignedBox" box )
Check to see if this box intersects another box.

:param box: The box to check for intersection.
:return: NoIntersection when no intersection occurs, PartialIntersection when partially intersected, FullIntersection when box is fully contained inside this box.

◆ intersectsRay()

Union[Tuple[float, float], bool] UM.Math.AxisAlignedBox.AxisAlignedBox.intersectsRay ( self,
Ray ray )
Intersect the bounding box with a ray
:sa Ray

◆ isValid()

bool UM.Math.AxisAlignedBox.AxisAlignedBox.isValid ( self)
Check if the bounding box is valid.
Uses fuzzycompare to validate.
:sa Float::fuzzyCompare()

◆ points()

Tuple[Vector, Vector, Vector, Vector, Vector, Vector, Vector, Vector] UM.Math.AxisAlignedBox.AxisAlignedBox.points ( self)
Get the 8 points of the bounding box.
:return: A tuple of 8 points.

The documentation for this class was generated from the following file: