MeshAnimation ClassDelta Engine Documentation
Consists of a number of frames of animation. Defaults to 30fps View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Content ContentData
    DeltaEngine.Rendering3D MeshAnimation

Namespace: DeltaEngine.Rendering3D
Assembly: DeltaEngine.Rendering3D (in DeltaEngine.Rendering3D.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class MeshAnimation : ContentData

The MeshAnimation type exposes the following members.

Constructors

  NameDescription
Protected methodMeshAnimation(String)
Initializes a new instance of the MeshAnimation class
Public methodMeshAnimation(MeshAnimationCreationData)
Initializes a new instance of the MeshAnimation class
Top
Methods

  NameDescription
Protected methodCreateDefault (Inherited from ContentData.)
Public methodDispose (Inherited from ContentData.)
Protected methodDisposeData (Overrides ContentData DisposeData .)
Public methodInternalCreateDefault (Inherited from ContentData.)
Protected methodLoadData(Stream) (Overrides ContentData LoadData(Stream).)
Public methodLoadData(MeshAnimation MeshAnimationData)
Public methodToString (Inherited from ContentData.)
Public methodUpdateFrameTime
Top
Fields

  NameDescription
Protected fieldContentChanged (Inherited from ContentData.)
Top
Properties

  NameDescription
Protected propertyAllowCreationIfContentNotFound (Inherited from ContentData.)
Public propertyCurrentFrame
Public propertyDuration
Public propertyFrames
Public propertyFramesPerSecond
Public propertyIsDisposed (Inherited from ContentData.)
Public propertyMetaData (Inherited from ContentData.)
Public propertyName (Inherited from ContentData.)
Public propertyNumberOfFrames
Top
Remarks

Tests: DeltaEngine.Rendering3D.Tests.MeshAnimationTests
Examples

3 unit tests call DeltaEngine.Rendering3D.MeshAnimation
[Test, CloseAfterFirstFrame]
public void CreateMeshAnimationByCreationData()
{
    MeshAnimation animation = CreateAnimationWith75Frames(FramesPerSecond);
    Assert.AreEqual(NumberOfAnimationFrames, animation.NumberOfFrames);
    Assert.AreEqual(FramesPerSecond, animation.FramesPerSecond);
    Assert.AreEqual(NumberOfAnimationFrames, animation.Frames.Length);
    Assert.AreEqual(3, animation.Duration);
}
[Test, CloseAfterFirstFrame]
public void CreationTwoGeometriesWithSameArgumentsStillResultsInDifferentObjects()
{
    var animationData1 = new MeshAnimationCreationData(5, 5);
    var animationData2 = new MeshAnimationCreationData(5, 5);
    Assert.IsFalse(animationData1.Equals(animationData2));
    var animation1 = ContentLoader.Create<MeshAnimation>(animationData1);
    var animation2 = ContentLoader.Create<MeshAnimation>(animationData2);
    Assert.AreNotEqual(animation1, animation2);
}
[Test]
public void ShowWavingSkinnedRectangleFromModelData()
{
    var geometry = CreateSkinnedGeometry();
    var skinnedMesh = new Mesh(geometry,
        new Material(ShaderFlags.TexturedSkinned, "DeltaEngineLogoOpaque"));
    skinnedMesh.Animation = CreateWavingMeshAnimationWith60Fps();
    new Model(new ModelData(skinnedMesh), Vector3D.Zero);
}
See Also