Inheritance Hierarchy
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
The MeshTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
MeshTests | Initializes a new instance of the MeshTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
CreateMeshDynamically | ||
DrawRedLineYellowBoxAndSprite | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
LoadMeshFromContent | ||
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
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