Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
VRageMath.BoundingSphere Struct Reference

Defines a sphere. More...

Inheritance diagram for VRageMath.BoundingSphere:

Public Member Functions

 BoundingSphere (Vector3 center, float radius)
 Creates a new instance of BoundingSphere. More...
 
bool Equals (BoundingSphere other)
 Determines whether the specified BoundingSphere is equal to the current BoundingSphere. More...
 
override bool Equals (object obj)
 Determines whether the specified Object is equal to the BoundingSphere. More...
 
override int GetHashCode ()
 Gets the hash code for this instance. More...
 
override string ToString ()
 Returns a String that represents the current BoundingSphere. More...
 
bool Intersects (BoundingBox box)
 Checks whether the current BoundingSphere intersects with a specified BoundingBox. More...
 
void Intersects (ref BoundingBox box, out bool result)
 Checks whether the current BoundingSphere intersects a BoundingBox. More...
 
bool Intersects (BoundingFrustum frustum)
 Checks whether the current BoundingSphere intersects with a specified BoundingFrustum. More...
 
PlaneIntersectionType Intersects (Plane plane)
 Checks whether the current BoundingSphere intersects with a specified Plane. More...
 
void Intersects (ref Plane plane, out PlaneIntersectionType result)
 Checks whether the current BoundingSphere intersects a Plane. More...
 
float Intersects (Ray ray)
 Checks whether the current BoundingSphere intersects with a specified Ray. More...
 
void Intersects (ref Ray ray, out float?result)
 Checks whether the current BoundingSphere intersects a Ray. More...
 
bool Intersects (BoundingSphere sphere)
 Checks whether the current BoundingSphere intersects with a specified BoundingSphere. More...
 
void Intersects (ref BoundingSphere sphere, out bool result)
 Checks whether the current BoundingSphere intersects another BoundingSphere. More...
 
ContainmentType Contains (BoundingBox box)
 Checks whether the current BoundingSphere contains the specified BoundingBox. More...
 
void Contains (ref BoundingBox box, out ContainmentType result)
 Checks whether the current BoundingSphere contains the specified BoundingBox. More...
 
ContainmentType Contains (BoundingFrustum frustum)
 Checks whether the current BoundingSphere contains the specified BoundingFrustum. More...
 
ContainmentType Contains (Vector3 point)
 Checks whether the current BoundingSphere contains the specified point. More...
 
void Contains (ref Vector3 point, out ContainmentType result)
 Checks whether the current BoundingSphere contains the specified point. More...
 
ContainmentType Contains (BoundingSphere sphere)
 Checks whether the current BoundingSphere contains the specified BoundingSphere. More...
 
void Contains (ref BoundingSphere sphere, out ContainmentType result)
 Checks whether the current BoundingSphere contains the specified BoundingSphere. More...
 
BoundingSphere Transform (Matrix matrix)
 Translates and scales the BoundingSphere using a given Matrix. More...
 
void Transform (ref Matrix matrix, out BoundingSphere result)
 Translates and scales the BoundingSphere using a given Matrix. More...
 
bool IntersectRaySphere (Ray ray, out float tmin, out float tmax)
 
BoundingSphere Include (BoundingSphere sphere)
 

Static Public Member Functions

static bool operator== (BoundingSphere a, BoundingSphere b)
 Determines whether two instances of BoundingSphere are equal. More...
 
static bool operator!= (BoundingSphere a, BoundingSphere b)
 Determines whether two instances of BoundingSphere are not equal. More...
 
static BoundingSphere CreateMerged (BoundingSphere original, BoundingSphere additional)
 Creates a BoundingSphere that contains the two specified BoundingSphere instances. More...
 
static void CreateMerged (ref BoundingSphere original, ref BoundingSphere additional, out BoundingSphere result)
 Creates a BoundingSphere that contains the two specified BoundingSphere instances. More...
 
static BoundingSphere CreateFromBoundingBox (BoundingBox box)
 Creates the smallest BoundingSphere that can contain a specified BoundingBox. More...
 
static void CreateFromBoundingBox (ref BoundingBox box, out BoundingSphere result)
 Creates the smallest BoundingSphere that can contain a specified BoundingBox. More...
 
static BoundingSphere CreateFromPoints (IEnumerable< Vector3 > points)
 Creates a BoundingSphere that can contain a specified list of points. More...
 
static BoundingSphere CreateFromFrustum (BoundingFrustum frustum)
 Creates the smallest BoundingSphere that can contain a specified BoundingFrustum. More...
 
static void Include (ref BoundingSphere sphere, ref BoundingSphere otherSphere)
 

Public Attributes

Vector3 Center
 The center point of the sphere. More...
 
float Radius
 The radius of the sphere. More...
 

Detailed Description

Defines a sphere.

Definition at line 11 of file BoundingSphere.cs.

Constructor & Destructor Documentation

VRageMath.BoundingSphere.BoundingSphere ( Vector3  center,
float  radius 
)
inline

Creates a new instance of BoundingSphere.

Parameters
centerCenter point of the sphere.
radiusRadius of the sphere.

Definition at line 26 of file BoundingSphere.cs.

Member Function Documentation

ContainmentType VRageMath.BoundingSphere.Contains ( BoundingBox  box)
inline

Checks whether the current BoundingSphere contains the specified BoundingBox.

Parameters
boxThe BoundingBox to check against the current BoundingSphere.

Definition at line 373 of file BoundingSphere.cs.

void VRageMath.BoundingSphere.Contains ( ref BoundingBox  box,
out ContainmentType  result 
)
inline

Checks whether the current BoundingSphere contains the specified BoundingBox.

Parameters
boxThe BoundingBox to test for overlap.
result[OutAttribute] Enumeration indicating the extent of overlap.

Definition at line 424 of file BoundingSphere.cs.

ContainmentType VRageMath.BoundingSphere.Contains ( BoundingFrustum  frustum)
inline

Checks whether the current BoundingSphere contains the specified BoundingFrustum.

Parameters
frustumThe BoundingFrustum to check against the current BoundingSphere.

Definition at line 485 of file BoundingSphere.cs.

ContainmentType VRageMath.BoundingSphere.Contains ( Vector3  point)
inline

Checks whether the current BoundingSphere contains the specified point.

Parameters
pointThe point to check against the current BoundingSphere.

Definition at line 506 of file BoundingSphere.cs.

void VRageMath.BoundingSphere.Contains ( ref Vector3  point,
out ContainmentType  result 
)
inline

Checks whether the current BoundingSphere contains the specified point.

Parameters
pointThe point to test for overlap.
result[OutAttribute] Enumeration indicating the extent of overlap.

Definition at line 515 of file BoundingSphere.cs.

ContainmentType VRageMath.BoundingSphere.Contains ( BoundingSphere  sphere)
inline

Checks whether the current BoundingSphere contains the specified BoundingSphere.

Parameters
sphereThe BoundingSphere to check against the current BoundingSphere.

Definition at line 526 of file BoundingSphere.cs.

void VRageMath.BoundingSphere.Contains ( ref BoundingSphere  sphere,
out ContainmentType  result 
)
inline

Checks whether the current BoundingSphere contains the specified BoundingSphere.

Parameters
sphereThe BoundingSphere to test for overlap.
result[OutAttribute] Enumeration indicating the extent of overlap.

Definition at line 541 of file BoundingSphere.cs.

static BoundingSphere VRageMath.BoundingSphere.CreateFromBoundingBox ( BoundingBox  box)
inlinestatic

Creates the smallest BoundingSphere that can contain a specified BoundingBox.

Parameters
boxThe BoundingBox to create the BoundingSphere from.

Definition at line 160 of file BoundingSphere.cs.

static void VRageMath.BoundingSphere.CreateFromBoundingBox ( ref BoundingBox  box,
out BoundingSphere  result 
)
inlinestatic

Creates the smallest BoundingSphere that can contain a specified BoundingBox.

Parameters
boxThe BoundingBox to create the BoundingSphere from.
result[OutAttribute] The created BoundingSphere.

Definition at line 172 of file BoundingSphere.cs.

