Inherits ScriptObject.
Public Member Functions | |
BoundingBox () | |
BoundingBox (Vector a, Vector b) | |
expandTo (Vector point) | |
expandToBox (BoundingBox box) | |
VectorPair | getRayIntersection (Vector origin, Vector direction, Vector expansion=Vector()) |
Public Attributes | |
Vector | lower |
Vector | upper |
3D bounding box specified by the lower and upper corners.
BoundingBox | ( | ) |
Initializes the bounding box and (0, 0, 0) -> (0, 0, 0).
BoundingBox | ( | Vector | a, |
Vector | b | ||
) |
Initializes the bounding box for the specified corners.
a | Corner of box. |
b | Corner of box. |
expandTo | ( | Vector | point | ) |
Expands the bounding box to include the specified position.
expandToBox | ( | BoundingBox | box | ) |
Expands the bounding box to include the specified bounding box.
VectorPair getRayIntersection | ( | Vector | origin, |
Vector | direction, | ||
Vector | expansion = Vector() |
||
) |
Gets intersection between the bounding box and a ray.
origin | Origin point of the ray. |
direction | Direction vector of the ray. Should be non-zero. |
expansion | Additional thickness added to the bounding box. Should be non-negative. |
Vector lower |
The lower corner.
Vector upper |
The upper corner.