Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRageMath.BoundingSphereD

Morten Aune Lyrstad edited this page Apr 16, 2022 · 55 revisions

IndexNamespace Index

BoundingSphereD Struct

public struct BoundingSphereD: IEquatable<BoundingSphereD>

Defines a sphere.

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

Fields

Member Description
Vector3D Center The center point of the sphere.
double Radius The radius of the sphere.

Constructors

Member Description
BoundingSphereD(Vector3D, double)

Methods

Member Description
static BoundingSphereD CreateFromBoundingBox(BoundingBoxD) Creates the smallest BoundingSphereD that can contain a specified BoundingBoxD.
static void CreateFromBoundingBox(ref BoundingBoxD, out BoundingSphereD) Creates the smallest BoundingSphereD that can contain a specified BoundingBoxD.
static BoundingSphereD CreateFromFrustum(BoundingFrustumD) Creates the smallest BoundingSphereD that can contain a specified BoundingFrustum.
static BoundingSphereD CreateFromPoints(Vector3D[]) Creates a BoundingSphereD that can contain a specified list of points.
static BoundingSphereD CreateInvalid()
static BoundingSphereD CreateMerged(BoundingSphereD, BoundingSphereD) Creates a BoundingSphereD that contains the two specified BoundingSphereD instances.
static void CreateMerged(ref BoundingSphereD, ref BoundingSphereD, out BoundingSphereD) Creates a BoundingSphereD that contains the two specified BoundingSphereD instances.
static void Include(ref BoundingSphereD, ref BoundingSphereD)
ContainmentType Contains(BoundingBoxD) Checks whether the current BoundingSphereD contains the specified BoundingBoxD.
void Contains(ref BoundingBoxD, out ContainmentType) Checks whether the current BoundingSphereD contains the specified BoundingBoxD.
ContainmentType Contains(BoundingFrustumD) Checks whether the current BoundingSphereD contains the specified BoundingFrustum.
ContainmentType Contains(Vector3D) Checks whether the current BoundingSphereD contains the specified point.
void Contains(ref Vector3D, out ContainmentType) Checks whether the current BoundingSphereD contains the specified point.
ContainmentType Contains(BoundingSphereD) Checks whether the current BoundingSphereD contains the specified BoundingSphereD.
void Contains(ref BoundingSphereD, out ContainmentType) Checks whether the current BoundingSphereD contains the specified BoundingSphereD.
bool Equals(BoundingSphereD) Determines whether the specified BoundingSphereD is equal to the current BoundingSphereD.
bool Equals(object) Determines whether the specified Object is equal to the BoundingSphereD.
BoundingBoxD GetBoundingBox()
int GetHashCode() Gets the hash code for this instance.
BoundingSphereD Include(BoundingSphereD)
bool IntersectRaySphere(RayD, out double, out double) NOTE: This function doesn't calculate the normal because it's easily derived for a sphere (p - center).
bool Intersects(BoundingBoxD) Checks whether the current BoundingSphereD intersects with a specified BoundingBoxD.
void Intersects(ref BoundingBoxD, out bool) Checks whether the current BoundingSphereD intersects a BoundingBoxD.
double? Intersects(RayD)
bool Intersects(BoundingFrustumD) Checks whether the current BoundingSphereD intersects with a specified BoundingFrustum.
bool Intersects(BoundingSphereD) Checks whether the current BoundingSphereD intersects with a specified BoundingSphereD.
void Intersects(ref BoundingSphereD, out bool) Checks whether the current BoundingSphereD intersects another BoundingSphereD.
Vector3D RandomToUniformPointInSphere(double, double, double) If ranX, ranY, ranZ are uniformly distributed across ranges <0,1>, Resulting point will be uniformly distributed inside sphere
Vector3D? RandomToUniformPointInSphereWithInnerCutout(double, double, double, double) 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, double)
string ToString() Returns a String that represents the current BoundingSphereD.
BoundingSphereD Transform(MatrixD) Translates and scales the BoundingSphereD using a given Matrix.
void Transform(ref MatrixD, out BoundingSphereD) Translates and scales the BoundingSphereD using a given Matrix.

Clone this wiki locally