A bounding volume that forms an axially-aligned-bounding-box (AABB) around the node. More...
#import <CC3BoundingVolumes.h>
Properties | |
CC3BoundingBox | boundingBox |
CC3Vector * | globalBoundingBoxVertices |
This class indicates that the node is inside the frustum unless all eight vertices of the transformed bounding box lie outside each of the frustum planes. This is much more computationally intenstive than a spherical bounding volume, but for many shapes, particularly those that are rectangular, provides a tighter bounding volume and therefore results in lower false-positives, where the bounding volume intersects the frustum, but the object shape actually does not, resulting in potentially significant unnecessary drawing activity.
The local bounding box must cover the node, and is translated, rotated, and scaled automatically to match the transformation of the node. For meshes, the local bounding box is calculated from the vertex locations. For other nodes, the local bounding box can be set directly within the bounding volume via the boundingBox property.
- (CC3BoundingBox) boundingBox [read, write, assign] |
The axially-aligned-bounding-box (AABB) in the node's local coordinate system.
- (CC3Vector*) globalBoundingBoxVertices [read, assign] |
An array of the eight vertices of the bounding box in the global coordinate system, after the bounding box has been transformed (translated, rotated and scaled) to match the transformation of the node.
For a node to be definitively outside the frustum, all eight vertices of the global bounding box must be outside each of the planes of the frustum.