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

#import <CC3BoundingVolumes.h>

Inheritance diagram for CC3NodeCenterOfGeometryBoundingVolume:
Inheritance graph
[legend]

Instance Methods

(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:
 

Additional Inherited Members

- Class Methods inherited from CC3BoundingVolume
(id) + boundingVolume
 
- Properties inherited from CC3NodeBoundingVolume
CC3Vector centerOfGeometry
 
CC3Vector globalCenterOfGeometry
 
BOOL isTransformDirty
 
CC3Nodenode
 
BOOL shouldBuildFromMesh
 
BOOL shouldDraw
 
BOOL shouldMaximize
 

Detailed Description

CC3NodeCenterOfGeometryBoundingVolume is simply a single point at the node's center of geometry.

When applied to a node, it indicates that the node intersects another bounding volume if the node's center of geometry is within that bounding volume.

For meshes, the center of geometry is calculated from the vertex locations, via specialized subclasses of CC3NodeBoundingVolume. For other nodes, it can be set directly within the bounding volume via the centerOfGeometry property.

Method Documentation

- (BOOL) doesIntersect: (CC3BoundingVolume *)  aBoundingVolume

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

This implementation tests whether the globalCenterOfGeometry of this bounding volume is inside the other bounding volume, by double-dispatching to the doesIntersectLocation: method of the other bounding volume, passing this bounding volume's globalCenterOfGeometry as the location to test.

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.

Returns whether the globalCenterOfGeometry of this bounding volume is inside the convex hull defined by the specified planes. To be so, the globalCenterOfGeometry must be behind every one of the specified planes.

This implementation ignores the otherBoundingVolume argument.

Implements CC3BoundingVolume.

- (BOOL) doesIntersectLocation: (CC3Vector aLocation

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

Returns whether the specified location is the same as the globalCenterOfGeometry of this bounding volume.

Implements CC3BoundingVolume.

- (BOOL) doesIntersectRay: (CC3Ray aRay

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

Returns whether the globalCenterOfGeometry of this bounding volume lies on the specified ray.

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 global-coordinate sphere intersects this bounding volume.

Returns whether the globalCenterOfGeometry of this bounding volume lies within specified sphere.

This implementation ignores the otherBoundingVolume argument.

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.

Returns whether the globalCenterOfGeometry of this bounding volume is on the side of the plane from which the normal points.

Implements CC3BoundingVolume.


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