Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

VRageMath.BoundingSphereD

Malware edited this page May 13, 2024 · 54 revisions

IndexNamespace Index

BoundingSphereD Struct

public struct BoundingSphereD: IEquatable<BoundingSphereD>

Defines a sphere.

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

Fields

Vector3D Center

The center point of the sphere.

double Radius

The radius of the sphere.

Constructors

BoundingSphereD(Vector3D center, double radius)

Methods

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&#91] 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.

static void CreateMerged(ref BoundingSphereD original, ref BoundingSphereD additional, out BoundingSphereD result)

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.

bool Equals(object obj)

Determines whether the specified Object is equal to the BoundingSphereD.

BoundingBoxD GetBoundingBox()

int GetHashCode()

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.

double? Intersects(RayD ray)

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

Vector3D? RandomToUniformPointInSphereWithInnerCutout(double ranX, double ranY, double ranZ, double cutoutRadius)

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)

string ToString()

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.

Clone this wiki locally