Uranium
Application Framework
UM.Math.AxisAlignedBox.AxisAlignedBox Class Reference

Axis aligned bounding box. More...

Public Member Functions

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

Static Public Attributes

 Null = None
 

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()

def 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: