v2.0.2
Properties | List of all members
CC3DirectionalRotator Class Reference

#import <CC3Rotator.h>

Inheritance diagram for CC3DirectionalRotator:
Inheritance graph
[legend]

Properties

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

- Instance Methods inherited from CC3MutableRotator
(id) - initOnRotationMatrix:
 
(void) - markRotationDirty
 
(void) - orthonormalize
 
(void) - rotateBy:
 
(void) - rotateByAngle:aroundAxis:
 
(void) - rotateByQuaternion:
 
- Class Methods inherited from CC3MutableRotator
(GLubyte) + autoOrthonormalizeCount
 
(id) + rotatorOnRotationMatrix:
 
(void) + setAutoOrthonormalizeCount:
 

Detailed Description

CC3DirectionalRotator is a subclass of CC3MutableRotator that adds the ability to set rotation based on directional information.

In addition to specifying rotations in terms of three Euler angles, a rotation axis and a rotation angle, or a quaternion, rotations of this class can be specified in terms of pointing in a particular forwardDirection, and orienting so that 'up' is in a particular referenceUpDirection.

The rotationMatrix of this rotator can be used to convert between directional rotation, Euler angles, and quaternions. As such, the rotation of a node can be specified as a quaternion or a set of Euler angles, and then read back as a fowardDirection, upDirection, and rightDirection. Or, conversely, rotation may be specified by pointing to a particular forwardDirection and referenceUpDirection, and then read as a quaternion or a set of Euler angles.

The shouldReverseForwardDirection property can be used to determine whether rotation should rotate the negative-Z-axis of the local coordinate system to point in the forwardDirection, or should rotate the positive-Z-axis to the forwardDirection.

Property Documentation

- (CC3Vector sceneUpDirection) __deprecated
readwritenonatomicassign
Deprecated:
Renamed to referenceUpDirection.
- (CC3Vector worldUpDirection) __deprecated
readwritenonatomicassign
Deprecated:
Renamed to referenceUpDirection.
- (CC3Vector) forwardDirection
readwritenonatomicassign

The direction towards which this node is pointing, relative to the parent of the node.

A valid direction vector is required. Attempting to set this property to the zero vector (kCC3VectorZero) will raise an assertion error.

See the discussion in the notes of the same property in CC3Node for more info.

The initial value of this property is kCC3VectorUnitZPositive.

- (BOOL) isDirectional
readnonatomicassign

Indicates whether this rotator supports rotating to point towards a specific direction (ie- "look-towards").

This implementation always returns YES.

- (CC3Vector) referenceUpDirection
readwritenonatomicassign

The direction that is considered to be 'up'.

A valid direction vector is required. Attempting to set this property to the zero vector (kCC3VectorZero) will raise an assertion error.

See the discussion in the notes of the same property in CC3Node for more info.

The initial value of this property is kCC3VectorUnitYPositive.

- (CC3Vector) rightDirection
readnonatomicassign

The direction in the local coordinate system that is considered to be "off to the right" relative to the forwardDirection and upDirection.

See the discussion in the notes of the same property in CC3Node for more info.

The initial value of this property is kCC3VectorUnitXPositive.

- (BOOL) shouldReverseForwardDirection
readwritenonatomicassign

Indicates whether the effect of setting the forwardDirection property should be reversed.

Based on the OpenGL default orientation, setting the forwardDirection of a node rotates the node to align the negative-Z-axis of the node with the defined forward direction.

Setting this property to YES will invert that behaviour so that positive-Z-axis of the node will be aligned with the defined forwardDirection.

The initial value of this property is NO, indicating that the negative-Z-axis of the node will be aligned with the forwardDirection property.

- (CC3Vector) upDirection
readnonatomicassign

The direction, in the local coordinate system, that is considered to be 'up'.

This corresponds to the referenceUpDirection, after it has been transformed by the rotationMatrix of this instance.

See the discussion in the notes of the same property in CC3Node for more info.

The initial value of this property is kCC3VectorUnitYPositive.


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