C# Class Protogame.Animation

A default implementation of IAnimation.
Inheritance: IAnimation
Afficher le fichier Open project: RedpointGames/Protogame

Méthodes publiques

Méthode Description
Animation ( string name, double ticksPerSecond, double durationInTicks, Vector3>.IDictionary translationForBones, Quaternion>.IDictionary rotationForBones, Vector3>.IDictionary scaleForBones ) : System

Initializes a new instance of the Animation class.

Apply ( IModel model, double frame ) : void

Applies the animation at a specified time to the model.

Apply ( IModel model, float totalSeconds, float multiply ) : void

Applies the animation at a specified time to the model.

Render ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform, IModel model, TimeSpan secondFraction, float multiply ) : void

Modifies the specified model to align to this animation at the specified frame and then renders it.

Render ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform, IModel model, double frame ) : void

Modifies the specified model to align to this animation at the specified frame and then renders it.

Render ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform, IModel model, float totalSeconds, float multiply ) : void

Modifies the specified model to align to this animation at the specified frame and then renders it.

Private Methods

Méthode Description
FindSurroundingTickValues ( IList keys, double current, double &previous, double &next ) : void

Finds the nearest previous and next floating point number to the specified floating point number using a binary search algorithm.

Method Details

Animation() public méthode

Initializes a new instance of the Animation class.
public Animation ( string name, double ticksPerSecond, double durationInTicks, Vector3>.IDictionary translationForBones, Quaternion>.IDictionary rotationForBones, Vector3>.IDictionary scaleForBones ) : System
name string /// The name of the animation. ///
ticksPerSecond double /// The ticks per second, or rate at which this animation plays. ///
durationInTicks double /// The duration in ticks, or total number of frames that this animation has. ///
translationForBones Vector3>.IDictionary /// The translation keys applicable to the animation. ///
rotationForBones Quaternion>.IDictionary /// The rotation keys applicable to the animation. ///
scaleForBones Vector3>.IDictionary /// The scale keys applicable to the application. ///
Résultat System

Apply() public méthode

Applies the animation at a specified time to the model.
public Apply ( IModel model, double frame ) : void
model IModel /// The model to apply the animation to. ///
frame double /// The frame to draw at. ///
Résultat void

Apply() public méthode

Applies the animation at a specified time to the model.
public Apply ( IModel model, float totalSeconds, float multiply ) : void
model IModel /// The model to apply the animation to. ///
totalSeconds float /// The time elapsed. ///
multiply float /// The multiplication factor to apply to the animation speed. ///
Résultat void

Render() public méthode

Modifies the specified model to align to this animation at the specified frame and then renders it.
public Render ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform, IModel model, TimeSpan secondFraction, float multiply ) : void
renderContext IRenderContext /// The current render context. ///
effect IEffect
effectParameterSet IEffectParameterSet
transform Matrix /// The world transformation to apply. ///
model IModel /// The model to update. ///
secondFraction TimeSpan /// The time elapsed. ///
multiply float /// The multiplication factor to apply to the animation speed. ///
Résultat void

Render() public méthode

Modifies the specified model to align to this animation at the specified frame and then renders it.
public Render ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform, IModel model, double frame ) : void
renderContext IRenderContext /// The current render context. ///
effect IEffect
effectParameterSet IEffectParameterSet
transform Matrix /// The world transformation to apply. ///
model IModel /// The model to update. ///
frame double /// The frame to draw at. ///
Résultat void

Render() public méthode

Modifies the specified model to align to this animation at the specified frame and then renders it.
public Render ( IRenderContext renderContext, IEffect effect, IEffectParameterSet effectParameterSet, Matrix transform, IModel model, float totalSeconds, float multiply ) : void
renderContext IRenderContext /// The current render context. ///
effect IEffect
effectParameterSet IEffectParameterSet
transform Matrix /// The world transformation to apply. ///
model IModel /// The model to update. ///
totalSeconds float /// The time elapsed. ///
multiply float /// The multiplication factor to apply to the animation speed. ///
Résultat void