BoundingSphereTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Tests.Datatypes BoundingSphereTests

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

public class BoundingSphereTests

The BoundingSphereTests type exposes the following members.

Constructors

  NameDescription
Public methodBoundingSphereTests
Initializes a new instance of the BoundingSphereTests class
Top
Methods

  NameDescription
Public methodCreateBoundingSphere
Public methodIntersectBoundingSphereWithBoundingSphere
Top
Examples

[Test]
public void CreateBoundingSphere()
{
    var boundingSphere = new BoundingSphere(Vector3D.One, 2.0f);
    Assert.AreEqual(Vector3D.One, boundingSphere.Center);
    Assert.AreEqual(2.0f, boundingSphere.Radius);
}
[Test]
public void IntersectBoundingSphereWithBoundingSphere()
{
    var sphere1 = new BoundingSphere(Vector3D.Zero, 1.0f);
    var sphere2 = new BoundingSphere(Vector3D.One, 1.0f);
    Assert.IsTrue(sphere1.IsColliding(sphere2));
}
See Also