Inheritance Hierarchy
DeltaEngine.Platforms TestWithMocksOrVisually
DeltaEngine.Rendering3D.Tests PlaneQuadTests
Namespace: DeltaEngine.Rendering3D.Tests
Assembly: DeltaEngine.Rendering3D.Tests (in DeltaEngine.Rendering3D.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The PlaneQuadTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PlaneQuadTests | Initializes a new instance of the PlaneQuadTests class |
Methods
Name | Description | |
---|---|---|
AdvanceTimeAndUpdateEntities | (Inherited from TestWithMocksOrVisually.) | |
ChangeSize | ||
DrawFourPlanesWithoutCulling | ||
DrawRedPlane | ||
DrawUncoloredPlane | ||
InitializeResolver | (Inherited from TestWithMocksOrVisually.) | |
RegisterMock T | (Inherited from TestWithMocksOrVisually.) | |
Resolve T | (Inherited from TestWithMocksOrVisually.) | |
RunAfterFirstFrame | (Inherited from TestWithMocksOrVisually.) | |
RunTestAndDisposeResolverWhenDone | (Inherited from TestWithMocksOrVisually.) | |
VerticesShouldNotBeWindedClockWise | ||
WindingOfVerticesShouldBeCounterClockWise |
Properties
Name | Description | |
---|---|---|
IsMockResolver | (Inherited from TestWithMocksOrVisually.) |
Examples
[Test, ApproveFirstFrameScreenshot] public void DrawRedPlane() { SetUpCamera(); new Model(new ModelData(CreatePlaneQuad()), Vector3D.Zero); }
[Test, ApproveFirstFrameScreenshot] public void DrawUncoloredPlane() { SetUpCamera(); new Model(new ModelData(CreateUncoloredPlaneQuad()), Vector3D.Zero); }
[Test, ApproveFirstFrameScreenshot] public void DrawFourPlanesWithoutCulling() { Resolve<Device>().CullingMode = Culling.Disabled; SetUpCamera(-3); new Model(new ModelData(CreateUncoloredPlaneQuad()), Vector3D.Zero); new Model(new ModelData(CreatePlaneQuad(Color.Red)), Vector3D.UnitX * Size.Width); new Model(new ModelData(CreatePlaneQuad(Color.Green)), Vector3D.UnitY); new Model(new ModelData(CreatePlaneQuad(Color.Blue)), Vector3D.UnitZ * Size.Height); }
[Test, CloseAfterFirstFrame] public void ChangeSize() { PlaneQuad quad = CreatePlaneQuad(); Assert.AreEqual(Size, quad.Size); quad.Size = 2 * Size; Assert.AreEqual(2 * Size, quad.Size); }
[Test, CloseAfterFirstFrame] public void WindingOfVerticesShouldBeCounterClockWise() { if (!StackTraceExtensions.IsStartedFromNCrunch()) return; //ncrunch: no coverage MockGeometry geometry = CreateMockGeometry(); var indices = new short[] { 0, 1, 2 }; geometry.SetData(CreateVertexData(), indices); AssertVertices(geometry, indices); AssertGeometryIsCounterClockWise(geometry); }
[Test, CloseAfterFirstFrame] public void VerticesShouldNotBeWindedClockWise() { if (!StackTraceExtensions.IsStartedFromNCrunch()) return; //ncrunch: no coverage MockGeometry geometry = CreateMockGeometry(); var indices = new short[] { 2, 1, 0 }; geometry.SetData(CreateVertexData(), indices); AssertVertices(geometry, indices); AssertGeometryIsClockWise(geometry); }
See Also