CC3NodeSphereThenBoxBoundingVolume Class Reference
Inherits from | CC3NodeBoundingVolume : CC3BoundingVolume : NSObject |
Declared in | CC3BoundingVolumes.h |
Overview
CC3NodeSphereThenBoxBoundingVolume is a CC3NodeBoundingVolume that contains a CC3NodeSphericalBoundingVolume and a CC3NodeBoxBoundingVolume. The effective spacial volume defined by this bounding volume is the intersection space of the spherical and box volumes. Therefore, a point must lie within BOTH the sphere and the box to be considered contained within this bounding volume.
The spherical bounding volume is tested first, and if it passes, the bounding box volume is tested next. This combination benefits from the fast testing capabilities of the spherical bounding volume to reject obvious intersection failures, and from the bounding box’s more accurate volume coverage on most meshes.
Tasks
-
sphericalBoundingVolume
property -
boxBoundingVolume
property -
+ boundingVolume
-
– initWithSphereVolume:andBoxVolume:
-
+ boundingVolumeWithSphereVolume:andBoxVolume:
-
– initFromSphere:andBox:
-
+ boundingVolumeFromSphere:andBox:
-
– initByCircumscribingBox:
-
+ boundingVolumeCircumscribingBox:
-
+ vertexLocationsSphereandBoxBoundingVolume
Properties
Class Methods
boundingVolume
Allocates and initializes an autoreleased instance containing a standard CC3NodeSphericalBoundingVolume and a standard CC3NodeBoxBoundingVolume.
+ (id)boundingVolume
Declared In
CC3BoundingVolumes.h
boundingVolumeCircumscribingBox:
Allocates and returns an autoreleased instance containing spherical and box bounding volumes created from the specified box. The spherical bounding volume is created by circumscribing the box.
+ (id)boundingVolumeCircumscribingBox:(CC3Box)box
Declared In
CC3BoundingVolumes.h
boundingVolumeFromSphere:andBox:
Initializes this instance containing spherical and box bounding volumes created from the specified sphere and box, respectively.
+ (id)boundingVolumeFromSphere:(CC3Sphere)sphere andBox:(CC3Box)box
Discussion
The sphere and box dimensions are specified in the coordinate system of the node. The resulting bounding volume is fixed to the sizes provided, and will not take into consideration the vertices of the mesh. It will, however, transform along with the node, as the node is transformed.
Declared In
CC3BoundingVolumes.h
Instance Methods
initByCircumscribingBox:
Initializes this instance containing spherical and box bounding volumes created from the specified box. The spherical bounding volume is created by circumscribing the box.
- (id)initByCircumscribingBox:(CC3Box)box
Declared In
CC3BoundingVolumes.h
initFromSphere:andBox:
Allocates and returns an autoreleased instance containing spherical and box bounding volumes created from the specified sphere and box, respectively.
- (id)initFromSphere:(CC3Sphere)sphere andBox:(CC3Box)box
Discussion
The sphere and box dimensions are specified in the coordinate system of the node. The resulting bounding volume is fixed to the sizes provided, and will not take into consideration the vertices of the mesh. It will, however, transform along with the node, as the node is transformed.
Declared In
CC3BoundingVolumes.h