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

VRageMath.BoundingBox

Morten Aune Lyrstad edited this page Sep 2, 2023 · 55 revisions

IndexNamespace Index

BoundingBox Struct

public struct BoundingBox: IEquatable<BoundingBox>

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

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

Fields

static ComparerType Comparer

static int CornerCount

Specifies the total number of corners (8) in the BoundingBox.

static BoundingBox Invalid

Vector3 Max

The maximum point the BoundingBox contains.

Vector3 Min

The minimum point the BoundingBox contains.

Properties

Vector3 Center { get; }

Calculates center

BoxCornerEnumerator Corners { get; set; }

float Depth { get; }

Vector3 Extents { get; }

Vector3 HalfExtents { get; }

float Height { get; }

Matrix Matrix { get; }

Matrix of AABB, respecting center and size

float Perimeter { get; }

return perimeter of edges

Vector3 Size { get; }

Size

float Width { get; }

Constructors

BoundingBox(Vector3 min, Vector3 max)

BoundingBox(BoundingBoxD bbd)

BoundingBox(BoundingBoxI bbd)

Methods

static BoundingBox CreateFromHalfExtent(Vector3 center, float halfExtent)

static BoundingBox CreateFromHalfExtent(Vector3 center, Vector3 halfExtent)

static BoundingBox CreateFromPoints(IEnumerable<Vector3> points)

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

static BoundingBox CreateFromSphere(BoundingSphere sphere)

Creates the smallest BoundingBox that will contain the specified BoundingSphere.

static void CreateFromSphere(ref BoundingSphere sphere, out BoundingBox result)

Creates the smallest BoundingBox that will contain the specified BoundingSphere.

static BoundingBox CreateInvalid()

static BoundingBox CreateMerged(BoundingBox original, BoundingBox additional)

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

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

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

static bool IsBetween(float number, float min, float max)

ContainmentType Contains(BoundingBox box)

Tests whether the BoundingBox contains another BoundingBox.

void Contains(ref BoundingBox box, out ContainmentType result)

Tests whether the BoundingBox contains a BoundingBox.

ContainmentType Contains(BoundingFrustum frustum)

Tests whether the BoundingBox contains a BoundingFrustum.

ContainmentType Contains(Vector3 point)

Tests whether the BoundingBox contains a point.

ContainmentType Contains(Vector3D point)

void Contains(ref Vector3 point, out ContainmentType result)

Tests whether the BoundingBox contains a point.

ContainmentType Contains(BoundingSphere sphere)

Tests whether the BoundingBox contains a BoundingSphere.

void Contains(ref BoundingSphere sphere, out ContainmentType result)

Tests whether the BoundingBox contains a BoundingSphere.

float Distance(Vector3 point)

float DistanceSquared(Vector3 point)

bool Equals(BoundingBox other)

Determines whether two instances of BoundingBox are equal.

bool Equals(object obj)

Determines whether two instances of BoundingBox are equal.

bool Equals(BoundingBox other, float epsilon)

Vector3&#91] GetCorners()

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

void GetCorners(Vector3&#91] corners)

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

void GetCornersUnsafe(*Vector3 corners)

int GetHashCode()

Gets the hash code for this instance.

BoundingBox GetIncluded(Vector3 point)

BoundingBox Include(ref Vector3 point)

return expanded aabb (aabb include point)

BoundingBox Include(Vector3 point)

BoundingBox Include(Vector3 p0, Vector3 p1, Vector3 p2)

BoundingBox Include(ref Vector3 p0, ref Vector3 p1, ref Vector3 p2)

BoundingBox Include(ref BoundingBox box)

return expanded aabb (aabb include aabb)

BoundingBox Include(BoundingBox box)

void Include(ref Line line)

BoundingBox Include(BoundingSphere sphere)

BoundingBox Include(ref BoundingSphere sphere)

BoundingBox Include(ref BoundingFrustum frustum)

void Inflate(float size)

void Inflate(Vector3 size)

void InflateToMinimum(Vector3 minimumSize)

BoundingBox Intersect(BoundingBox box)

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

bool Intersects(BoundingBox box)

Checks whether the current BoundingBox intersects another BoundingBox.

bool Intersects(ref BoundingBox box)

void Intersects(ref BoundingBox box, out bool result)

Checks whether the current BoundingBox intersects another BoundingBox.

bool Intersects(BoundingFrustum frustum)

Checks whether the current BoundingBox intersects a BoundingFrustum.

PlaneIntersectionType Intersects(Plane plane)

Checks whether the current BoundingBox intersects a Plane.

void Intersects(ref Plane plane, out PlaneIntersectionType result)

Checks whether the current BoundingBox intersects a Plane.

bool Intersects(Line line, out float distance)

float? Intersects(Ray ray)

Checks whether the current BoundingBox intersects a Ray.

void Intersects(ref Ray ray, out float? result)

Checks whether the current BoundingBox intersects a Ray.

bool Intersects(BoundingSphere sphere)

Checks whether the current BoundingBox intersects a BoundingSphere.

void Intersects(ref BoundingSphere sphere, out bool result)

Checks whether the current BoundingBox intersects a BoundingSphere.

bool Intersects(ref BoundingSphere sphere)

bool Intersects(ref BoundingSphereD sphere)

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

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

float ProjectedArea(Vector3 viewDir)

BoundingBox Round(int decimals)

BoundingBoxI Round()

void Scale(Vector3 scale)

float SurfaceArea()

string ToString()

Returns a String that represents the current BoundingBox.

BoundingBox Transform(Matrix worldMatrix)

BoundingBoxD Transform(MatrixD worldMatrix)

BoundingBox Transform(ref Matrix m)

void Transform(ref Matrix m, ref BoundingBox bb)

BoundingBoxD Transform(ref MatrixD m)

void Transform(ref MatrixD m, ref BoundingBoxD bb)

BoundingBox Translate(Matrix worldMatrix)

Translate

BoundingBox Translate(Vector3 vctTranlsation)

Translate

float Volume()

Clone this wiki locally