Represents a 2D axis-aligned bounding-box.
Property | Description |
---|---|
center | Get the center of the PhysicsAABB. |
extents | Get the extents (half size) of the PhysicsAABB. |
isValid | Check if the AABB is valid. To be valid, PhysicsAABB.upperBound should be equal to or above PhysicsAABB.lowerBound. |
lowerBound | The lower-left bounding vertex. This should be equal to or lower than PhysicsAABB.upperBound. |
perimeter | Get the surface area (perimeter length) of the PhysicsAABB. |
upperBound | The upper-right bounding vertex. This should be equal to or above PhysicsAABB.lowerBound. |
Constructor | Description |
---|---|
PhysicsAABB | Create an axis-aligned bounding-box with the specified bounds. |
Method | Description |
---|---|
CastRay | Perform a raycast against this PhysicsAABB. Nothing will be detected if the ray starts inside the PhysicsAABB. |
Contains | Checks if the PhysicsAABB contains (completely encapsulates) the specified PhysicsAABB. |
Normalized | Normalize the PhysicsAABB ensuring that PhysicsAABB.lowerBound is lower than or equal to PhysicsAABB.upperBound. |
Overlap | Check if the specified PhysicsAABB overlaps this PhysicsAABB. |
OverlapPoint | Perform a point overlap against this PhysicsAABB. |
Union | Create a union of the the specified PhysicsAABB and this PhysicsAABB where resulting PhysicsAABB completely encapsules both PhysicsAABB. |