MeshTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Platforms TestWithMocksOrVisually
    DeltaEngine.Rendering3D.Tests MeshTests

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

public class MeshTests : TestWithMocksOrVisually

The MeshTests type exposes the following members.

Constructors

  NameDescription
Public methodMeshTests
Initializes a new instance of the MeshTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodCreateMeshDynamically
Public methodDrawRedLineYellowBoxAndSprite
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Public methodLoadMeshFromContent
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test, CloseAfterFirstFrame]
public void CreateMeshDynamically()
{
    var mesh = new Mesh(ContentLoader.Load<Geometry>("AnyGeometry"),
        ContentLoader.Load<Material>("AnyMaterial"));
    Assert.IsNotNull(mesh.Geometry);
    Assert.IsNotNull(mesh.Material);
    Assert.AreEqual(Matrix.Identity, mesh.LocalTransform);
}
[Test, CloseAfterFirstFrame]
public void LoadMeshFromContent()
{
    var mesh = ContentLoader.Load<Mesh>("AnyMeshCustomTransform");
    Assert.IsNotNull(mesh.Geometry);
    Assert.IsNotNull(mesh.Material);
    Assert.AreNotEqual(new Matrix(), mesh.LocalTransform);
    Assert.AreNotEqual(Matrix.Identity, mesh.LocalTransform);
}
[Test, ApproveFirstFrameScreenshot]
public void DrawRedLineYellowBoxAndSprite()
{
    new Sprite(new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo"),
        new Rectangle(0.8f, 0.3f, 0.1f, 0.1f));
    new Line3D(new Vector3D(1, -1, 0), new Vector3D(-1, 1, 0), Color.Red);
    new Box(Vector3D.One, Color.Yellow);
}
See Also