Public Member Functions | Properties

CC3TargettingRotator Class Reference

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

#import <CC3Rotator.h>

Inheritance diagram for CC3TargettingRotator:
Inheritance graph
[legend]
Collaboration diagram for CC3TargettingRotator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Properties

CC3TargettingConstraint
axisRestriction 
DEPRECATED_ATTRIBUTE
BOOL isTargettable
BOOL isTrackingForBumpMapping
BOOL shouldAutotargetCamera
BOOL shouldRotateToTargetLocation
BOOL shouldTrackTarget
BOOL shouldUpdateToTarget
CC3Nodetarget
CC3Vector targetLocation
CC3TargettingConstraint targettingConstraint

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.


Member Function 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_ATTRIBUTE
Deprecated:
Use rotateToTargetLocation:from:withUp: instead.

Property Documentation

- (CC3TargettingConstraint axisRestriction) DEPRECATED_ATTRIBUTE [read, write, assign]
Deprecated:
Renamed to targettingConstraint.

Implements CC3DirectionalRotator.

- (BOOL) isTargettable [read, assign]

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.

Implements CC3Rotator.

- (BOOL) isTrackingForBumpMapping [read, write, assign]

If the taget 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 globalLightLocation from the tracked location of the light, instead of rotating to face the light.

The initial property is set to NO.

Implements CC3MutableRotator.

- (BOOL) shouldAutotargetCamera [read, write, assign]

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.

Implements CC3MutableRotator.

- (BOOL) shouldRotateToTargetLocation [read, assign]

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.

Implements CC3Rotator.

- (BOOL) shouldTrackTarget [read, write, assign]

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.

Implements CC3MutableRotator.

- (BOOL) shouldUpdateToTarget [read, assign]

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 [read, write, assign]

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 not retained. If you destroy the target node, you must remove it as the target of this rotator.

Implements CC3Rotator.

- (CC3Vector) targetLocation [read, write, assign]

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 [read, write, assign]

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.

Implements CC3MutableRotator.


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