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

VRageMath.BoundingBoxD

Morten Aune Lyrstad edited this page Apr 13, 2023 · 55 revisions

IndexNamespace Index

BoundingBoxD Struct

public struct BoundingBoxD: IEquatable<BoundingBoxD>

Defines an axis-aligned box-shaped 3D volume.

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

Fields

static ComparerType Comparer

static int NUMBER_OF_CORNERS

Number of corners of the BB

Vector3D Max

The maximum point the BoundingBox contains.

Vector3D Min

The minimum point the BoundingBox contains.

Properties

Vector3D Center { get; }

Calculates center

Vector3D Extents { get; }

Vector3D HalfExtents { get; }

MatrixD Matrix { get; }

Matrix of AABB, respecting center and size

double Perimeter { get; }

return perimeter of edges

Vector3D Size { get; }

Size

double SurfaceArea { get; }

bool Valid { get; }

double Volume { get; }

Constructors

BoundingBoxD(Vector3D min, Vector3D max)

Methods

static BoundingBoxD CreateFromPoints(IEnumerable<Vector3D> points)

Creates the smallest BoundingBox that will contain a group of points.

static BoundingBoxD CreateFromSphere(BoundingSphereD sphere)

Creates the smallest BoundingBox that will contain the specified BoundingSphere.

static void CreateFromSphere(ref BoundingSphereD sphere, out BoundingBoxD result)

Creates the smallest BoundingBox that will contain the specified BoundingSphere.

static BoundingBoxD CreateInvalid()

static BoundingBoxD CreateMerged(BoundingBoxD original, BoundingBoxD additional)

Creates the smallest BoundingBox that contains the two specified BoundingBox instances.

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

Creates the smallest BoundingBox that contains the two specified BoundingBox instances.

void AssertIsValid()

void Centerize(Vector3D center)

ContainmentType Contains(BoundingBoxD box)

Tests whether the BoundingBox contains another BoundingBox.

void Contains(ref BoundingBoxD box, out ContainmentType result)

Tests whether the BoundingBox contains a BoundingBox.

ContainmentType Contains(BoundingFrustumD frustum)

Tests whether the BoundingBox contains a BoundingFrustum.

ContainmentType Contains(Vector3D point)

Tests whether the BoundingBox contains a point.

void Contains(ref Vector3D point, out ContainmentType result)

Tests whether the BoundingBox contains a point.

ContainmentType Contains(BoundingSphereD sphere)

Tests whether the BoundingBox contains a BoundingSphere.

void Contains(ref BoundingSphereD sphere, out ContainmentType result)

Tests whether the BoundingBox contains a BoundingSphere.

double Distance(Vector3D point)

double Distance(ref BoundingBoxD other)

double DistanceSquared(Vector3D point)

double DistanceSquared(ref Vector3D point)

double DistanceSquared(ref BoundingBoxD other)

bool Equals(BoundingBoxD other)

Determines whether two instances of BoundingBox are equal.

bool Equals(object obj)

Determines whether two instances of BoundingBox are equal.

bool Equals(BoundingBoxD other, double epsilon)

Vector3D GetCorner(int index)

Gets corner of the BB by index

void GetCornersUnsafe(*Vector3D corners)

int GetHashCode()

Gets the hash code for this instance.

BoundingBoxD GetInflated(double size)

BoundingBoxD GetInflated(Vector3 size)

BoundingBoxD GetInflated(Vector3D size)

BoundingBoxD Include(ref Vector3D point)

return expanded aabb (aabb include point)

BoundingBoxD Include(Vector3D point)

BoundingBoxD Include(Vector3D p0, Vector3D p1, Vector3D p2)

BoundingBoxD Include(ref Vector3D p0, ref Vector3D p1, ref Vector3D p2)

BoundingBoxD Include(ref BoundingBoxD box)

return expanded aabb (aabb include aabb)

BoundingBoxD Include(BoundingBoxD box)

void Include(ref LineD line)

BoundingBoxD Include(BoundingSphereD sphere)

BoundingBoxD Include(ref BoundingSphereD sphere)

BoundingBoxD Include(ref BoundingFrustumD frustum)

BoundingBoxD Inflate(double size)

BoundingBoxD Inflate(Vector3D size)

void InflateToMinimum(Vector3D minimumSize)

void InflateToMinimum(double minimumSize)

BoundingBoxD Intersect(BoundingBoxD box)

Returns bounding box which is intersection of this and box Result is invalid box when there's no intersection (Min > Max)

bool Intersect(ref LineD line, out LineD intersectedLine)

bool Intersect(ref LineD line, out double t1, out double t2)

bool Intersect(ref RayD ray, out double tmin, out double tmax)

bool Intersects(BoundingBoxD box)

Checks whether the current BoundingBox intersects another BoundingBox.

bool Intersects(ref BoundingBoxD box)

void Intersects(ref BoundingBoxD box, out bool result)

Checks whether the current BoundingBox intersects another BoundingBox.

void Intersects(ref BoundingBox box, out bool result)

bool Intersects(BoundingFrustumD frustum)

Checks whether the current BoundingBox intersects a BoundingFrustum.

PlaneIntersectionType Intersects(PlaneD plane)

Checks whether the current BoundingBox intersects a Plane.

void Intersects(ref PlaneD plane, out PlaneIntersectionType result)

Checks whether the current BoundingBox intersects a Plane.

bool Intersects(ref LineD line)

bool Intersects(ref LineD line, out double distance)

double? Intersects(Ray ray)

double? Intersects(RayD ray)

Checks whether the current BoundingBox intersects a Ray.

void Intersects(ref RayD ray, out double? result)

Checks whether the current BoundingBox intersects a Ray.

bool Intersects(BoundingSphereD sphere)

Checks whether the current BoundingBox intersects a BoundingSphere.

void Intersects(ref BoundingSphereD sphere, out bool result)

Checks whether the current BoundingBox intersects a BoundingSphere.

bool Intersects(ref BoundingSphereD sphere)

bool IntersectsTriangle(Vector3D v0, Vector3D v1, Vector3D v2)

bool IntersectsTriangle(ref Vector3D v0, ref Vector3D v1, ref Vector3D v2)

double ProjectedArea(Vector3D viewDir)

BoundingBoxD Round(int decimals)

BoundingBoxI Round()

string ToString()

Returns a String that represents the current BoundingBox.

BoundingBoxD TransformFast(MatrixD m)

Transform this AABB by matrix. Matrix has to be only rotation and translation.

BoundingBoxD TransformFast(ref MatrixD m)

Transform this AABB by matrix. Matrix has to be only rotation and translation.

void TransformFast(ref MatrixD m, ref BoundingBoxD bb)

Transform this AABB by matrix. Matrix has to be only rotation and translation.

BoundingBoxD TransformSlow(MatrixD m)

Transform this AABB by matrix.

BoundingBoxD TransformSlow(ref MatrixD worldMatrix)

Transform this AABB by matrix.

BoundingBoxD Translate(MatrixD worldMatrix)

Translate

BoundingBoxD Translate(Vector3D vctTranlsation)

Translate

Vector3D&#91] GetCorners()

Obsolete: Use GetCornersUnsafe or GetCorner.

Gets an array of points that make up the corners of the BoundingBox. ALLOCATION!

void GetCorners(Vector3D&#91] corners)

Obsolete: Use GetCornersUnsafe or GetCorner.

Gets the array of points that make up the corners of the BoundingBox.

Clone this wiki locally