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.

Properties

boxBoundingVolume

The box bounding volume that is tested only if the test against the spherical bounding volume passes.

@property (nonatomic, retain, readonly) CC3NodeBoxBoundingVolume *boxBoundingVolume

Declared In

CC3BoundingVolumes.h

sphericalBoundingVolume

The spherical bounding volume that is tested first.

@property (nonatomic, retain, readonly) CC3NodeSphericalBoundingVolume *sphericalBoundingVolume

Declared In

CC3BoundingVolumes.h

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

boundingVolumeWithSphereVolume:andBoxVolume:

Allocates and returns an autoreleased instance containing the specified bounding volumes.

+ (id)boundingVolumeWithSphereVolume:(CC3NodeSphericalBoundingVolume *)sphereBV andBoxVolume:(CC3NodeBoxBoundingVolume *)boxBV

Declared In

CC3BoundingVolumes.h

vertexLocationsSphereandBoxBoundingVolume

@deprecated Use boundingVolume instead.

+ (id)vertexLocationsSphereandBoxBoundingVolume

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

initWithSphereVolume:andBoxVolume:

Initializes this instance containing the specified bounding volumes.

- (id)initWithSphereVolume:(CC3NodeSphericalBoundingVolume *)sphereBV andBoxVolume:(CC3NodeBoxBoundingVolume *)boxBV

Declared In

CC3BoundingVolumes.h