Public Member Functions | Static Public Member Functions | Properties

CC3PODNodeAnimation Class Reference

POD files can contain information to animate the nodes. More...

#import <CC3NodePODExtensions.h>

List of all members.

Public Member Functions

(void) - establishFrameAt:
(id) - initOnNode:fromSPODNode:withFrameCount:

Static Public Member Functions

(id) + animationOnNode:fromSPODNode:withFrameCount:
(BOOL) + sPODNodeDoesContainAnimation:

Properties

GLuint frameCount
CC3Nodenode
BOOL shouldAnimate

Detailed Description

A CC3PODNodeAnimation instance manages the animation of a single node. It is held by the node itself, in the podAnimation property, and is activated when the establishPODAnimationFrameAt: method is invoked on the node.


Member Function Documentation

+ (id) animationOnNode: (CC3Node *)  aNode
fromSPODNode: (PODStructPtr pSPODNode
withFrameCount: (GLuint)  numFrames 

Allocates and initializes an autoreleased instance to animate the specified node using animation data found in the specified SPODNode structure, containing the specified number of animation frames.

Usually it's only worth instantiating an instance of this class if the SPODNode actually contains animation data. This can be checked with the sPODNodeDoesContainAnimation: class method.

- (void) establishFrameAt: (ccTime)  t

If the shouldAnimate property is YES, updates the location, rotation and scale of the associated 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. Linear interpolation of the frame data is performed, based on the frameCount and the specified time.

- (id) initOnNode: (CC3Node *)  aNode
fromSPODNode: (PODStructPtr pSPODNode
withFrameCount: (GLuint)  numFrames 

Initializes this instance to animate the specified node using animation data found in the specified SPODNode structure, containing the specified number of animation frames.

Usually it's only worth instantiating an instance of this class if the SPODNode actually contains animation data. This can be checked with the sPODNodeDoesContainAnimation: class method.

+ (BOOL) sPODNodeDoesContainAnimation: (PODStructPtr pSPODNode

Returns whether the specified SPODNode structure contains animation data.


Property Documentation

- (GLuint) frameCount [read, assign]

The number of frames of animation.

- (CC3Node *) node [read, assign]

The node that this instance is animating.

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

Indicates whether animation is active for the node.

If this property is NO, the associated node will not be included in POD animation activities. The initial value is YES.


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