Grid3D Dimension Property Delta Engine Documentation

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

public Size Dimension { get; set; }

Property Value

Type: Size
Remarks

Tests: DeltaEngine.Rendering3D.Shapes.Tests.Grid3DTests
Examples

2 unit tests call DeltaEngine.Rendering3D.Shapes.Grid3D.Dimension
[Test]
public void CheckGridDimension()
{
    var grid = CreateQuadraticGrid(10);
    Assert.AreEqual(new Size(10, 10), grid.Dimension);
    grid.Dimension = new Size(20, 20);
    Assert.AreEqual(new Size(20, 20), grid.Dimension);
}
[Test]
public void RedrawGridIfItChanges()
{
    var grid = new Grid3D(new Size(1));
    Assert.AreEqual(4, EntitiesRunner.Current.GetEntitiesOfType<Line3D>().Count);
    grid.Dimension = new Size(10);
    Assert.AreEqual(22, EntitiesRunner.Current.GetEntitiesOfType<Line3D>().Count);
}
See Also