3D geometry with material information ready to be rendered in a scene
View code on GitHub
Inheritance Hierarchy
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
The Mesh type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | Mesh(String) | Initializes a new instance of the Mesh class |
![]() | Mesh(Geometry, Material) | Initializes a new instance of the Mesh class |
Methods
Name | Description | |
---|---|---|
![]() | CreateDefault | (Inherited from ContentData.) |
![]() | Dispose | (Inherited from ContentData.) |
![]() | DisposeData | (Overrides ContentData DisposeData .) |
![]() | InternalCreateDefault | (Inherited from ContentData.) |
![]() | LoadData | (Overrides ContentData LoadData(Stream).) |
![]() | ToString | (Inherited from ContentData.) |
Fields
Name | Description | |
---|---|---|
![]() | ContentChanged | (Inherited from ContentData.) |
Properties
Name | Description | |
---|---|---|
![]() | AllowCreationIfContentNotFound | (Inherited from ContentData.) |
![]() | Animation | |
![]() | Geometry | |
![]() | IsAnimated | |
![]() | IsDisposed | (Inherited from ContentData.) |
![]() | LocalTransform | |
![]() | Material | |
![]() | MetaData | (Inherited from ContentData.) |
![]() | Name | (Inherited from ContentData.) |
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