C# Class FlatRedBall.Graphics.Model.Animation.Content.ContentUtil

Contains utility functions for the content pipeline relating to animation.
Show file Open project: vchelaru/FlatRedBall Class Usage Examples

Public Methods

Method Description
CalculateSquareRoot ( Matrix A, int iterations ) : Matrix

Calculates the square root of a matrix.

GetSkinningType ( System elements ) : SkinningType

Gets info on what skinning info a vertex element array contains.

GetSkinningType ( VertexElement elements ) : SkinningType
MergeKeyFrames ( AnimationKeyframe scale, AnimationKeyframe translation, AnimationKeyframe rotation ) : List

Merges scale, translation, and rotation keyframes into matrix keyframes.

ReflectMatrix ( Matrix &m ) : void

Reflects a matrix across the Z axis by multiplying both the Z column and the Z row by -1 such that the Z,Z element stays intact.

SlerpMatrix ( Matrix start, Matrix end, float slerpAmount ) : Matrix

Roughly decomposes two matrices and performs spherical linear interpolation

Private Methods

Method Description
CalculateSquareRoot ( Matrix Y, Matrix Z, int iterations ) : Matrix
InitializeFrames ( AnimationKeyframe &frames ) : void
InterpFrames ( AnimationKeyframe &source, Matrix &dest, IList times ) : void
SortFrames ( AnimationKeyframe &frames ) : void

Method Details

CalculateSquareRoot() public static method

Calculates the square root of a matrix.
public static CalculateSquareRoot ( Matrix A, int iterations ) : Matrix
A Matrix The matrix.
iterations int The number of recursive iterations used by the /// calculation algorithm.
return Matrix

GetSkinningType() public static method

Gets info on what skinning info a vertex element array contains.
public static GetSkinningType ( System elements ) : SkinningType
elements System The vertex elements.
return SkinningType

GetSkinningType() public static method

public static GetSkinningType ( VertexElement elements ) : SkinningType
elements Microsoft.Xna.Framework.Graphics.VertexElement
return SkinningType

MergeKeyFrames() public static method

Merges scale, translation, and rotation keyframes into matrix keyframes.
public static MergeKeyFrames ( AnimationKeyframe scale, AnimationKeyframe translation, AnimationKeyframe rotation ) : List
scale AnimationKeyframe The scale keyframes.
translation AnimationKeyframe The translation keyframes.
rotation AnimationKeyframe The rotation keyframes.
return List

ReflectMatrix() public static method

Reflects a matrix across the Z axis by multiplying both the Z column and the Z row by -1 such that the Z,Z element stays intact.
public static ReflectMatrix ( Matrix &m ) : void
m Matrix The matrix to be reflected across the Z axis
return void

SlerpMatrix() public static method

Roughly decomposes two matrices and performs spherical linear interpolation
public static SlerpMatrix ( Matrix start, Matrix end, float slerpAmount ) : Matrix
start Matrix Source matrix for interpolation
end Matrix Destination matrix for interpolation
slerpAmount float Ratio of interpolation
return Matrix