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

#import <CC3Camera.h>

Inheritance diagram for CC3Frustum:
Inheritance graph
[legend]

Instance Methods

(void) - __deprecated
 
(BOOL) - doesIntersectPointAt:
 
(BOOL) - doesIntersectSphereAt:withRadius:
 
(void) - populateFrom:andAspect:andNearClip:andFarClip:
 
(void) - populateRight:andTop:andNear:andFar:
 
- Instance Methods inherited from CC3BoundingVolume
(BOOL) - doesIntersect:
 
(BOOL) - doesIntersectConvexHullOf:planes:
 
(BOOL) - doesIntersectConvexHullOf:planes:from:
 
(BOOL) - doesIntersectLocation:
 
(BOOL) - doesIntersectRay:
 
(BOOL) - doesIntersectSphere:
 
(BOOL) - doesIntersectSphere:from:
 
(NSString *) - fullDescription
 
(CC3Vector- globalLocationOfGlobalRayIntesection:
 
(BOOL) - isInFrontOfPlane:
 
(void) - markDirty
 
(void) - populateFrom:
 

Class Methods

(id) + frustum
 
- Class Methods inherited from CC3BoundingVolume
(id) + boundingVolume
 

Properties

CC3Matrix *viewMatrix __deprecated
 
CC3Matrix *modelviewMatrix __deprecated
 
GLfloat bottom
 
CC3Plane bottomPlane
 
CC3Cameracamera
 
GLfloat far
 
CC3Vector farBottomLeft
 
CC3Vector farBottomRight
 
CC3Plane farPlane
 
CC3Vector farTopLeft
 
CC3Vector farTopRight
 
CC3MatrixfiniteProjectionMatrix
 
CC3MatrixinfiniteProjectionMatrix
 
BOOL isUsingParallelProjection
 
GLfloat left
 
CC3Plane leftPlane
 
GLfloat near
 
CC3Vector nearBottomLeft
 
CC3Vector nearBottomRight
 
CC3Plane nearPlane
 
CC3Vector nearTopLeft
 
CC3Vector nearTopRight
 
GLfloat right
 
CC3Plane rightPlane
 
GLfloat top
 
CC3Plane topPlane
 
- Properties inherited from CC3BoundingVolume
BOOL isDirty
 
GLuint planeCount
 
CC3Planeplanes
 
BOOL shouldIgnoreRayIntersection
 
BOOL shouldLogIntersectionMisses
 
BOOL shouldLogIntersections
 
GLuint vertexCount
 
CC3Vectorvertices
 

Detailed Description

Represents a camera's frustum.

Each CC3Camera instance contains an instance of this class.

Each frustum has four sides: top, bottom, left and right, and has two caps: near and far. These sides and caps are represented as six planes.

The frustum is a truncated pyramid that has the location of the camera as the pyrimid apex. This frustum manages and populates the projection matrix used by the camera, and builds its planes from a combination of that projection matrix and the camera's modelview matrix.

The frustum is a type of bounding volume and therefore supports methods for testing whether locations, rays, shapes, and other bounding volumes intersect the volume of the frustum.

Method Documentation

- (void) __deprecated
Deprecated:
Renamed to markDirty.
- (BOOL) doesIntersectPointAt: (CC3Vector __deprecated
Deprecated:
Renamed to doesIntersectLocation:.
- (BOOL) doesIntersectSphereAt: (CC3Vector aLocation
withRadius: (GLfloat)  __deprecated 
Deprecated:
Renamed to doesIntersectLocation:.
+ (id) frustum

Allocates and initializes an autoreleased instance.

- (void) populateFrom: (GLfloat)  fieldOfView
andAspect: (GLfloat)  aspect
andNearClip: (GLfloat)  nearClip
andFarClip: (GLfloat)  __deprecated 
Deprecated:
Use populateRight:andTop:andNear:andFar: instead.

Sets the six frustum clipping planes and the projectionMatrix from the specified view parameters.

The aspect parameter indicates the width/height ratio of the viewport. The field of view angle is applied to the narrower dimension, to ensure that overall perspective are consistent across a simple transposition of the viewport dimensions (ie- a rotation of the viewport by 90 degrees).

- (void) populateRight: (GLfloat)  right
andTop: (GLfloat)  top
andNear: (GLfloat)  near
andFar: (GLfloat)  far 

Sets the six frustum clipping planes and the projectionMatrix from the specified measurements.

The left and bottom measurements are set to the negated right and top measurements, respectively.

Property Documentation

- (CC3Matrix* viewMatrix) __deprecated
readnonatomicstrong
Deprecated:
Use the same property on the camera instead.
- (CC3Matrix* modelviewMatrix) __deprecated
readnonatomicstrong
Deprecated:
Renamed to viewMatrix for a more accurate semantic.
- (GLfloat) bottom
readnonatomicassign

The distance from view center to the bottom of this frustum at the near clipping plane.

- (CC3Plane) bottomPlane
readnonatomicassign

The clip plane at the bottom of this frustum, in global coordinates.

- (CC3Camera*) camera
readwritenonatomicassign

The camera whose frustum this is.

This link-back property is set automatically when this frustum is set into the frustum property of the camera. Usually the application should never set this property directly.

This is a weak reference to avoid a retain cycle between the camera and the frustum.

- (GLfloat) far
readnonatomicassign

The distance to the far end of this frustum.

- (CC3Vector) farBottomLeft
readnonatomicassign

Returns the location of the far bottom left corner of this frustum, in the global coordinate system.

- (CC3Vector) farBottomRight
readnonatomicassign

Returns the location of the far bottom right corner of this frustum, in the global coordinate system.

- (CC3Plane) farPlane
readnonatomicassign

The clip plane at the far end of this frustum, in global coordinates.

- (CC3Vector) farTopLeft
readnonatomicassign

Returns the location of the far top left corner of this frustum, in the global coordinate system.

- (CC3Vector) farTopRight
readnonatomicassign

Returns the location of the far top right corner of this frustum, in the global coordinate system.

- (CC3Matrix*) finiteProjectionMatrix
readnonatomicstrong

A finite projection matrix with the far end at the distance given by the far property.

- (CC3Matrix*) infiniteProjectionMatrix
readnonatomicstrong

An infinite projection matrix with the far end at infinity.

- (BOOL) isUsingParallelProjection
readwritenonatomicassign

Indicates whether this frustum uses parallel projection.

If this value is set to NO, the projection matrix will be configured for perspective projection, which is typical for 3D scenes. If this value is set to YES, the projection matrix will be configured for orthographic projection.

The initial value of this property is NO, indicating that perspective projection will be used.

- (GLfloat) left
readnonatomicassign

The distance from view center to the left edge of this frustum at the near clipping plane.

- (CC3Plane) leftPlane
readnonatomicassign

The clip plane at the left side of this frustum, in global coordinates.

- (GLfloat) near
readnonatomicassign

The distance to the near end of this frustum.

- (CC3Vector) nearBottomLeft
readnonatomicassign

Returns the location of the near bottom left corner of this frustum, in the global coordinate system.

- (CC3Vector) nearBottomRight
readnonatomicassign

Returns the location of the near bottom right corner of this frustum, in the global coordinate system.

- (CC3Plane) nearPlane
readnonatomicassign

The clip plane at the near end of this frustum, in global coordinates.

- (CC3Vector) nearTopLeft
readnonatomicassign

Returns the location of the near top left corner of this frustum, in the global coordinate system.

- (CC3Vector) nearTopRight
readnonatomicassign

Returns the location of the near top right corner of this frustum, in the global coordinate system.

- (GLfloat) right
readnonatomicassign

The distance from view center to the right edge of this frustum at the near clipping plane.

- (CC3Plane) rightPlane
readnonatomicassign

The clip plane at the right side of this frustum, in global coordinates.

- (GLfloat) top
readnonatomicassign

The distance from view center to the top of this frustum at the near clipping plane.

- (CC3Plane) topPlane
readnonatomicassign

The clip plane at the top of this frustum, in global coordinates.


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