Namespace: DeltaEngine.Rendering3D.Shapes
Assembly: DeltaEngine.Rendering3D.Shapes (in DeltaEngine.Rendering3D.Shapes.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Rendering3D.Shapes.Tests.Grid3DTests
2 unit tests call DeltaEngine.Rendering3D.Shapes.Grid3D.Position
Assembly: DeltaEngine.Rendering3D.Shapes (in DeltaEngine.Rendering3D.Shapes.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: Vector3DRemarks
Examples
[Test] public void RenderGridWithCenterInOtherPosition() { var grid = new Grid3D(new Vector3D(5, 5, 0), new Size(1)); new Line3D(Vector3D.Zero, Vector3D.UnitX, Color.Red); new Line3D(Vector3D.Zero, Vector3D.UnitY, Color.Green); new Line3D(Vector3D.Zero, Vector3D.UnitZ, Color.Blue); AssertQuadraticGrid(1, grid); new Line3D(new Vector3D(5, 5, 0), new Vector3D(5, 5, 1), Color.Blue); foreach (var line in grid.lines) Assert.IsTrue(line.IsActive); Assert.AreEqual(new Vector3D(5, 5, 0), grid.Position); }
[Test] public void UpdateCenterOfGrid() { var grid = new Grid3D(new Size(1)); Assert.AreEqual(Vector3D.Zero, grid.Position); grid.Position = new Vector3D(1, 1, 0); Assert.AreEqual(4, EntitiesRunner.Current.GetEntitiesOfType<Line3D>().Count); Assert.AreEqual(new Vector3D(1, 1, 0), grid.Position); }
See Also