static BoundingSphere VRageMath.BoundingSphere.CreateFromFrustum ( BoundingFrustum  frustum)
inlinestatic

Creates the smallest BoundingSphere that can contain a specified BoundingFrustum.

Parameters
frustumThe BoundingFrustum to create the BoundingSphere with.

Definition at line 262 of file BoundingSphere.cs.

static BoundingSphere VRageMath.BoundingSphere.CreateFromPoints ( IEnumerable< Vector3 points)
inlinestatic

Creates a BoundingSphere that can contain a specified list of points.

Parameters
pointsList of points the BoundingSphere must contain.

Definition at line 182 of file BoundingSphere.cs.

static BoundingSphere VRageMath.BoundingSphere.CreateMerged ( BoundingSphere  original,
BoundingSphere  additional 
)
inlinestatic

Creates a BoundingSphere that contains the two specified BoundingSphere instances.

Parameters
originalBoundingSphere to be merged.
additionalBoundingSphere to be merged.

Definition at line 102 of file BoundingSphere.cs.

static void VRageMath.BoundingSphere.CreateMerged ( ref BoundingSphere  original,
ref BoundingSphere  additional,
out BoundingSphere  result 
)
inlinestatic

Creates a BoundingSphere that contains the two specified BoundingSphere instances.

Parameters
originalBoundingSphere to be merged.
additionalBoundingSphere to be merged.
result[OutAttribute] The created BoundingSphere.

Definition at line 129 of file BoundingSphere.cs.

bool VRageMath.BoundingSphere.Equals ( BoundingSphere  other)
inline

Determines whether the specified BoundingSphere is equal to the current BoundingSphere.

Parameters
otherThe BoundingSphere to compare with the current BoundingSphere.

Definition at line 57 of file BoundingSphere.cs.

override bool VRageMath.BoundingSphere.Equals ( object  obj)
inline

Determines whether the specified Object is equal to the BoundingSphere.

Parameters
objThe Object to compare with the current BoundingSphere.

Definition at line 69 of file BoundingSphere.cs.

override int VRageMath.BoundingSphere.GetHashCode ( )
inline

Gets the hash code for this instance.

Definition at line 80 of file BoundingSphere.cs.

BoundingSphere VRageMath.BoundingSphere.Include ( BoundingSphere  sphere)
inline

Definition at line 609 of file BoundingSphere.cs.

static void VRageMath.BoundingSphere.Include ( ref BoundingSphere  sphere,
ref BoundingSphere  otherSphere 
)
inlinestatic

Definition at line 615 of file BoundingSphere.cs.

bool VRageMath.BoundingSphere.IntersectRaySphere ( Ray  ray,
out float  tmin,
out float  tmax 
)
inline

Definition at line 583 of file BoundingSphere.cs.

bool VRageMath.BoundingSphere.Intersects ( BoundingBox  box)
inline

Checks whether the current BoundingSphere intersects with a specified BoundingBox.

Parameters
boxThe BoundingBox to check for intersection with the current BoundingSphere.

Definition at line 274 of file BoundingSphere.cs.

void VRageMath.BoundingSphere.Intersects ( ref BoundingBox  box,
out bool  result 
)
inline

Checks whether the current BoundingSphere intersects a BoundingBox.

Parameters
boxThe BoundingBox to check for intersection with.
result[OutAttribute] true if the BoundingSphere and BoundingBox intersect; false otherwise.

Definition at line 287 of file BoundingSphere.cs.

bool VRageMath.BoundingSphere.Intersects ( BoundingFrustum  frustum)
inline

Checks whether the current BoundingSphere intersects with a specified BoundingFrustum.

Parameters
frustumThe BoundingFrustum to check for intersection with the current BoundingSphere.

Definition at line 300 of file BoundingSphere.cs.

PlaneIntersectionType VRageMath.BoundingSphere.Intersects ( Plane  plane)
inline

Checks whether the current BoundingSphere intersects with a specified Plane.

Parameters
planeThe Plane to check for intersection with the current BoundingSphere.

Definition at line 311 of file BoundingSphere.cs.

