#import <CC3Rotator.h>
Instance Methods | |
(void) | - rotateToTargetLocation:from:withUp: |
(void) | - rotateToTargetLocationFrom: |
Additional Inherited Members | |
Class Methods inherited from CC3MutableRotator | |
(GLubyte) | + autoOrthonormalizeCount |
(id) | + rotatorOnRotationMatrix: |
(void) | + setAutoOrthonormalizeCount: |
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.
- (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 |
|
readwritenonatomicassign |
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
readnonatomicassign |
Returns whether the node should update itself towards the target.
Returns YES if the target property is set and the shouldTrackTarget returns YES.
|
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.
|
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.
|
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.