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

#import <CC3Rotator.h>

Inheritance diagram for CC3TargettingRotator:
Inheritance graph
[legend]

Instance Methods

(void) - rotateToTargetLocation:from:withUp:
 
(void) - rotateToTargetLocationFrom:
 

Properties

CC3TargettingConstraint
axisRestriction 
__deprecated
 
BOOL isTargettable
 
BOOL isTrackingForBumpMapping
 
BOOL isTrackingTargetDirection
 
BOOL shouldAutotargetCamera
 
BOOL shouldRotateToTargetLocation
 
BOOL shouldTrackTarget
 
BOOL shouldUpdateToTarget
 
CC3Nodetarget
 
CC3Vector targetLocation
 
CC3TargettingConstraint targettingConstraint
 
- Properties inherited from CC3DirectionalRotator
CC3Vector sceneUpDirection __deprecated
 
CC3Vector worldUpDirection __deprecated
 
CC3Vector forwardDirection
 
BOOL isDirectional
 
CC3Vector referenceUpDirection
 
CC3Vector rightDirection
 
BOOL shouldReverseForwardDirection
 
CC3Vector upDirection
 
- Properties inherited from CC3MutableRotator
BOOL isRotationDirty
 
CC3Quaternion quaternion
 
CC3Vector rotation
 
GLfloat rotationAngle
 
CC3Vector rotationAxis
 
CC3MatrixrotationMatrix
 
- Properties inherited from CC3Rotator
BOOL isDirectional
 
BOOL isMutable
 
BOOL isTargettable
 
BOOL isTrackingForBumpMapping
 
BOOL isTrackingTargetDirection
 
CC3Quaternion quaternion
 
CC3Vector rotation
 
GLfloat rotationAngle
 
CC3Vector rotationAxis
 
CC3MatrixrotationMatrix
 
BOOL shouldAutotargetCamera
 
BOOL shouldRotateToTargetLocation
 
BOOL shouldTrackTarget
 
BOOL shouldUpdateToTarget
 
CC3Nodetarget
 
CC3Vector targetLocation
 
CC3TargettingConstraint targettingConstraint
 

Additional Inherited Members

- Class Methods inherited from CC3MutableRotator
(GLubyte) + autoOrthonormalizeCount
 
(id) + rotatorOnRotationMatrix:
 
(void) + setAutoOrthonormalizeCount:
 

Detailed Description

CC3TargettingRotator is a subclass of CC3DirectionalRotator that can automatically track the location of another node, or a specific location in 3D space.

In addition to specifying rotations in terms of three Euler angles, a rotation axis and a rotation angle, a quaternion, or a direction, rotations of this class can be specified in terms of pointing at a specific target location in space, or at a specific target node. Further, the rotator can optionally be configured to track that target location or node as the target node, or the node using this rotator, move.

Method Documentation

- (void) rotateToTargetLocation: (CC3Vector targLoc
from: (CC3Vector eyeLoc
withUp: (CC3Vector upDir 

Rotates to look at the specified target location as viewed from the specified eye location, and orienting with reference to the specifie up direction.

The direction, and both locations are specified in the local coordinate system.

This is the classic LookAt rotational function.

- (void) rotateToTargetLocationFrom: (CC3Vector __deprecated
Deprecated:
Use rotateToTargetLocation:from:withUp: instead.

Property Documentation

- (CC3TargettingConstraint axisRestriction) __deprecated
readwritenonatomicassign
Deprecated:
Renamed to targettingConstraint.
- (BOOL) isTargettable
readnonatomicassign

Indicates whether this rotator supports rotating to point towards a specific target node or target location (ie- "look-at"), including.

This implementation always returns YES.

- (BOOL) isTrackingForBumpMapping
readwritenonatomicassign

If the target node of the node carrying this rotator is a CC3Light, the target can be tracked by the node for the purpose of updating the lighting of a contained bump-map texture, instead of rotating to face the light, as normally occurs with tracking.

This property indicates whether the node should update its globalLightPosition from the tracked location of the light, instead of rotating to face the light.

The initial property is set to NO.

- (BOOL) isTrackingTargetDirection
readnonatomicassign

Returns whether this rotator updates the target direction by tracking a target.

Returns YES if this rotator has a target node, the shouldTrackTarget property is set to YES, and the isTrackingForBumpMapping property is set to NO.

- (BOOL) shouldAutotargetCamera
readwritenonatomicassign

Indicates whether the node should automatically find and track the camera as its target.

If this property is set to YES, the node will automatically find and track the camera without having to set the target and shouldTrackTarget properties explicitly.

This initial value of this property is NO.

- (BOOL) shouldRotateToTargetLocation
readnonatomicassign

Returns whether this node should rotate to face the targetLocation.

It will do so if it is not tracking for bump-mapping purposes, and the targetDirection was just set, or shouldTrackTarget is YES.

- (BOOL) shouldTrackTarget
readwritenonatomicassign

Indicates whether the node should track the node set in the target property as the target and the node carrying this rotator move around.

This initial value of this property is NO.

- (BOOL) shouldUpdateToTarget
readnonatomicassign

Returns whether the node should update itself towards the target.

Returns YES if the target property is set and the shouldTrackTarget returns YES.

- (CC3Node*) target
readwritenonatomicassign

The target node at which this rotator is pointed.

If the shouldTrackTarget property is set to YES, the node will track the target so that it always points to the target, regardless of how the target and this node move through the 3D scene.

The target is held as a weak reference. If you destroy the target node, you must remove it as the target of this rotator.

- (CC3Vector) targetLocation
readwritenonatomicassign

The global location towards which this node is facing.

The target location is determined by the node and is cached by the directional rotator.

- (CC3TargettingConstraint) targettingConstraint
readwritenonatomicassign

Indicates whether rotation should be constrained when attempting to rotate the node to point at the target or targetLocation.

The initial value of this property is kCC3TargettingConstraintGlobalUnconstrained.


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