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

Axis aligned bounding box. More...

Public Member Functions

 __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)
 
 __add__ (self, other)
 
 __iadd__ (self, other)
 
 width (self)
 
 height (self)
 
 depth (self)
 
 center (self)
 
 left (self)
 
 right (self)
 
 bottom (self)
 
 top (self)
 
 back (self)
 
 front (self)
 
 minimum (self)
 
 maximum (self)
 
bool isValid (self)
 Check if the bounding box is valid.
 
 intersectsRay (self, ray)
 Intersect the bounding box with a ray.
 
int intersectsBox (self, "AxisAlignedBox" box)
 Check to see if this box intersects another box.
 
 __repr__ (self)
 private:
 

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.

Parameters
boxAxisAlignedBox The box to check for intersection.
Returns
IntersectionResult NoIntersection when no intersection occurs, PartialIntersection when partially intersected, FullIntersection when box is fully contained inside this box.

◆ intersectsRay()

UM.Math.AxisAlignedBox.AxisAlignedBox.intersectsRay (   self,
  ray 
)

Intersect the bounding box with a ray.

Parameters
rayRay
See also
Ray

◆ isValid()

bool UM.Math.AxisAlignedBox.AxisAlignedBox.isValid (   self)

Check if the bounding box is valid.

Uses fuzzycompare to validate.

See also
Float::fuzzyCompare()

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