v2.0.2
Instance Methods | Properties | List of all members
CC3Node(Animation) Category Reference

#import <CC3NodeAnimation.h>

Instance Methods

(void) - addAnimation:asTrack:
 
(GLuint) - addAnimationFrom:to:
 
(void) - addAnimationFrom:to:asTrack:
 
(GLuint) - addAnimationFrom:to:ofBaseTrack:
 
(void) - addAnimationFrom:to:ofBaseTrack:asTrack:
 
(GLuint) - addAnimationFromFrame:toFrame:
 
(void) - addAnimationFromFrame:toFrame:asTrack:
 
(GLuint) - addAnimationFromFrame:toFrame:ofBaseTrack:
 
(void) - addAnimationFromFrame:toFrame:ofBaseTrack:asTrack:
 
(void) - addAnimationState:
 
(GLfloat) - animationBlendingWeightOnTrack:
 
(CCTime) - animationTimeOnTrack:
 
(BOOL) - containsAnimationOnTrack:
 
(NSString *) - describeAnimationStateForFrames:
 
(NSString *) - describeAnimationStateForFrames:fromTime:toTime:
 
(NSString *) - describeCurrentAnimationState
 
(void) - disableAllAnimation
 
(void) - disableAllAnimationOnTrack:
 
(void) - disableAllLocationAnimation
 
(void) - disableAllQuaternionAnimation
 
(void) - disableAllScaleAnimation
 
(void) - disableAnimation
 
(void) - disableAnimationOnTrack:
 
(void) - disableLocationAnimation
 
(void) - disableQuaternionAnimation
 
(void) - disableScaleAnimation
 
(void) - enableAllAnimation
 
(void) - enableAllAnimationOnTrack:
 
(void) - enableAllLocationAnimation
 
(void) - enableAllQuaternionAnimation
 
(void) - enableAllScaleAnimation
 
(void) - enableAnimation
 
(void) - enableAnimationOnTrack:
 
(void) - enableLocationAnimation
 
(void) - enableQuaternionAnimation
 
(void) - enableScaleAnimation
 
(void) - establishAnimationFrameAt:
 
(void) - establishAnimationFrameAt:onTrack:
 
(void) - freezeAllInanimatesOnTrack:
 
(void) - freezeIfInanimateOnTrack:
 
(CC3NodeAnimation *) - getAnimationOnTrack:
 
(CC3NodeAnimationState *) - getAnimationStateOnTrack:
 
(BOOL) - isAnimationEnabledOnTrack:
 
(void) - markAnimationDirty
 
(void) - removeAnimation:
 
(void) - removeAnimationState:
 
(void) - removeAnimationTrack:
 
(void) - setAnimationBlendingWeight:onTrack:
 

Properties

GLuint animationFrameCount __deprecated
 
CC3NodeAnimationanimation
 
CC3NodeAnimationStateanimationState
 
BOOL containsAnimation
 
BOOL isAnimationEnabled
 

Detailed Description

Extension category to add animation capabilities.

Method Documentation

- (void) addAnimation: (CC3NodeAnimation *)  animation
asTrack: (GLuint)  trackID 

Adds the specified animation as the specified animation track.

A node may contain only one animation per animation track. If an animation already exists on the specified track, it is replaced with the specified animation.

To animate this node, use this method to add one or more instances of a subclass of the abstract CC3NodeAnimation class, populated with animation content, and then create an instance of a CC3ActionAnimate action for each track, and selectively run them on this node.

Extends class CC3Node.

- (GLuint) addAnimationFrom: (CCTime)  startTime
to: (CCTime)  endTime 

Many animated characters require the animation of multiple distinct movements.

For example, a bird character might have distinct flapping, landing, and pecking movements. A human character might have distinct running, crouching and shooting movements.

It is often useful to provide all of these movements as one long animation, and to play the animation segments for specific movements as required by the application. Our human character might run for a while, then crouch, take a few shots, and then start running again, all under control of the application, by extracting and playing the animation segment for each movement, in turn, from the single long animation that contains all the movements.

To support this behaviour, you can load the entire long animation into one track of animation, and then use this method to create a separate animation track that contains only the animation for a single movement. You can then animate only that movement, or repeat only that movement in a loop (such as running or flying), or blend that movement with other animation tracks to allow your human character to run and shoot at the same time, or smoothly transition your bird from the flapping movement to the landing movement.

This method creates and adds a new animation track that plays only a segment of the existing animation in track zero, which is the default track used during animation loading. A new animation track ID is assigned, the new animation is added to this node on that animation track, and the track ID is returned.

The start and end times of the animation segment are defined by startTime and endTime, each of which are specified as a fraction of the total animation contained in the base animation track. Each of startTime and endTime must therefore be between zero and one.

For example, if you wish to create a new animation track that plays the middle third of an existing animation track, you would pass 0.3333 and 0.6667 as the startTime and endTime parameters, respectively.

This method is automatically propagated to all descendant nodes, so you only need to invoke this method on a single ancestor node (eg- the root node of your character).

Extends class CC3Node.

- (void) addAnimationFrom: (CCTime)  startTime
to: (CCTime)  endTime
asTrack: (GLuint)  trackID 

Many animated characters require the animation of multiple distinct movements.

For example, a bird character might have distinct flapping, landing, and pecking movements. A human character might have distinct running, crouching and shooting movements.

It is often useful to provide all of these movements as one long animation, and to play the animation segments for specific movements as required by the application. Our human character might run for a while, then crouch, take a few shots, and then start running again, all under control of the application, by extracting and playing the animation segment for each movement, in turn, from the single long animation that contains all the movements.

To support this behaviour, you can load the entire long animation into one track of animation, and then use this method to create a separate animation track that contains only the animation for a single movement. You can then animate only that movement, or repeat only that movement in a loop (such as running or flying), or blend that movement with other animation tracks to allow your human character to run and shoot at the same time, or smoothly transition your bird from the flapping movement to the landing movement.

This method creates and adds a new animation track that plays only a segment of the existing animation in track zero, which is the default track used during animation loading. The new animation is added to this node on the animation track specified by trackID.

The start and end times of the animation segment are defined by startTime and endTime, each of which are specified as a fraction of the total animation contained in the base animation track. Each of startTime and endTime must therefore be between zero and one.

For example, if you wish to create a new animation track that plays the middle third of an existing animation track, you would pass 0.3333 and 0.6667 as the startTime and endTime parameters, respectively.

This method is automatically propagated to all descendant nodes, so you only need to invoke this method on a single ancestor node (eg- the root node of your character).

Extends class CC3Node.

- (GLuint) addAnimationFrom: (CCTime)  startTime
to: (CCTime)  endTime
ofBaseTrack: (GLuint)  baseTrackID 

Many animated characters require the animation of multiple distinct movements.

For example, a bird character might have distinct flapping, landing, and pecking movements. A human character might have distinct running, crouching and shooting movements.

It is often useful to provide all of these movements as one long animation, and to play the animation segments for specific movements as required by the application. Our human character might run for a while, then crouch, take a few shots, and then start running again, all under control of the application, by extracting and playing the animation segment for each movement, in turn, from the single long animation that contains all the movements.

To support this behaviour, you can load the entire long animation into one track of animation, and then use this method to create a separate animation track that contains only the animation for a single movement. You can then animate only that movement, or repeat only that movement in a loop (such as running or flying), or blend that movement with other animation tracks to allow your human character to run and shoot at the same time, or smoothly transition your bird from the flapping movement to the landing movement.

This method creates and adds a new animation track that plays only a segment of the existing animation track specified by baseTrackID. A new animation track ID is assigned, the new animation is added to this node on that animation track, and the track ID is returned.

The start and end times of the animation segment are defined by startTime and endTime, each of which are specified as a fraction of the total animation contained in the base animation track. Each of startTime and endTime must therefore be between zero and one.

For example, if you wish to create a new animation track that plays the middle third of an existing animation track, you would pass 0.3333 and 0.6667 as the startTime and endTime parameters, respectively.

This method is automatically propagated to all descendant nodes, so you only need to invoke this method on a single ancestor node (eg- the root node of your character).

Extends class CC3Node.

- (void) addAnimationFrom: (CCTime)  startTime
to: (CCTime)  endTime
ofBaseTrack: (GLuint)  baseTrackID
asTrack: (GLuint)  trackID 

Many animated characters require the animation of multiple distinct movements.

For example, a bird character might have distinct flapping, landing, and pecking movements. A human character might have distinct running, crouching and shooting movements.

It is often useful to provide all of these movements as one long animation, and to play the animation segments for specific movements as required by the application. Our human character might run for a while, then crouch, take a few shots, and then start running again, all under control of the application, by extracting and playing the animation segment for each movement, in turn, from the single long animation that contains all the movements.

To support this behaviour, you can load the entire long animation into one track of animation, and then use this method to create a separate animation track that contains only the animation for a single movement. You can then animate only that movement, or repeat only that movement in a loop (such as running or flying), or blend that movement with other animation tracks to allow your human character to run and shoot at the same time, or smoothly transition your bird from the flapping movement to the landing movement.

This method creates and adds a new animation track that plays only a segment of the existing animation track specified by baseTrackID. The new animation is added to this node on the animation track specified by trackID.

The start and end times of the animation segment are defined by startTime and endTime, each of which are specified as a fraction of the total animation contained in the base animation track. Each of startTime and endTime must therefore be between zero and one.

For example, if you wish to create a new animation track that plays the middle third of an existing animation track, you would pass 0.3333 and 0.6667 as the startTime and endTime parameters, respectively.

This method is automatically propagated to all descendant nodes, so you only need to invoke this method on a single ancestor node (eg- the root node of your character).

Extends class CC3Node.

- (GLuint) addAnimationFromFrame: (GLuint)  startFrameIndex
toFrame: (GLuint)  endFrameIndex 

Many animated characters require the animation of multiple distinct movements.

For example, a bird character might have distinct flapping, landing, and pecking movements. A human character might have distinct running, crouching and shooting movements.

It is often useful to provide all of these movements as one long animation, and to play the animation segments for specific movements as required by the application. Our human character might run for a while, then crouch, take a few shots, and then start running again, all under control of the application, by extracting and playing the animation segment for each movement, in turn, from the single long animation that contains all the movements.

To support this behaviour, you can load the entire long animation into one track of animation, and then use this method to create a separate animation track that contains only the animation for a single movement. You can then animate only that movement, or repeat only that movement in a loop (such as running or flying), or blend that movement with other animation tracks to allow your human character to run and shoot at the same time, or smoothly transition your bird from the flapping movement to the landing movement.

This method creates and adds a new animation track that plays only a segment of the existing animation in track zero, which is the default track used during animation loading. A new animation track ID is assigned, the new animation is added to this node on that animation track, and the track ID is returned.

The start and end frames of the animation segment are defined by startFrameIndex and endFrameIndex, each of which identify a frame in the base animation track, inclusively. Frame indexing is zero-based, so the first frame is identified as frame index zero.

For example, if you wish to create a new animation track that plays frames 10 through 20, inclusively, of an existing animation track, you would pass 10 and 20 as the startFrameIndex and endFrameIndex parameters, respectively.

This method is automatically propagated to all descendant nodes, so you only need to invoke this method on a single ancestor node (eg- the root node of your character).

Extends class CC3Node.

- (void) addAnimationFromFrame: (GLuint)  startFrameIndex
toFrame: (GLuint)  endFrameIndex
asTrack: (GLuint)  trackID 

Many animated characters require the animation of multiple distinct movements.

For example, a bird character might have distinct flapping, landing, and pecking movements. A human character might have distinct running, crouching and shooting movements.

It is often useful to provide all of these movements as one long animation, and to play the animation segments for specific movements as required by the application. Our human character might run for a while, then crouch, take a few shots, and then start running again, all under control of the application, by extracting and playing the animation segment for each movement, in turn, from the single long animation that contains all the movements.

To support this behaviour, you can load the entire long animation into one track of animation, and then use this method to create a separate animation track that contains only the animation for a single movement. You can then animate only that movement, or repeat only that movement in a loop (such as running or flying), or blend that movement with other animation tracks to allow your human character to run and shoot at the same time, or smoothly transition your bird from the flapping movement to the landing movement.

This method creates and adds a new animation track that plays only a segment of the existing animation in track zero, which is the default track used during animation loading. The new animation is added to this node on the animation track specified by trackID.

The start and end frames of the animation segment are defined by startFrameIndex and endFrameIndex, each of which identify a frame in the base animation track, inclusively. Frame indexing is zero-based, so the first frame is identified as frame index zero.

For example, if you wish to create a new animation track that plays frames 10 through 20, inclusively, of an existing animation track, you would pass 10 and 20 as the startFrameIndex and endFrameIndex parameters, respectively.

This method is automatically propagated to all descendant nodes, so you only need to invoke this method on a single ancestor node (eg- the root node of your character).

Extends class CC3Node.

- (GLuint) addAnimationFromFrame: (GLuint)  startFrameIndex
toFrame: (GLuint)  endFrameIndex
ofBaseTrack: (GLuint)  baseTrackID 

Many animated characters require the animation of multiple distinct movements.

For example, a bird character might have distinct flapping, landing, and pecking movements. A human character might have distinct running, crouching and shooting movements.

It is often useful to provide all of these movements as one long animation, and to play the animation segments for specific movements as required by the application. Our human character might run for a while, then crouch, take a few shots, and then start running again, all under control of the application, by extracting and playing the animation segment for each movement, in turn, from the single long animation that contains all the movements.

To support this behaviour, you can load the entire long animation into one track of animation, and then use this method to create a separate animation track that contains only the animation for a single movement. You can then animate only that movement, or repeat only that movement in a loop (such as running or flying), or blend that movement with other animation tracks to allow your human character to run and shoot at the same time, or smoothly transition your bird from the flapping movement to the landing movement.

This method creates and adds a new animation track that plays only a segment of the existing animation track specified by baseTrackID. A new animation track ID is assigned, the new animation is added to this node on that animation track, and the track ID is returned.

The start and end frames of the animation segment are defined by startFrameIndex and endFrameIndex, each of which identify a frame in the base animation track, inclusively. Frame indexing is zero-based, so the first frame is identified as frame index zero.

For example, if you wish to create a new animation track that plays frames 10 through 20, inclusively, of an existing animation track, you would pass 10 and 20 as the startFrameIndex and endFrameIndex parameters, respectively.

This method is automatically propagated to all descendant nodes, so you only need to invoke this method on a single ancestor node (eg- the root node of your character).

Extends class CC3Node.

- (void) addAnimationFromFrame: (GLuint)  startFrameIndex
toFrame: (GLuint)  endFrameIndex
ofBaseTrack: (GLuint)  baseTrackID
asTrack: (GLuint)  trackID 

Many animated characters require the animation of multiple distinct movements.

For example, a bird character might have distinct flapping, landing, and pecking movements. A human character might have distinct running, crouching and shooting movements.

It is often useful to provide all of these movements as one long animation, and to play the animation segments for specific movements as required by the application. Our human character might run for a while, then crouch, take a few shots, and then start running again, all under control of the application, by extracting and playing the animation segment for each movement, in turn, from the single long animation that contains all the movements.

To support this behaviour, you can load the entire long animation into one track of animation, and then use this method to create a separate animation track that contains only the animation for a single movement. You can then animate only that movement, or repeat only that movement in a loop (such as running or flying), or blend that movement with other animation tracks to allow your human character to run and shoot at the same time, or smoothly transition your bird from the flapping movement to the landing movement.

This method creates and adds a new animation track that plays only a segment of the existing animation track specified by baseTrackID. The new animation is added to this node on the animation track specified by trackID.

The start and end frames of the animation segment are defined by startFrameIndex and endFrameIndex, each of which identify a frame in the base animation track, inclusively. Frame indexing is zero-based, so the first frame is identified as frame index zero.

For example, if you wish to create a new animation track that plays frames 10 through 20, inclusively, of an existing animation track, you would pass 10 and 20 as the startFrameIndex and endFrameIndex parameters, respectively.

This method is automatically propagated to all descendant nodes, so you only need to invoke this method on a single ancestor node (eg- the root node of your character).

Extends class CC3Node.

- (void) addAnimationState: (CC3NodeAnimationState *)  animationState

Adds the specified animation state wrapper, containing animation and track information.

A node may contain only one animation per animation track. If an animation already exists for the track represented in the specified animation state, it is replaced with the animation in the specified animation state.

Typically, to add animation to a node, the application would use the addAnimation:asTrack: method, rather than this method.

Extends class CC3Node.

- (GLfloat) animationBlendingWeightOnTrack: (GLuint)  trackID

Returns the animation blending weight for the animation on the specified track.

If this node does not contain animation, returns the blending weight from the first descendant node that contains animation and has a non-zero blending weight. Returns zero if no descendant nodes contain animation, or all descendant blending weights are zero.

Extends class CC3Node.

- (CCTime) animationTimeOnTrack: (GLuint)  trackID

Returns the current elapsed animation time for the animation on the specified track, as a value between zero and one.

If this node does not contain animation, returns the animation time from the first descendant node that contains animation and has a non-zero animation time. Returns zero if no descendant nodes contain animation, or all descendant animation times are zero.

Extends class CC3Node.

- (BOOL) containsAnimationOnTrack: (GLuint)  trackID

Indicates whether this node, or any of its descendants, contains animation on the specified animation track.

Extends class CC3Node.

- (NSString*) describeAnimationStateForFrames: (GLuint)  frameCount

Returns a description of the state at each of frameCount animation frames over the entire animation.

Extends class CC3Node.

- (NSString*) describeAnimationStateForFrames: (GLuint)  frameCount
fromTime: (CCTime)  startTime
toTime: (CCTime)  endTime 

Returns a description of the state at each of frameCount animation frames between the specified start and end times, which should each be in the range between zero and one.

Extends class CC3Node.

- (NSString*) describeCurrentAnimationState

Returns a description of the current animation state, including time and animated location, quaternion and scale.

Extends class CC3Node.

- (void) disableAllAnimation

Disables all animation tracks of this node, and all descendant nodes.

Extends class CC3Node.

- (void) disableAllAnimationOnTrack: (GLuint)  trackID

Disables the animation on the specified track of this node, and all descendant nodes.

Extends class CC3Node.

- (void) disableAllLocationAnimation

Disables the animation of the location property, without affecting the animation of the other properties, on this node and all descendant nodes.

This method works together with the enable/disableAnimation methods. For the location property to be animated, both location animation and node animation must be enabled. Both are enabled by default.

Extends class CC3Node.

- (void) disableAllQuaternionAnimation

Disables the animation of the quaternion property, without affecting the animation of the other properties, on this node and all descendant nodes.

This method works together with the enable/disableAnimation methods. For the quaternion property to be animated, both quaternion animation and node animation must be enabled. Both are enabled by default.

Extends class CC3Node.

- (void) disableAllScaleAnimation

Disables the animation of the scale property, without affecting the animation of the other properties, on this node and all descendant nodes.

This method works together with the enable/disableAnimation methods. For the scale property to be animated, both scale animation and node animation must be enabled. Both are enabled by default.

Extends class CC3Node.

- (void) disableAnimation

Disables the animation on all animation tracks of this node.

This will not disable animation of child nodes.

Extends class CC3Node.

- (void) disableAnimationOnTrack: (GLuint)  trackID

Disables the animation on the specified track of this node.

This will not disable animation of child nodes.

Extends class CC3Node.

- (void) disableLocationAnimation

Disables the animation of the location property, without affecting the animation of the other properties.

This method works together with the enable/disableAnimation methods. For the location property to be animated, both location animation and node animation must be enabled. Both are enabled by default.

This will not affect the animation of the location property of child nodes.

Extends class CC3Node.

- (void) disableQuaternionAnimation

Disables the animation of the quaternion property, without affecting the animation of the other properties.

This method works together with the enable/disableAnimation methods. For the quaternion property to be animated, both quaternion animation and node animation must be enabled. Both are enabled by default.

This will not affect the animation of the quaternion property of child nodes.

Extends class CC3Node.

- (void) disableScaleAnimation

Disables the animation of the scale property, without affecting the animation of the other properties.

This method works together with the enable/disableAnimation methods. For the scale property to be animated, both scale animation and node animation must be enabled. Both are enabled by default.

This will not affect the animation of the scale property of child nodes.

Extends class CC3Node.

- (void) enableAllAnimation

Enables all animation tracks of this node, and all descendant nodes.

Extends class CC3Node.

- (void) enableAllAnimationOnTrack: (GLuint)  trackID

Enables the animation on the specified track of this node, and all descendant nodes.

Extends class CC3Node.

- (void) enableAllLocationAnimation

Enables the animation of the location property, without affecting the animation of the other properties, on this node and all descendant nodes.

This method works together with the enable/disableAnimation methods. For the location property to be animated, both location animation and node animation must be enabled. Both are enabled by default.

Extends class CC3Node.

- (void) enableAllQuaternionAnimation

Enables the animation of the quaternion property, without affecting the animation of the other properties, on this node and all descendant nodes.

This method works together with the enable/disableAnimation methods. For the quaternion property to be animated, both quaternion animation and node animation must be enabled. Both are enabled by default.

