Consists of a number of frames of animation. Defaults to 30fps
View code on GitHub
Inheritance Hierarchy
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
The MeshAnimation type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MeshAnimation(String) | Initializes a new instance of the MeshAnimation class | |
MeshAnimation(MeshAnimationCreationData) | Initializes a new instance of the MeshAnimation class |
Methods
Name | Description | |
---|---|---|
CreateDefault | (Inherited from ContentData.) | |
Dispose | (Inherited from ContentData.) | |
DisposeData | (Overrides ContentData DisposeData .) | |
InternalCreateDefault | (Inherited from ContentData.) | |
LoadData(Stream) | (Overrides ContentData LoadData(Stream).) | |
LoadData(MeshAnimation MeshAnimationData) | ||
ToString | (Inherited from ContentData.) | |
UpdateFrameTime |
Fields
Name | Description | |
---|---|---|
ContentChanged | (Inherited from ContentData.) |
Properties
Name | Description | |
---|---|---|
AllowCreationIfContentNotFound | (Inherited from ContentData.) | |
CurrentFrame | ||
Duration | ||
Frames | ||
FramesPerSecond | ||
IsDisposed | (Inherited from ContentData.) | |
MetaData | (Inherited from ContentData.) | |
Name | (Inherited from ContentData.) | |
NumberOfFrames |
Remarks
Examples
[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