C# Class Axiom.Animating.NodeAnimationTrack

Inheritance: AnimationTrack
显示文件 Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
isSplineRebuildNeeded bool
positionSpline PositionalSpline
rotationSpline RotationalSpline
scaleSpline PositionalSpline
target Node
useShortestPath bool

Public Methods

Method Description
Apply ( float time, float weight, bool accumulate, float scale ) : void

Applies an animation track at a certain position to the target node.

When a track has bee associated with a target node, you can eaisly apply the animation to the target by calling this method.

ApplyToNode ( Node node, float time, float weight, bool accumulate, float scale ) : void

Same as the Apply method, but applies to a specified Node instead of it's associated node.

CreateKeyFrameImpl ( float time ) : KeyFrame

Specialised keyframe creation

CreateNodeKeyFrame ( float time ) : TransformKeyFrame

Creates a new KeyFrame and adds it to this animation at the given time index.

It is better to create KeyFrames in time order. Creating them out of order can result in expensive reordering processing. Note that a KeyFrame at time index 0.0 is always created for you, so you don't need to create this one, just access it using getKeyFrame(0);

GetInterpolatedKeyFrame ( float time, KeyFrame kf ) : KeyFrame

Gets a KeyFrame object which contains the interpolated transforms at the time index specified.

The KeyFrame objects held by this class are transformation snapshots at discrete points in time. Normally however, you want to interpolate between these keyframes to produce smooth movement, and this method allows you to do this easily. In animation terminology this is called 'tweening'.

GetNodeKeyFrame ( ushort index ) : TransformKeyFrame

Returns the KeyFrame at the specified index.

HasNonZeroKeyFrames ( ) : bool

Method to determine if this track has any KeyFrames which are doing anything useful - can be used to determine if this track can be optimised out.

NodeAnimationTrack ( Animation parent ) : System
NodeAnimationTrack ( Animation parent, Node target ) : System

Internal constructor, to prevent direction instantiation. Should be created via a call to the CreateTrack method of an Animation.

NodeAnimationTrack ( Animation parent, ushort handle ) : System
OnKeyFrameDataChanged ( ) : void

Called internally when keyframes belonging to this track are changed, in order to trigger a rebuild of the animation splines.

Optimise ( ) : void

Optimise the current track by removing any duplicate keyframes.

Protected Methods

Method Description
BuildInterpolationSplines ( ) : void

Used to rebuild the internal interpolation splines for translations, rotations, and scaling.

Method Details

Apply() public method

Applies an animation track at a certain position to the target node.
When a track has bee associated with a target node, you can eaisly apply the animation to the target by calling this method.
public Apply ( float time, float weight, bool accumulate, float scale ) : void
time float The time position in the animation to apply.
weight float The influence to give to this track, 1.0 for full influence, less to blend with /// other animations.
accumulate bool
scale float
return void

ApplyToNode() public method

Same as the Apply method, but applies to a specified Node instead of it's associated node.
public ApplyToNode ( Node node, float time, float weight, bool accumulate, float scale ) : void
node Axiom.Core.Node
time float
weight float
accumulate bool
scale float
return void

BuildInterpolationSplines() protected method

Used to rebuild the internal interpolation splines for translations, rotations, and scaling.
protected BuildInterpolationSplines ( ) : void
return void

CreateKeyFrameImpl() public method

Specialised keyframe creation
public CreateKeyFrameImpl ( float time ) : KeyFrame
time float
return KeyFrame

CreateNodeKeyFrame() public method

Creates a new KeyFrame and adds it to this animation at the given time index.
It is better to create KeyFrames in time order. Creating them out of order can result in expensive reordering processing. Note that a KeyFrame at time index 0.0 is always created for you, so you don't need to create this one, just access it using getKeyFrame(0);
public CreateNodeKeyFrame ( float time ) : TransformKeyFrame
time float
return TransformKeyFrame

GetInterpolatedKeyFrame() public method

Gets a KeyFrame object which contains the interpolated transforms at the time index specified.
The KeyFrame objects held by this class are transformation snapshots at discrete points in time. Normally however, you want to interpolate between these keyframes to produce smooth movement, and this method allows you to do this easily. In animation terminology this is called 'tweening'.
public GetInterpolatedKeyFrame ( float time, KeyFrame kf ) : KeyFrame
time float The time (in relation to the whole animation sequence).
kf KeyFrame
return KeyFrame

GetNodeKeyFrame() public method

Returns the KeyFrame at the specified index.
public GetNodeKeyFrame ( ushort index ) : TransformKeyFrame
index ushort
return TransformKeyFrame

HasNonZeroKeyFrames() public method

Method to determine if this track has any KeyFrames which are doing anything useful - can be used to determine if this track can be optimised out.
public HasNonZeroKeyFrames ( ) : bool
return bool

NodeAnimationTrack() public method

public NodeAnimationTrack ( Animation parent ) : System
parent Animation
return System

NodeAnimationTrack() public method

Internal constructor, to prevent direction instantiation. Should be created via a call to the CreateTrack method of an Animation.
public NodeAnimationTrack ( Animation parent, Node target ) : System
parent Animation
target Axiom.Core.Node
return System

NodeAnimationTrack() public method

public NodeAnimationTrack ( Animation parent, ushort handle ) : System
parent Animation
handle ushort
return System

OnKeyFrameDataChanged() public method

Called internally when keyframes belonging to this track are changed, in order to trigger a rebuild of the animation splines.
public OnKeyFrameDataChanged ( ) : void
return void

Optimise() public method

Optimise the current track by removing any duplicate keyframes.
public Optimise ( ) : void
return void

Property Details

isSplineRebuildNeeded protected_oe property

Flag indicating we need to rebuild the splines next time.
protected bool isSplineRebuildNeeded
return bool

positionSpline protected_oe property

Spline for position interpolation.
protected PositionalSpline positionSpline
return PositionalSpline

rotationSpline protected_oe property

Spline for rotation interpolation.
protected RotationalSpline rotationSpline
return RotationalSpline

scaleSpline protected_oe property

Spline for scale interpolation.
protected PositionalSpline scaleSpline
return PositionalSpline

target protected_oe property

Target node to be animated.
protected Node target
return Node

useShortestPath protected_oe property

Defines if rotation is done using shortest path
protected bool useShortestPath
return bool