Contains the center position in 3D and radius. Allows quick collision and intersection tests.
View code on GitHub
Namespace: DeltaEngine.DatatypesAssembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The BoundingSphere type exposes the following members.
Constructors
Name | Description | |
---|---|---|
BoundingSphere | Initializes a new instance of the BoundingSphere class |
Methods
Name | Description | |
---|---|---|
IsColliding |
Properties
Name | Description | |
---|---|---|
Center | ||
Radius |
Remarks
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