Mesh ClassDelta Engine Documentation
3D geometry with material information ready to be rendered in a scene View code on GitHub
Inheritance Hierarchy

System Object
  DeltaEngine.Content ContentData
    DeltaEngine.Rendering3D Mesh
      DeltaEngine.Rendering3D PlaneQuad
      DeltaEngine.Rendering3D.Shapes BoxMesh
      DeltaEngine.Rendering3D.Shapes ConeMesh

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

public class Mesh : ContentData

The Mesh type exposes the following members.

Constructors

  NameDescription
Public methodMesh(String)
Initializes a new instance of the Mesh class
Public methodMesh(Geometry, Material)
Initializes a new instance of the Mesh 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 (Overrides ContentData LoadData(Stream).)
Public methodToString (Inherited from ContentData.)
Top
Fields

  NameDescription
Protected fieldContentChanged (Inherited from ContentData.)
Top
Properties

  NameDescription
Protected propertyAllowCreationIfContentNotFound (Inherited from ContentData.)
Public propertyAnimation
Public propertyGeometry
Public propertyIsAnimated
Public propertyIsDisposed (Inherited from ContentData.)
Public propertyLocalTransform
Public propertyMaterial
Public propertyMetaData (Inherited from ContentData.)
Public propertyName (Inherited from ContentData.)
Top
Remarks

Tests: DeltaEngine.Rendering3D.Tests.MeshAnimationTests
Examples

6 unit tests call DeltaEngine.Rendering3D.Mesh
[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