void VRageMath.BoundingSphere.Intersects ( ref Plane  plane,
out PlaneIntersectionType  result 
)
inline

Checks whether the current BoundingSphere intersects a Plane.

Parameters
planeThe Plane to check for intersection with.
result[OutAttribute] An enumeration indicating whether the BoundingSphere intersects the Plane.

Definition at line 320 of file BoundingSphere.cs.

float VRageMath.BoundingSphere.Intersects ( Ray  ray)
inline

Checks whether the current BoundingSphere intersects with a specified Ray.

Parameters
rayThe Ray to check for intersection with the current BoundingSphere.

Definition at line 329 of file BoundingSphere.cs.

void VRageMath.BoundingSphere.Intersects ( ref Ray  ray,
out float?  result 
)
inline

Checks whether the current BoundingSphere intersects a Ray.

Parameters
rayThe Ray to check for intersection with.
result[OutAttribute] Distance at which the ray intersects the BoundingSphere or null if there is no intersection.

Definition at line 338 of file BoundingSphere.cs.

bool VRageMath.BoundingSphere.Intersects ( BoundingSphere  sphere)
inline

Checks whether the current BoundingSphere intersects with a specified BoundingSphere.

Parameters
sphereThe BoundingSphere to check for intersection with the current BoundingSphere.

Definition at line 347 of file BoundingSphere.cs.

void VRageMath.BoundingSphere.Intersects ( ref BoundingSphere  sphere,
out bool  result 
)
inline

Checks whether the current BoundingSphere intersects another BoundingSphere.

Parameters
sphereThe BoundingSphere to check for intersection with.
result[OutAttribute] true if the BoundingSphere instances intersect; false otherwise.

Definition at line 360 of file BoundingSphere.cs.

static bool VRageMath.BoundingSphere.operator!= ( BoundingSphere  a,
BoundingSphere  b 
)
inlinestatic

Determines whether two instances of BoundingSphere are not equal.

Parameters
aThe BoundingSphere to the left of the inequality operator.
bThe BoundingSphere to the right of the inequality operator.

Definition at line 45 of file BoundingSphere.cs.

static bool VRageMath.BoundingSphere.operator== ( BoundingSphere  a,
BoundingSphere  b 
)
inlinestatic

Determines whether two instances of BoundingSphere are equal.

Parameters
aThe object to the left of the equality operator.
bThe object to the right of the equality operator.

Definition at line 36 of file BoundingSphere.cs.

override string VRageMath.BoundingSphere.ToString ( )
inline

Returns a String that represents the current BoundingSphere.

Definition at line 88 of file BoundingSphere.cs.

BoundingSphere VRageMath.BoundingSphere.Transform ( Matrix  matrix)
inline

Translates and scales the BoundingSphere using a given Matrix.

Parameters
matrixA transformation matrix that might include translation, rotation, or uniform scaling. Note that BoundingSphere.Transform will not return correct results if there are non-uniform scaling, shears, or other unusual transforms in this transformation matrix. This is because there is no way to shear or non-uniformly scale a sphere. Such an operation would cause the sphere to lose its shape as a sphere.

Definition at line 562 of file BoundingSphere.cs.

void VRageMath.BoundingSphere.Transform ( ref Matrix  matrix,
out BoundingSphere  result 
)
inline

Translates and scales the BoundingSphere using a given Matrix.

Parameters
matrixA transformation matrix that might include translation, rotation, or uniform scaling. Note that BoundingSphere.Transform will not return correct results if there are non-uniform scaling, shears, or other unusual transforms in this transformation matrix. This is because there is no way to shear or non-uniformly scale a sphere. Such an operation would cause the sphere to lose its shape as a sphere.
result[OutAttribute] The transformed BoundingSphere.

Definition at line 575 of file BoundingSphere.cs.

Member Data Documentation

Vector3 VRageMath.BoundingSphere.Center

The center point of the sphere.

Definition at line 16 of file BoundingSphere.cs.

float VRageMath.BoundingSphere.Radius

The radius of the sphere.

Definition at line 20 of file BoundingSphere.cs.


The documentation for this struct was generated from the following file: