-
Notifications
You must be signed in to change notification settings - Fork 124
VRageMath.BoundingSphereD
← Index ← Namespace Index
public struct BoundingSphereD: IEquatable<BoundingSphereD>
Defines a sphere.
Namespace: VRageMath
Assembly: VRage.Math.dll
Implements:
The center point of the sphere.
The radius of the sphere.
BoundingSphereD(Vector3D center, double radius)
static BoundingSphereD CreateFromBoundingBox(BoundingBoxD box)
Creates the smallest BoundingSphereD that can contain a specified BoundingBoxD.
static void CreateFromBoundingBox(ref BoundingBoxD box, out BoundingSphereD result)
Creates the smallest BoundingSphereD that can contain a specified BoundingBoxD.
static BoundingSphereD CreateFromFrustum(BoundingFrustumD frustum)
Creates the smallest BoundingSphereD that can contain a specified BoundingFrustum.
static BoundingSphereD CreateFromPoints(Vector3D[] points)
Creates a BoundingSphereD that can contain a specified list of points.
static BoundingSphereD CreateInvalid()
static BoundingSphereD CreateMerged(BoundingSphereD original, BoundingSphereD additional)
Creates a BoundingSphereD that contains the two specified BoundingSphereD instances.
Creates a BoundingSphereD that contains the two specified BoundingSphereD instances.
static void Include(ref BoundingSphereD sphere, ref BoundingSphereD otherSphere)
ContainmentType Contains(BoundingBoxD box)
Checks whether the current BoundingSphereD contains the specified BoundingBoxD.
void Contains(ref BoundingBoxD box, out ContainmentType result)
Checks whether the current BoundingSphereD contains the specified BoundingBoxD.
ContainmentType Contains(MyOrientedBoundingBoxD obox)
Checks whether the current BoundingSphereD contains the specified MyOrientedBoundingBoxD.
void Contains(ref MyOrientedBoundingBoxD obox, out ContainmentType result)
Checks whether the current BoundingSphereD contains the specified MyOrientedBoundingBoxD.
ContainmentType Contains(BoundingFrustumD frustum)
Checks whether the current BoundingSphereD contains the specified BoundingFrustum.
ContainmentType Contains(Vector3D point)
Checks whether the current BoundingSphereD contains the specified point.
void Contains(ref Vector3D point, out ContainmentType result)
Checks whether the current BoundingSphereD contains the specified point.
ContainmentType Contains(BoundingSphereD sphere)
Checks whether the current BoundingSphereD contains the specified BoundingSphereD.
void Contains(ref BoundingSphereD sphere, out ContainmentType result)
Checks whether the current BoundingSphereD contains the specified BoundingSphereD.
bool Equals(BoundingSphereD other)
Determines whether the specified BoundingSphereD is equal to the current BoundingSphereD.
Determines whether the specified Object is equal to the BoundingSphereD.
Gets the hash code for this instance.
BoundingSphereD Include(BoundingSphereD sphere)
bool IntersectRaySphere(RayD ray, out double tmin, out double tmax)
NOTE: This function doesn't calculate the normal because it's easily derived for a sphere (p - center).
bool Intersects(BoundingBoxD box)
Checks whether the current BoundingSphereD intersects with a specified BoundingBoxD.
void Intersects(ref BoundingBoxD box, out bool result)
Checks whether the current BoundingSphereD intersects a BoundingBoxD.
bool Intersects(BoundingFrustumD frustum)
Checks whether the current BoundingSphereD intersects with a specified BoundingFrustum.
bool Intersects(BoundingSphereD sphere)
Checks whether the current BoundingSphereD intersects with a specified BoundingSphereD.
void Intersects(ref BoundingSphereD sphere, out bool result)
Checks whether the current BoundingSphereD intersects another BoundingSphereD.
Vector3D RandomToUniformPointInSphere(double ranX, double ranY, double ranZ)
If ranX, ranY, ranZ are uniformly distributed across ranges <0,1>, Resulting point will be uniformly distributed inside sphere
Similar to RandomToUniformPointInSphere(...) but excludes points within distance of cutoutRadius from center. (Results are randomly distributed in the shape that remains from sphere that had another sphere cut out from center. )
Vector3D RandomToUniformPointOnSphere(double ranX, double ranY)
Returns a String that represents the current BoundingSphereD.
BoundingSphereD Transform(MatrixD matrix)
Translates and scales the BoundingSphereD using a given Matrix.
void Transform(ref MatrixD matrix, out BoundingSphereD result)
Translates and scales the BoundingSphereD using a given Matrix.
Do you have questions, comments, suggestions for improvements? Is there something I can do better? Did I make a mistake? Please add an issue here, and prefix your issue title with Wiki. Thank you, your help will be very appreciated!