Properties

CC3DirectionalRotator Class Reference

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

#import <CC3Rotator.h>

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

List of all members.

Properties

CC3Vector sceneUpDirection DEPRECATED_ATTRIBUTE
CC3Vector worldUpDirection DEPRECATED_ATTRIBUTE
CC3Vector forwardDirection
BOOL isDirectional
CC3Vector referenceUpDirection
CC3Vector rightDirection
BOOL shouldReverseForwardDirection
CC3Vector upDirection

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_ATTRIBUTE [read, write, assign]
Deprecated:
Renamed to referenceUpDirection.

Implemented in CC3TargettingRotator.

- (CC3Vector worldUpDirection) DEPRECATED_ATTRIBUTE [read, write, assign]
Deprecated:
Renamed to referenceUpDirection.

Implemented in CC3TargettingRotator.

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

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

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

This implementation always returns YES.

Implements CC3Rotator.

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

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

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

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.

Implements CC3MutableRotator.

- (CC3Vector) upDirection [read, assign]

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: