Public Member Functions | Static Public Member Functions | Properties

CC3NodeAnimation Class Reference

An instance of a subclass of CC3NodeAnimation manages the animation of nodes. More...

#import <CC3NodeAnimation.h>

Inheritance diagram for CC3NodeAnimation:
Inheritance graph
[legend]

List of all members.

Public Member Functions

(void) - establishFrameAt:forNode:
(id) - initWithFrameCount:

Static Public Member Functions

(id) + animationWithFrameCount:

Properties

GLuint frameCount
BOOL isAnimatingLocation
BOOL isAnimatingQuaternion
BOOL isAnimatingRotation
BOOL isAnimatingScale
BOOL shouldInterpolate

Detailed Description

An instance of a subclass of CC3NodeAnimation manages the animation of nodes.

It is held in the animation property of the node itself, and is activated when the establishAnimationFrameAt: method is invoked on the node.

A single CC3NodeAnimation instance can be shared by multiple nodes. This is a typical situation when creating many copies of a node that is animated.

CC3NodeAnimation is an abstract class. Subclasses define concrete animation data storage.


Member Function Documentation

+ (id) animationWithFrameCount: (GLuint)  numFrames

Allocates and initializes an autoreleased instance to animate with the specified number of animation frames.

- (void) establishFrameAt: (ccTime)  t
forNode: (CC3Node *)  aNode 

Updates the location, rotation, quaternion, and scale of the specified node based on the animation frame located at the specified time, which should be a value between zero and one, with zero indicating the first animation frame, and one indicating the last animation frame.

Only those properties of the node for which there is animation data will be changed. If the shouldInterpolate property is set to YES, linear interpolation of the frame data is performed, based on the frameCount and the specified time.

- (id) initWithFrameCount: (GLuint)  numFrames

Initializes this instance to animate with the specified number of animation frames.


Property Documentation

- (GLuint) frameCount [read, assign]

The number of frames of animation.

- (BOOL) isAnimatingLocation [read, assign]

Indicates whether location data is available for animation.

Default returns NO. Subclasses with data should override appropriately.

- (BOOL) isAnimatingQuaternion [read, assign]

Indicates whether rotation quaternion data is available for animation.

Default returns NO. Subclasses with data should override appropriately.

- (BOOL) isAnimatingRotation [read, assign]

Indicates whether rotation data is available for animation.

Default returns NO. Subclasses with data should override appropriately.

- (BOOL) isAnimatingScale [read, assign]

Indicates whether scale data is available for animation.

Default returns NO. Subclasses with data should override appropriately.

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

Indicates whether this animation should interpolate between frames, for accuracy.

The initial value of this property is YES.


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