Properties

CC3DirectionalRotator Class Reference

This CC3Rotator subclass adds the ability to set rotation based on directional information. More...

#import <CC3TargettingNode.h>

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

List of all members.

Properties

CC3Vector forwardDirection
CC3Vector rightDirection
CC3Vector upDirection
CC3Vector worldUpDirection

Detailed Description

This CC3Rotator subclass 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 worldUpDirection.

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 worldUpDirection, and then read as a quaternion or a set of Euler angles.


Property Documentation

- (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.

- (CC3Vector) rightDirection [read, assign]

The direction in the node's coordinate system that would be considered to be "off to the right" relative to the forwardDirection and upDirection.

This property is read-only, See the discussion of the rotational directions in the CC3TargettingNode class notes.

- (CC3Vector) upDirection [read, assign]

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

This corresponds to the worldUpDirection, after it has been transformed by the rotationMatrix of this instance. See the discussion of 'up' vectors in the CC3TargettingNode class notes.

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

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

See the discussion of 'up' vectors in the CC3TargettingNode class notes.

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


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