LightingTests ClassDelta Engine Documentation
Inheritance Hierarchy

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

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

public class LightingTests : TestWithMocksOrVisually

The LightingTests type exposes the following members.

Constructors

  NameDescription
Public methodLightingTests
Initializes a new instance of the LightingTests class
Top
Methods

  NameDescription
Protected methodAdvanceTimeAndUpdateEntities (Inherited from TestWithMocksOrVisually.)
Public methodDynamicLightChangeColorByRightClicking
Public methodInitializeResolver (Inherited from TestWithMocksOrVisually.)
Protected methodRegisterMock T  (Inherited from TestWithMocksOrVisually.)
Protected methodResolve T  (Inherited from TestWithMocksOrVisually.)
Protected methodRunAfterFirstFrame (Inherited from TestWithMocksOrVisually.)
Public methodRunTestAndDisposeResolverWhenDone (Inherited from TestWithMocksOrVisually.)
Public methodStaticLight
Top
Properties

  NameDescription
Protected propertyIsMockResolver (Inherited from TestWithMocksOrVisually.)
Top
Examples

[Test, ApproveFirstFrameScreenshot]
public void StaticLight()
{
    Camera.Current.Position = new Vector3D(0.0f, 4.0f, 2.0f);
    SunLight.Current = new SunLight(new Vector3D(1.0f, 0.0f, -1.0f), Color.Red);
    new RotatingBox(new Vector3D(-2.0f, 0.0f, 0.0f));
    new Box(Vector3D.Zero);
    new RotatingBox(new Vector3D(2.0f, 0.0f, 0.0f));
}
[Test]
public void DynamicLightChangeColorByRightClicking()
{
    Camera.Current.Position = 1.5f * Vector3D.One;
    SunLight.Current = new SunLight(Vector3D.One, colors[0]);
    var cube = new Box(Vector3D.Zero);
    cube.Start<UpdateLightDirection>();
    new Command(Command.RightClick, () =>
    { //ncrunch: no coverage start
        SunLight.Current.Color = colors[currentColor++ % colors.Length];
    }); //ncrunch: no coverage end
}
See Also