C# Class Axiom.Animating.NodeAnimationTrack

Inheritance: AnimationTrack
Afficher le fichier Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Свойство Type Description
isSplineRebuildNeeded bool
positionSpline PositionalSpline
rotationSpline RotationalSpline
scaleSpline PositionalSpline
target Node
useShortestPath bool

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
BuildInterpolationSplines ( ) : void

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

Method Details

Apply() public méthode

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
Résultat void

ApplyToNode() public méthode

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
Résultat void

BuildInterpolationSplines() protected méthode

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

CreateKeyFrameImpl() public méthode

Specialised keyframe creation
public CreateKeyFrameImpl ( float time ) : KeyFrame
time float
Résultat KeyFrame

CreateNodeKeyFrame() public méthode

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
Résultat TransformKeyFrame

GetInterpolatedKeyFrame() public méthode

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
Résultat KeyFrame

GetNodeKeyFrame() public méthode

Returns the KeyFrame at the specified index.
public GetNodeKeyFrame ( ushort index ) : TransformKeyFrame
index ushort
Résultat TransformKeyFrame

HasNonZeroKeyFrames() public méthode

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
Résultat bool

NodeAnimationTrack() public méthode

public NodeAnimationTrack ( Animation parent ) : System
parent Animation
Résultat System

NodeAnimationTrack() public méthode

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
Résultat System

NodeAnimationTrack() public méthode

public NodeAnimationTrack ( Animation parent, ushort handle ) : System
parent Animation
handle ushort
Résultat System

OnKeyFrameDataChanged() public méthode

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

Optimise() public méthode

Optimise the current track by removing any duplicate keyframes.
public Optimise ( ) : void
Résultat void

Property Details

isSplineRebuildNeeded protected_oe property

Flag indicating we need to rebuild the splines next time.
protected bool isSplineRebuildNeeded
Résultat bool

positionSpline protected_oe property

Spline for position interpolation.
protected PositionalSpline positionSpline
Résultat PositionalSpline

rotationSpline protected_oe property

Spline for rotation interpolation.
protected RotationalSpline rotationSpline
Résultat RotationalSpline

scaleSpline protected_oe property

Spline for scale interpolation.
protected PositionalSpline scaleSpline
Résultat PositionalSpline

target protected_oe property

Target node to be animated.
protected Node target
Résultat Node

useShortestPath protected_oe property

Defines if rotation is done using shortest path
protected bool useShortestPath
Résultat bool