| GeometryHelperComputeCircumscribedSphere Method (Vector3F, Vector3F, Vector3F, Vector3F, Single, Vector3F) |
Computes a sphere where all given points touch the surface.
Namespace: DigitalRune.GeometryAssembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax public static void ComputeCircumscribedSphere(
Vector3F point0,
Vector3F point1,
Vector3F point2,
Vector3F point3,
out float radius,
out Vector3F center
)
Public Shared Sub ComputeCircumscribedSphere (
point0 As Vector3F,
point1 As Vector3F,
point2 As Vector3F,
point3 As Vector3F,
<OutAttribute> ByRef radius As Single,
<OutAttribute> ByRef center As Vector3F
)
public:
static void ComputeCircumscribedSphere(
Vector3F point0,
Vector3F point1,
Vector3F point2,
Vector3F point3,
[OutAttribute] float% radius,
[OutAttribute] Vector3F% center
)
static member ComputeCircumscribedSphere :
point0 : Vector3F *
point1 : Vector3F *
point2 : Vector3F *
point3 : Vector3F *
radius : float32 byref *
center : Vector3F byref -> unit
Parameters
- point0
- Type: DigitalRune.Mathematics.AlgebraVector3F
The first point. - point1
- Type: DigitalRune.Mathematics.AlgebraVector3F
The second point. - point2
- Type: DigitalRune.Mathematics.AlgebraVector3F
The third point. - point3
- Type: DigitalRune.Mathematics.AlgebraVector3F
The fourth point. - radius
- Type: SystemSingle
The sphere radius. - center
- Type: DigitalRune.Mathematics.AlgebraVector3F
The sphere center.
Remarks
A circumscribed ball is not necessarily the minimal sphere that contains the given points.
There might be a smaller sphere where the surface touches only 2 points and the other points
are inside the sphere. To get a minimal sphere call ComputeBoundingSphere(IEnumerableVector3F, Single, Vector3F).
The given points must form a tetrahedron with a volume greater than 0; otherwise, the
result is not defined (radius is NaN).
See Also