Sphere Type
Describes a sphere in 3D-space for bounding operations. Copied from - https://github.com/MonoGame/MonoGame/blob/v3.8/MonoGame.Framework/BoundingSphere.cs
Constructors
Constructor | Description |
Full Usage:
Sphere(center, radius)
Parameters:
Vector3
-
The sphere center.
radius : float32
-
The sphere radius.
|
Constructs a bounding sphere with the specified center and radius.
|
Instance members
Instance member | Description |
Full Usage:
this.Contains
Parameters:
Box3
-
The box for testing.
Returns: ContainmentType
The containment type.
|
Test if a bounding box is fully inside, outside, or just intersecting the sphere. NOTE: this allocates an array on every call! TODO: see if we can reasonably remove said allocation.
|
Full Usage:
this.Contains
Parameters:
inref<Box3>
-
The box for testing.
result : byref<ContainmentType>
-
The containment type as an output parameter.
|
Test if a bounding box is fully inside, outside, or just intersecting the sphere.
|
Full Usage:
this.Contains
Parameters:
Frustum
-
The frustum for testing.
Returns: ContainmentType
The containment type.
|
Test if a frustum is fully inside, outside, or just intersecting the sphere.
|
Full Usage:
this.Contains
Parameters:
inref<Frustum>
-
The frustum for testing.
result : byref<ContainmentType>
-
The containment type as an output parameter.
|
Test if a frustum is fully inside, outside, or just intersecting the sphere.
|
Full Usage:
this.Contains
Parameters:
Sphere
-
The other sphere for testing.
Returns: ContainmentType
The containment type.
|
Test if a sphere is fully inside, outside, or just intersecting the sphere.
|
Full Usage:
this.Contains
Parameters:
inref<Sphere>
-
The other sphere for testing.
result : byref<ContainmentType>
-
The containment type as an output parameter.
|
Test if a sphere is fully inside, outside, or just intersecting the sphere.
|
Full Usage:
this.Contains
Parameters:
Vector3
-
The vector in 3D-space for testing.
Returns: ContainmentType
The containment type.
|
Test if a point is fully inside, outside, or just intersecting the sphere.
|
Full Usage:
this.Contains
Parameters:
inref<Vector3>
-
The vector in 3D-space for testing.
result : byref<ContainmentType>
-
The containment type as an output parameter.
|
Test if a point is fully inside, outside, or just intersecting the sphere.
|
|
|
Full Usage:
this.Equals
Parameters:
obj
-
The Object to compare.
Returns: bool
true if the instances are equal; false otherwise.
Modifiers: abstract |
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
this.Intersects
Parameters:
Plane3
-
The plane for testing.
Returns: PlaneIntersectionType
Type of intersection.
|
|
Full Usage:
this.Intersects
Parameters:
inref<Plane3>
-
The plane for testing.
result : byref<PlaneIntersectionType>
-
Type of intersection as an output parameter.
|
|
|
|
|
|
|
|
|
Returns a String representation of this Sphere in the format: {Center:[Sphere.Center] Radius:[Sphere.Radius]} |
|
|
|
Static members
Static member | Description |
|
|
|
|
|
|
Full Usage:
Sphere.CreateFromPoints(points)
Parameters:
IEnumerable<Vector3>
-
List of point to create the sphere from.
Returns: Sphere
The new Sphere.
|
|
|
|
|