Extends class CC3Node.

- (void) enableAllScaleAnimation

Enables the animation of the scale property, without affecting the animation of the other properties, on this node and all descendant nodes.

This method works together with the enable/disableAnimation methods. For the scale property to be animated, both scale animation and node animation must be enabled. Both are enabled by default.

Extends class CC3Node.

- (void) enableAnimation

Enables the animation on all animation tracks of this node.

This will not enable animation of child nodes.

Extends class CC3Node.

- (void) enableAnimationOnTrack: (GLuint)  trackID

Enables the animation on the specified track of this node.

This will not enable animation of child nodes.

Extends class CC3Node.

- (void) enableLocationAnimation

Enables the animation of the location property, without affecting the animation of the other properties.

This method works together with the enable/disableAnimation methods. For the location property to be animated, both location animation and node animation must be enabled. Both are enabled by default.

This will not affect the animation of the location property of child nodes.

Extends class CC3Node.

- (void) enableQuaternionAnimation

Enables the animation of the quaternion property, without affecting the animation of the other properties.

This method works together with the enable/disableAnimation methods. For the quaternion property to be animated, both quaternion animation and node animation must be enabled. Both are enabled by default.

This will not affect the animation of the quaternion property of child nodes.

Extends class CC3Node.

- (void) enableScaleAnimation

Enables the animation of the scale property, without affecting the animation of the other properties.

This method works together with the enable/disableAnimation methods. For the scale property to be animated, both scale animation and node animation must be enabled. Both are enabled by default.

This will not affect the animation of the scale property of child nodes.

Extends class CC3Node.

- (void) establishAnimationFrameAt: (CCTime)  __deprecated
Deprecated:
Replaced with establishAnimationFrameAt:onTrack:.

Extends class CC3Node.

- (void) establishAnimationFrameAt: (CCTime)  t
onTrack: (GLuint)  trackID 

Updates the location, quaternion and scale properties on the animation state wrapper associated with the animation on the specified track, 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 transform properties for which there is animation content will be changed.

This method is usually invoked automatically from an active CC3ActionAnimate action during each update cycle. Once all animation tracks have been updated accordingly, the node automatically blends the weighted animation from each track to determine the corresponding values of the location, quaternion and scale properties of this node.

This implementation delegates to the CC3NodeAnimationState instance that is managing the animation for the specified track, then passes this notification along to child nodes to align them with the same animation time. Linear interpolation of the frame content may be performed, based on the number of frames and the specified time.

If disableAnimation or disableAllAnimation has been invoked on this node, it will be excluded from animation, and this method will not have any affect on this node. However, this method will be propagated to child nodes.

This method is invoked automatically from an instance of CC3ActionAnimate that is animating this node. Usually, the application never needs to invoke this method directly.

Extends class CC3Node.

- (void) freezeAllInanimatesOnTrack: (GLuint)  trackID

Invokes the freezeIfInanimateOnTrack: method on this node and all descendant nodes, to freeze each node that does not contain animation on the specified track, to its current location, rotation, and scale, whenever animation is playing on the specified track.

Invoking this method can be useful if any descendant nodes are not animated, and you want to ensure that when animation is playing on the specified track, that those nodes will be forced to their current location, quaternion, and scale values.

It is safe to invoke this method more than once. Each time it is invoked, any inanimate descendant nodes will be frozen to the location, quaternion, and scale values at the time this method is invoked, whenever animation is playing on the specified track.

Extends class CC3Node.

- (void) freezeIfInanimateOnTrack: (GLuint)  trackID

If this node does not currently contain animation on the specified track, the animation on that track is set to an instance of CC3FrozenNodeAnimation, populated from the current location, quaternion, and scale properties of this node, to effectively freeze this node to its current location, rotation, and scale, throughout the animation of the specified track.

If this node already contains a CC3FrozenNodeAnimation on the specified track (from a prior invocation of this method), it is populated from the current location, quaternion, and scale properties of this node, to effectively freeze this node to its current location, rotation, and scale, throughout the animation of the specified track. It is safe, therefore, to invoke this method more than once.

If this node already contains animation of any other kind, this method does nothing.

This freezing behaviour is different than if the node had no animation at all. A node with no animation content can have its location, quaternion, and scale properties freely set, even while animation is running. By contrast, while an animation is running on the node containing instance of CC3FrozenNodeAnimation, the values of the location, quaternion, and scale properties will each be locked to a single value.

