v2.0.2
Instance Methods | Properties | List of all members
CC3NodeTighteningBoundingVolumeSequence Class Reference

#import <CC3BoundingVolumes.h>

Inheritance diagram for CC3NodeTighteningBoundingVolumeSequence:
Inheritance graph
[legend]

Instance Methods

(void) - addBoundingVolume:
 
(BOOL) - doesIntersect:
 
(BOOL) - doesIntersectConvexHullOf:planes:from:
 
(BOOL) - doesIntersectLocation:
 
(BOOL) - doesIntersectRay:
 
(BOOL) - doesIntersectSphere:from:
 
(BOOL) - isInFrontOfPlane:
 
- Instance Methods inherited from CC3NodeBoundingVolume
(CCColorRef- displayNodeColor
 
(CCOpacity- displayNodeOpacity
 
(BOOL) - doesIntersectFrustum:
 
(CC3Vector- locationOfRayIntesection:
 
(void) - markTransformDirty
 
(void) - scaleBy:
 
- Instance Methods inherited from CC3BoundingVolume
(BOOL) - doesIntersectConvexHullOf:planes:
 
(BOOL) - doesIntersectSphere:
 
(NSString *) - fullDescription
 
(CC3Vector- globalLocationOfGlobalRayIntesection:
 
(void) - markDirty
 
(void) - populateFrom:
 

Properties

NSArray * boundingVolumes
 
- Properties inherited from CC3NodeBoundingVolume
CC3Vector centerOfGeometry
 
CC3Vector globalCenterOfGeometry
 
BOOL isTransformDirty
 
CC3Nodenode
 
BOOL shouldBuildFromMesh
 
BOOL shouldDraw
 
BOOL shouldMaximize
 
- Properties inherited from CC3BoundingVolume
BOOL isDirty
 
GLuint planeCount
 
CC3Planeplanes
 
BOOL shouldIgnoreRayIntersection
 
BOOL shouldLogIntersectionMisses
 
BOOL shouldLogIntersections
 
GLuint vertexCount
 
CC3Vectorvertices
 

Additional Inherited Members

- Class Methods inherited from CC3BoundingVolume
(id) + boundingVolume
 

Detailed Description

A composite bounding volume that contains other bounding volumes.

This class tests whether this bounding volume intesects another bounding volume by testing that bounding volume against each of the contained bounding volumes in turn, in the order that the contained bounding volumes were added to this bounding volume.

This class indicates that the other bounding volume being tested is outside this bounding volume as soon as one of the contained bounding volumes indicates as much. Otherwise, if a contained bounding volume indicates an intersection has occurred, the other bounding volume being tested is tested against the next contained bounding volume, and so on.

The contained bounding volumes should be added in increasing order of computational complexity (but presumably lower accuracy), allowing a rapid rejection during testing against other bounding volumes, of those that are easily determined to be well outside this bounding volume, and only proceeding to the more intensive (but presumably more accurate) tests, if an early rejection cannot be determined.

For example, a typical bounding volume sequence might be to first test against a simple, but crude, spherical bounding volume, followed by a rectangular bounding-box bounding volume, or even a full mesh-based bounding volume.

Method Documentation

- (void) addBoundingVolume: (CC3NodeBoundingVolume *)  aBoundingVolume

Adds the specified bounding volume to the end of the array of contained bounding volumes.

- (BOOL) doesIntersect: (CC3BoundingVolume *)  aBoundingVolume

Returns whether this bounding volume intersects the specfied other bounding volume.

This implementation delegates to the contained bounding volumes in the order in which they were added to this sequence, and returns NO as soon as one of the contained bounding volumes returns NO.

The contained bounding volumes should be added in increasing order of computational complexity (but presumably lower accuracy), allowing a rapid rejection during testing against other bounding volumes, of those that are easily determined to be well outside this bounding volume, and only proceeding to the more intensive (but presumably more accurate) tests, if an early rejection cannot be determined.

Implements CC3BoundingVolume.

- (BOOL) doesIntersectConvexHullOf: (GLuint)  numOtherPlanes
planes: (CC3Plane *)  otherPlanes
from: (CC3BoundingVolume *)  otherBoundingVolume 

Returns whether a convex hull composed of the specified global planes intersects this bounding volume.

The planes may be the face planes of a mesh, or they may be the sides of an oriented bounding box (OBB), or frustum, etc.

This implementation delegates to the contained bounding volumes in the order in which they were added to this sequence, and returns NO as soon as one of the contained bounding volumes returns NO.

The contained bounding volumes should be added in increasing order of computational complexity (but presumably lower accuracy), allowing a rapid rejection during testing, of convex hulls that are easily determined to be well outside this bounding volume, and only proceeding to the more intensive (but presumably more accurate) tests, if an early rejection cannot be determined.

Implements CC3BoundingVolume.

- (BOOL) doesIntersectLocation: (CC3Vector aLocation

Returns whether the specified global location intersects (is inside) this bounding volume.

This implementation delegates to the contained bounding volumes in the order in which they were added to this sequence, and returns NO as soon as one of the contained bounding volumes returns NO.

The contained bounding volumes should be added in increasing order of computational complexity (but presumably lower accuracy), allowing a rapid rejection during testing, of locations that are easily determined to be well outside this bounding volume, and only proceeding to the more intensive (but presumably more accurate) tests, if an early rejection cannot be determined.

Implements CC3BoundingVolume.

- (BOOL) doesIntersectRay: (CC3Ray aRay

Returns whether the specified global-coordinate ray intersects this bounding volume.

This implementation delegates to the contained bounding volumes in the order in which they were added to this sequence, and returns NO as soon as one of the contained bounding volumes returns NO.

The contained bounding volumes should be added in increasing order of computational complexity (but presumably lower accuracy), allowing a rapid rejection during testing, of rays that are easily determined to be well outside this bounding volume, and only proceeding to the more intensive (but presumably more accurate) tests, if an early rejection cannot be determined.

The operation of this method is affected by the shouldIgnoreRayIntersection property. If that property is set to YES, this method will always return NO. See the notes of the shouldIgnoreRayIntersection property for more info.

Implements CC3BoundingVolume.

- (BOOL) doesIntersectSphere: (CC3Sphere aSphere
from: (CC3BoundingVolume *)  otherBoundingVolume 

Returns whether the specified sphere intersects this bounding volume.

This implementation delegates to the contained bounding volumes in the order in which they were added to this sequence, and returns NO as soon as one of the contained bounding volumes returns NO.

The contained bounding volumes should be added in increasing order of computational complexity (but presumably lower accuracy), allowing a rapid rejection during testing, of spheres that are easily determined to be well outside this bounding volume, and only proceeding to the more intensive (but presumably more accurate) tests, if an early rejection cannot be determined.

Implements CC3BoundingVolume.

- (BOOL) isInFrontOfPlane: (CC3Plane aPlane

Returns whether this bounding volume lies completely outside the specified normalized global coordinate plane.

This method returns YES if the bounding volume lies completely on the side of the plane from which the plane normal points. It returns NO if this bounding volume intersects the plane or lies completely on the opposite side of the plane.

This implementation delegates to the contained bounding volumes in the order in which they were added to this sequence, and returns YES as soon as one of the contained bounding volumes returns YES.

The contained bounding volumes should be added in increasing order of computational complexity (but presumably lower accuracy), allowing a rapid rejection during testing, of rays that are easily determined to be well outside this bounding volume, and only proceeding to the more intensive (but presumably more accurate) tests, if an early rejection cannot be determined.

Implements CC3BoundingVolume.

Property Documentation

- (NSArray*) boundingVolumes
readnonatomicretain

The array of contained bounding volumes.

When testing for instersection, the contained bounding volumes will be traversed in the order they appear in this array.


The documentation for this class was generated from the following file: