Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.Datatypes.BoundingBoxTests
2 unit tests call DeltaEngine.Datatypes.BoundingBox.IsColliding(DeltaEngine.Datatypes.BoundingSphere)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- sphere
- Type: DeltaEngine.Datatypes BoundingSphere
Return Value
Type: BooleanRemarks
Examples
[Test] public void IntersectBoundingBoxWithBoundingBox() { var box1 = new BoundingBox(Vector3D.Zero, Vector3D.One); var box2 = new BoundingBox(Vector3D.One / 2, Vector3D.One); Assert.IsTrue(box1.IsColliding(box2)); var box3 = new BoundingBox(Vector3D.One * 2, Vector3D.One); Assert.IsFalse(box1.IsColliding(box3)); }
[Test] public void IntersectBoundingBoxWithBoundingSphere() { var boundingBox = new BoundingBox(Vector3D.Zero, Vector3D.One); var sphere = new BoundingSphere(Vector3D.Zero, 0.5f); Assert.IsTrue(boundingBox.IsColliding(sphere)); }
See Also