Entity3D Position Property Delta Engine Documentation

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

public Vector3D Position { get; set; }

Property Value

Type: Vector3D
Remarks

Tests: CreepyTowers.Tests.Collectables.CoinTests
Remarks

Tests: CreepyTowers.Tests.Towers.TowerTests
Examples

1 unit tests call DeltaEngine.Rendering3D.Entity3D.Position
[Test]
public void InitialValues()
{
    Assert.AreEqual(new Vector3D(1, 2, 3), coin.Position);
}
Examples

1 unit tests call DeltaEngine.Rendering3D.Entity3D.Position
[Test]
public void CreateTowerAtClickedPosition()
{
    var floor = new Plane(Vector3D.UnitY, 0.0f);
    new Command(pos =>
    { //ncrunch: no coverage start 
        var ray = Camera.Current.ScreenPointToRay(ScreenSpace.Current.ToPixelSpace(pos));
        var position = floor.Intersect(ray).Value;
        new Tower(TowerType.Water, position); //ncrunch: no coverage end
    }).Add(new MouseButtonTrigger(MouseButton.Left, State.Releasing));
}
See Also