Invoking this method can be useful if this node is not really animated, but you want to ensure that when animation is playing on a node assembly, that this node is forced to a particular location, rotation, and scale.

Extends class CC3Node.

- (CC3NodeAnimation*) getAnimationOnTrack: (GLuint)  trackID

Returns the animation for the specified animation track, or nil if no animation has been defined for this node on that animation track.

Extends class CC3Node.

- (CC3NodeAnimationState*) getAnimationStateOnTrack: (GLuint)  trackID

Returns the animation state wrapper on the specified animation track, or nil if no animation has been defined for this node on that animation track.

Extends class CC3Node.

- (BOOL) isAnimationEnabledOnTrack: (GLuint)  trackID

Indicates whether the animation on the specified animation track is enabled.

The value returned by this method applies only to this node, not its child nodes. Child nodes that return YES to this method will be animated even if this node returns NO, and vice-versa.

The initial value of this property is YES.

Extends class CC3Node.

- (void) markAnimationDirty

Marks the animation state of this node as dirty, indicating that the animated properties of this node should be updated on the next update cycle.

This method is invoked automatically if a animated property has been changed on any animation track as a result of the invocation of the establishAnimationFrameAt:onTrack: method. Normally, the application never needs to invoke this method.

Extends class CC3Node.

- (void) removeAnimation: (CC3NodeAnimation *)  animation

Removes the specified animation from this node.

Extends class CC3Node.

- (void) removeAnimationState: (CC3NodeAnimationState *)  animationState

Removes the specified animation state wrapper from this node.

Typically, to remove animation from a node, the application would use the removeAnimation: or removeAnimationTrack: methods, rather than this method.

Extends class CC3Node.

- (void) removeAnimationTrack: (GLuint)  trackID

Removes the animation on the specified animation track from this node and all descendant nodes.

Extends class CC3Node.

- (void) setAnimationBlendingWeight: (GLfloat)  blendWeight
onTrack: (GLuint)  trackID 

Sets the animation blending weight for the animation on the specified track, and sets the same weight into all descendants.

When multiple animation tracks are active, the blending weight of a track determines the relative influence the animation track has on the properties of this node. Animation tracks with larger weights relative to the other tracks will have a proportionally larger influence on the transform properties of the node. An animation track with a blending weight of zero will have no influence on the properties of the node.

The absolute value of the weights does not matter, nor do the weights across all animation tracks have to add up to unity. Therefore, a blending weight of 0.2 on one track and a blending weight of 0.1 on a second track will have exactly the same affect as a weight of 1.2 on the first track and a weight of 0.6 on the second track. In both cases, the first animation track will have twice the influence as the second animation track.

When only one animation track is active, the blending weight has no effect unless it is zero.

Extends class CC3Node.

Property Documentation

- (GLuint animationFrameCount) __deprecated
readnonatomicassign
Deprecated:
Instead of accessing this property, retrieve the appropriate animation using the animation property or the getAnimationOnTrack: method, and access the frameCount property.

Extends class CC3Node.

- (CC3NodeAnimation*) animation
readwritenonatomicstrong

The animation content of animation track zero of this node.

Setting this property is the same as invoking addAnimation:asTrack: and specifying track zero. Querying this property is the same as invoking getAnimationOnTrack: and specifying track zero.

To animate this node, set this property to an instance of a subclass of the abstract CC3NodeAnimation class, populated with animation content, and then create an instance of a CC3ActionAnimate action, and run it on this node.

Extends class CC3Node.

- (CC3NodeAnimationState*) animationState
readnonatomicstrong

The animation state wrapper for animation track zero.

This is a convenience property for accessing the animation when only a single animation track is used.

This wrapper is created automatically when the animation property is set.

Extends class CC3Node.

- (BOOL) containsAnimation
readnonatomicassign

Indicates whether this node, or any of its descendants, contains animation on any tracks.

Extends class CC3Node.

- (BOOL) isAnimationEnabled
readwritenonatomicassign

Indicates whether the animation on any animation track in this node is enabled.

The value of this property applies only to this node, not the descendant nodes. Descendant nodes that return YES to this method will be animated even if this node returns NO, and vice-versa.

The initial value of this property is YES.

Extends class CC3Node.


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