v2.0.2
Instance Methods | Class Methods | Properties | List of all members
CC3NodeAnimationSegment Class Reference

#import <CC3NodeAnimation.h>

Inheritance diagram for CC3NodeAnimationSegment:
Inheritance graph
[legend]

Instance Methods

(id) - initOnAnimation:
 
(id) - initOnAnimation:from:to:
 
(id) - initOnAnimation:fromFrame:toFrame:
 
- Instance Methods inherited from CC3NodeAnimation
(void) - establishFrameAt:forNode:
 
(void) - establishFrameAt:inNodeAnimationState:
 
(id) - initWithFrameCount:
 
(CCTime) - timeAtFrame:
 

Class Methods

(id) + animationOnAnimation:
 
(id) + animationOnAnimation:from:to:
 
(id) + animationOnAnimation:fromFrame:toFrame:
 
- Class Methods inherited from CC3NodeAnimation
(id) + animationWithFrameCount:
 
(CCTime) + interpolationEpsilon
 
(void) + setInterpolationEpsilon:
 

Properties

CC3NodeAnimationbaseAnimation
 
GLuint endFrameIndex
 
CCTime endTime
 
GLuint startFrameIndex
 
CCTime startTime
 
- Properties inherited from CC3NodeAnimation
GLuint frameCount
 
BOOL hasVariableFrameTiming
 
BOOL isAnimating
 
BOOL isAnimatingLocation
 
BOOL isAnimatingQuaternion
 
BOOL isAnimatingScale
 
BOOL shouldInterpolate
 

Detailed Description

A CC3NodeAnimationSegment plays a segment of the animation data contained within another CC3NodeAnimation.

An instance of CC3NodeAnimationSegment is constructed with a reference to an underlying base animation, along with references to start and end times within that underlying animation.

The CC3NodeAnimationSegment maps its standard zero-to-one animation range to the segment of the base animation defined by the start and end times of the CC3NodeAnimationSegment.

As an example, a CC3NodeAnimationSegment with a startTime of 0.2 and endTime of 0.5 maps the full 0.0 - 1.0 animation range to the frames contained within the range of 0.2 - 0.5 in the base animation. In this case, requesting the animation of frames at times 0.0, 0.4 and 1.0 from the CC3NodeAnimationSegment instance will result in the animation of the frames at times 0.2, 0.32, 0.5 from the base animation (0.32 = 0.2 + (0.5 - 0.2) * 0.4).

The values of all read-only properties and methods are retrieved from the underlying base animation.

Method Documentation

+ (id) animationOnAnimation: (CC3NodeAnimation *)  baseAnimation

Allocates and initializes an autoreleased instance to animate a segment of the specified base animation.

Initially, this animation will use the entire base animation. You can limit the range to a segment of the full animation by setting the startTime and endTime properties.

+ (id) animationOnAnimation: (CC3NodeAnimation *)  baseAnimation
from: (CCTime)  startTime
to: (CCTime)  endTime 

Allocates and initializes an autoreleased instance to animate a segment of the specified base animation, and with the startTime and endTime properties set to the specified value.

+ (id) animationOnAnimation: (CC3NodeAnimation *)  baseAnimation
fromFrame: (GLuint)  startFrameIndex
toFrame: (GLuint)  endFrameIndex 

Allocates and initializes an autoreleased instance to animate a segment of the specified animation, and with the startTime and endTime properties to the specified value.

- (id) initOnAnimation: (CC3NodeAnimation *)  baseAnimation

Initializes this instance to animate a segment of the specified base animation.

Initially, this animation will use the entire base animation. You can limit the range to a segment of the full animation by setting the startTime and endTime properties.

- (id) initOnAnimation: (CC3NodeAnimation *)  baseAnimation
from: (CCTime)  startTime
to: (CCTime)  endTime 

Initializes this instance to animate a segment of the specified base animation, and with the startTime and endTime properties set to the specified value.

- (id) initOnAnimation: (CC3NodeAnimation *)  baseAnimation
fromFrame: (GLuint)  startFrameIndex
toFrame: (GLuint)  endFrameIndex 

Initializes this instance to animate a segment of the specified base animation, and with the startFrameIndex and endFrameIndex properties set to the specified value.

Property Documentation

- (CC3NodeAnimation*) baseAnimation
readnonatomicstrong

The CC3NodeAnimation containing the underlying animation data.

- (GLuint) endFrameIndex
readwritenonatomicassign

The index of the last frame that will be animated from the underlying animation data.

The value of this property will be between zero and one less than the value of the frameCount property.

This is a convenience property. Setting the value of this property sets the value of the endTime property by determining the time of the frame in the underlying base animation data corresponding to the frame index. The value derived depends on the number of frames of animation in the underlying animation data, and whether it has linear or variable frame timing. The use of this property makes most sense when the frame timing is linear (a constant time between each pair of consecutive frames).

See the class notes for more information about how to set the values of the startTime and endTime properties to create an animation segment from the underlying animation data.

- (CCTime) endTime
readwritenonatomicassign

The time within the underlying animation data that corresponds to the last frame of animation that will be animated by this instance.

The value of this property must be between zero and one, with zero and one indicating the beginning and end of the underlying animation data, respectively.

See the class notes for more information about how to set the values of the startTime and endTime properties to create an animation segment from the underlying animation data.

- (GLuint) startFrameIndex
readwritenonatomicassign

The index of the first frame that will be animated from the underlying animation data.

The value of this property will be between zero and one less than the value of the frameCount property.

This is a convenience property. Setting the value of this property sets the value of the startTime property by determining the time of the frame in the underlying base animation data corresponding to the frame index. The value derived depends on the number of frames of animation in the underlying animation data, and whether it has linear or variable frame timing. The use of this property makes most sense when the frame timing is linear (a constant time between each pair of consecutive frames).

See the class notes for more information about how to set the values of the startTime and endTime properties to create an animation segment from the underlying animation data.

- (CCTime) startTime
readwritenonatomicassign

The time within the underlying animation data that corresponds to the first frame of animation that will be animated by this instance.

The value of this property must be between zero and one, with zero and one indicating the beginning and end of the underlying animation data, respectively.

See the class notes for more information about how to set the values of the startTime and endTime properties to create an animation segment from the underlying animation data.


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