BoundingBoxTests CreateBoundingBoxByPoints Method Delta Engine Documentation

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

public void CreateBoundingBoxByPoints()
Examples

[Test]
public void CreateBoundingBoxByPoints()
{
    Assert.Throws<BoundingBox.NoPointsSpecified>(() => new BoundingBox(null));
    Assert.Throws<BoundingBox.NoPointsSpecified>(() => new BoundingBox(new Vector3D[0]));
    var points = new[] { new Vector3D(2, 5, 7), new Vector3D(6, 4, 2), new Vector3D(1, 7, 9), };
    var boundingBox = new BoundingBox(points);
    Assert.AreEqual(boundingBox.Min, new Vector3D(1, 4, 2));
    Assert.AreEqual(boundingBox.Max, new Vector3D(6, 7, 9));
}
See Also