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()) |
Static Public Member Functions | |
| static Integer | compare (BoundingBox box1, BoundingBox box2, Number tolerance) |
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. |
|
static |
Compares two bounding boxes.
| box1 | First box to compare. |
| box2 | Second box to compare. |
| tolerance | An optional comparison tolerance/accuracy. If 'tolerance' is greater than or equal to 1 then 'tolerance' specifies the number of digits to the right of the decimal to truncate the bounding box coordinates to prior to comparison. |
| 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.