Inherits from CC3BoundingVolume : NSObject
Declared in CC3Camera.h

Overview

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.

Properties

__deprecated

@deprecated Use the same property on the camera instead.

@property (nonatomic, strong, readonly) CC3Matrix *__deprecated

Declared In

CC3Camera.h

bottom

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

@property (nonatomic, readonly) GLfloat bottom

Declared In

CC3Camera.h

bottomPlane

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

@property (nonatomic, readonly) CC3Plane bottomPlane

Declared In

CC3Camera.h

camera

The camera whose frustum this is.

@property (nonatomic, assign) CC3Camera *camera

Discussion

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.

Declared In

CC3Camera.h

far

The distance to the far end of this frustum.

@property (nonatomic, readonly) GLfloat far

Declared In

CC3Camera.h

farBottomLeft

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

@property (nonatomic, readonly) CC3Vector farBottomLeft

Declared In

CC3Camera.h

farBottomRight

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

@property (nonatomic, readonly) CC3Vector farBottomRight

Declared In

CC3Camera.h

farPlane

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

@property (nonatomic, readonly) CC3Plane farPlane

Declared In

CC3Camera.h

farTopLeft

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

@property (nonatomic, readonly) CC3Vector farTopLeft

Declared In

CC3Camera.h

farTopRight

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

@property (nonatomic, readonly) CC3Vector farTopRight

Declared In

CC3Camera.h

finiteProjectionMatrix

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

@property (nonatomic, strong, readonly) CC3Matrix *finiteProjectionMatrix

Declared In

CC3Camera.h

infiniteProjectionMatrix

An infinite projection matrix with the far end at infinity.

@property (nonatomic, strong, readonly) CC3Matrix *infiniteProjectionMatrix

Declared In

CC3Camera.h

isUsingParallelProjection

Indicates whether this frustum uses parallel projection.

@property (nonatomic, assign) BOOL isUsingParallelProjection

Discussion

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.

Declared In

CC3Camera.h

left

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

@property (nonatomic, readonly) GLfloat left

Declared In

CC3Camera.h

leftPlane

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

@property (nonatomic, readonly) CC3Plane leftPlane

Declared In

CC3Camera.h

near

The distance to the near end of this frustum.

@property (nonatomic, readonly) GLfloat near

Declared In

CC3Camera.h

nearBottomLeft

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

@property (nonatomic, readonly) CC3Vector nearBottomLeft

Declared In

CC3Camera.h

nearBottomRight

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

@property (nonatomic, readonly) CC3Vector nearBottomRight

Declared In

CC3Camera.h

nearPlane

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

@property (nonatomic, readonly) CC3Plane nearPlane

Declared In

CC3Camera.h

nearTopLeft

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

@property (nonatomic, readonly) CC3Vector nearTopLeft

Declared In

CC3Camera.h

nearTopRight

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

@property (nonatomic, readonly) CC3Vector nearTopRight

Declared In

CC3Camera.h

right

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

@property (nonatomic, readonly) GLfloat right

Declared In

CC3Camera.h

rightPlane

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

@property (nonatomic, readonly) CC3Plane rightPlane

Declared In

CC3Camera.h

top

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

@property (nonatomic, readonly) GLfloat top

Declared In

CC3Camera.h

topPlane

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

@property (nonatomic, readonly) CC3Plane topPlane

Declared In

CC3Camera.h

Class Methods

frustum

Allocates and initializes an autoreleased instance.

+ (id)frustum

Declared In

CC3Camera.h

Instance Methods

doesIntersectPointAt:

@deprecated Renamed to doesIntersectLocation:.

- (BOOL)doesIntersectPointAt:(CC3Vector)aLocation

Declared In

CC3Camera.h

doesIntersectSphereAt:withRadius:

@deprecated Renamed to doesIntersectLocation:.

- (BOOL)doesIntersectSphereAt:(CC3Vector)aLocation withRadius:(GLfloat)radius

Declared In

CC3Camera.h

markPlanesDirty

@deprecated Renamed to markDirty.

- (void)markPlanesDirty

Declared In

CC3Camera.h

populateFrom:andAspect:andNearClip:andFarClip:

@deprecated Use populateRight:andTop:andNear:andFar: instead.

- (void)populateFrom:(GLfloat)fieldOfView andAspect:(GLfloat)aspect andNearClip:(GLfloat)nearClip andFarClip:(GLfloat)farClip

Discussion

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).

Declared In

CC3Camera.h

populateRight:andTop:andNear:andFar:

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.

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

Declared In

CC3Camera.h