Struct BoundingSphere
Represents a bounding sphere.
Implements
Inherited Members
Namespace: Evergine.Mathematics
Assembly: Evergine.Mathematics.dll
Syntax
public struct BoundingSphere : IEquatable<BoundingSphere>
Constructors
BoundingSphere(Vector3, float)
Initializes a new instance of the BoundingSphere struct.
Declaration
public BoundingSphere(Vector3 center, float radius)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | center | The center. |
float | radius | The radius. |
Fields
Center
Sphere center.
Declaration
public Vector3 Center
Field Value
Type | Description |
---|---|
Vector3 |
Radius
Sphere radius.
Declaration
public float Radius
Field Value
Type | Description |
---|---|
float |
Methods
Contains(BoundingBox)
Determines whether [contains] [the specified box].
Declaration
public ContainmentType Contains(BoundingBox box)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | box | The box. |
Returns
Type | Description |
---|---|
ContainmentType | The result. |
Contains(ref BoundingBox, out ContainmentType)
Determines whether [contains] [the specified box].
Declaration
public void Contains(ref BoundingBox box, out ContainmentType result)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | box | The box. |
ContainmentType | result | The result. |
Contains(BoundingFrustum)
Determines whether [contains] [the specified frustum].
Declaration
public ContainmentType Contains(BoundingFrustum frustum)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustum | frustum | The frustum. |
Returns
Type | Description |
---|---|
ContainmentType | The result. |
Contains(BoundingSphere)
Determines whether [contains] [the specified sphere].
Declaration
public ContainmentType Contains(BoundingSphere sphere)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | sphere | The sphere. |
Returns
Type | Description |
---|---|
ContainmentType | The result. |
Contains(ref BoundingSphere, out ContainmentType)
Determines whether [contains] [the specified sphere].
Declaration
public void Contains(ref BoundingSphere sphere, out ContainmentType result)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | sphere | The sphere. |
ContainmentType | result | The result. |
Contains(Vector3)
Determines whether [contains] [the specified point].
Declaration
public ContainmentType Contains(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point | The point. |
Returns
Type | Description |
---|---|
ContainmentType | The result. |
Contains(ref Vector3, out ContainmentType)
Determines whether [contains] [the specified point].
Declaration
public void Contains(ref Vector3 point, out ContainmentType result)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point | The point. |
ContainmentType | result | The result. |
CreateFromBoundingBox(BoundingBox)
Creates from bounding box.
Declaration
public static BoundingSphere CreateFromBoundingBox(BoundingBox box)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | box | The box. |
Returns
Type | Description |
---|---|
BoundingSphere | The result. |
CreateFromBoundingBox(ref BoundingBox, out BoundingSphere)
Creates from bounding box.
Declaration
public static void CreateFromBoundingBox(ref BoundingBox box, out BoundingSphere result)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | box | The box. |
BoundingSphere | result | The result. |
CreateFromFrustum(BoundingFrustum)
Creates from frustum.
Declaration
public static BoundingSphere CreateFromFrustum(BoundingFrustum frustum)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustum | frustum | The frustum. |
Returns
Type | Description |
---|---|
BoundingSphere | The result. |
CreateFromPoints(IEnumerable<Vector3>)
Creates from points.
Declaration
public static BoundingSphere CreateFromPoints(IEnumerable<Vector3> points)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<Vector3> | points | The points. |
Returns
Type | Description |
---|---|
BoundingSphere | The result. |
CreateMerged(BoundingSphere, BoundingSphere)
Creates the merged.
Declaration
public static BoundingSphere CreateMerged(BoundingSphere original, BoundingSphere additional)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | original | The original. |
BoundingSphere | additional | The additional. |
Returns
Type | Description |
---|---|
BoundingSphere | The result. |
CreateMerged(ref BoundingSphere, ref BoundingSphere, out BoundingSphere)
Creates the merged.
Declaration
public static void CreateMerged(ref BoundingSphere original, ref BoundingSphere additional, out BoundingSphere result)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | original | The original. |
BoundingSphere | additional | The additional. |
BoundingSphere | result | The result. |
Equals(BoundingSphere)
Equalses the specified other.
Declaration
public bool Equals(BoundingSphere other)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | other | The other. |
Returns
Type | Description |
---|---|
bool | The result. |
Equals(ref BoundingSphere)
Equalses the specified other.
Declaration
public bool Equals(ref BoundingSphere other)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | other | The other. |
Returns
Type | Description |
---|---|
bool | The result. |
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Intersects(BoundingBox)
Intersectses the specified box.
Declaration
public bool Intersects(BoundingBox box)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | box | The box. |
Returns
Type | Description |
---|---|
bool | The result. |
Intersects(ref BoundingBox, out bool)
Intersectses the specified box.
Declaration
public void Intersects(ref BoundingBox box, out bool result)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | box | The box. |
bool | result | if set to |
Intersects(BoundingFrustum)
Intersectses the specified frustum.
Declaration
public bool Intersects(BoundingFrustum frustum)
Parameters
Type | Name | Description |
---|---|---|
BoundingFrustum | frustum | The frustum. |
Returns
Type | Description |
---|---|
bool | The result. |
Intersects(BoundingSphere)
Intersectses the specified sphere.
Declaration
public bool Intersects(BoundingSphere sphere)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | sphere | The sphere. |
Returns
Type | Description |
---|---|
bool | The result. |
Intersects(ref BoundingSphere, out bool)
Intersectses the specified sphere.
Declaration
public void Intersects(ref BoundingSphere sphere, out bool result)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | sphere | The sphere. |
bool | result | if set to |
Intersects(Plane)
Intersectses the specified plane.
Declaration
public PlaneIntersectionType Intersects(Plane plane)
Parameters
Type | Name | Description |
---|---|---|
Plane | plane | The plane. |
Returns
Type | Description |
---|---|
PlaneIntersectionType | The result. |
Intersects(ref Plane, out PlaneIntersectionType)
Intersectses the specified plane.
Declaration
public void Intersects(ref Plane plane, out PlaneIntersectionType result)
Parameters
Type | Name | Description |
---|---|---|
Plane | plane | The plane. |
PlaneIntersectionType | result | The result. |
Intersects(Ray)
Intersectses the specified ray.
Declaration
public float? Intersects(Ray ray)
Parameters
Type | Name | Description |
---|---|---|
Ray | ray | The ray. |
Returns
Type | Description |
---|---|
float? | The result. |
Intersects(ref Ray, out float?)
Intersectses the specified ray.
Declaration
public void Intersects(ref Ray ray, out float? result)
Parameters
Type | Name | Description |
---|---|---|
Ray | ray | The ray. |
float? | result | The result. |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents this instance. |
Overrides
Transform(Matrix4x4)
Transforms the specified matrix.
Declaration
public BoundingSphere Transform(Matrix4x4 matrix)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The matrix. |
Returns
Type | Description |
---|---|
BoundingSphere | The result. |
Transform(ref Matrix4x4, out BoundingSphere)
Transforms the specified matrix.
Declaration
public void Transform(ref Matrix4x4 matrix, out BoundingSphere result)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | matrix | The matrix. |
BoundingSphere | result | The result. |
Operators
operator ==(BoundingSphere, BoundingSphere)
Implements the operator ==.
Declaration
public static bool operator ==(BoundingSphere a, BoundingSphere b)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | a | First bounding sphere. |
BoundingSphere | b | Second bounding sphere. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator !=(BoundingSphere, BoundingSphere)
Implements the operator !=.
Declaration
public static bool operator !=(BoundingSphere a, BoundingSphere b)
Parameters
Type | Name | Description |
---|---|---|
BoundingSphere | a | First bounding sphere. |
BoundingSphere | b | Second bounding sphere. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |