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

VRageMath.BoundingBoxI

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

IndexNamespace Index

BoundingBoxI Struct

public struct BoundingBoxI: IEquatable<BoundingBoxI>

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

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

Fields

Vector3I Max

The maximum point the BoundingBoxI contains.

Vector3I Min

The minimum point the BoundingBoxI contains.

Properties

Vector3I Center { get; }

Calculates center

Vector3I HalfExtents { get; }

bool IsValid { get; }

float Perimeter { get; }

return perimeter of edges

Vector3I Size { get; }

Size

Constructors

BoundingBoxI(BoundingBox box)

BoundingBoxI(Vector3I min, Vector3I max)

BoundingBoxI(int min, int max)

Methods

static BoundingBoxI CreateFromPoints(IEnumerable<Vector3I> points)

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

static BoundingBoxI CreateFromSphere(BoundingSphere sphere)

Creates the smallest BoundingBoxI that will contain the specified BoundingSphere.

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

Creates the smallest BoundingBoxI that will contain the specified BoundingSphere.

static BoundingBoxI CreateInvalid()

static BoundingBoxI CreateMerged(BoundingBoxI original, BoundingBoxI additional)

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

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

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

static IEnumerable<Vector3I> EnumeratePoints(BoundingBoxI rangeInclusive)

Enumerate all values in a integer interval (a cuboid). This method is an allocating version of the Vector3I_RangeIterator. This once can be used in the foreach syntax though so it's more convenient for debug routines.

static IEnumerable<Vector3I> IterateDifference(BoundingBoxI left, BoundingBoxI right)

Iterate every cell contained in {left} - {right}, where we interpret {box} as the set of all distinct Vector3I points inside a 'box'. Containment is taken in a typical inclusive start, exclusive end fashion.

ContainmentType Contains(BoundingBoxI box)

Tests whether the BoundingBoxI contains another BoundingBoxI.

void Contains(ref BoundingBoxI box, out ContainmentType result)

Tests whether the BoundingBoxI contains a BoundingBoxI.

ContainmentType Contains(Vector3I point)

Tests whether the BoundingBoxI contains a point.

ContainmentType Contains(Vector3 point)

void Contains(ref Vector3I point, out ContainmentType result)

Tests whether the BoundingBoxI contains a point.

float Distance(Vector3I point)

bool Equals(BoundingBoxI other)

Determines whether two instances of BoundingBoxI are equal.

bool Equals(object obj)

Determines whether two instances of BoundingBoxI are equal.

Vector3I&#91] GetCorners()

Gets an array of points that make up the corners of the BoundingBoxI.

void GetCorners(Vector3I&#91] corners)

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

void GetCornersUnsafe(*Vector3I corners)

int GetHashCode()

Gets the hash code for this instance.

BoundingBoxI GetIncluded(Vector3I point)

BoundingBoxI Include(ref Vector3I point)

return expanded aabb (abb include point)

BoundingBoxI Include(Vector3I point)

BoundingBoxI Include(Vector3I p0, Vector3I p1, Vector3I p2)

BoundingBoxI Include(ref Vector3I p0, ref Vector3I p1, ref Vector3I p2)

BoundingBoxI Include(ref BoundingBoxI box)

return expanded aabb (abb include point)

BoundingBoxI Include(BoundingBoxI box)

void Inflate(int size)

void InflateToMinimum(Vector3I minimumSize)

BoundingBoxI Intersect(BoundingBoxI box)

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

bool Intersects(BoundingBoxI box)

Checks whether the current BoundingBoxI intersects another BoundingBoxI.

bool Intersects(ref BoundingBoxI box)

void Intersects(ref BoundingBoxI box, out bool result)

Checks whether the current BoundingBoxI intersects another BoundingBoxI.

PlaneIntersectionType Intersects(Plane plane)

Checks whether the current BoundingBoxI intersects a Plane.

void Intersects(ref Plane plane, out PlaneIntersectionType result)

Checks whether the current BoundingBoxI intersects a Plane.

bool Intersects(Line line, out float distance)

float? Intersects(Ray ray)

Checks whether the current BoundingBoxI intersects a Ray.

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

Checks whether the current BoundingBoxI intersects a Ray.

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

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

void IntersectWith(ref BoundingBoxI box)

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

float SurfaceArea()

string ToString()

Returns a String that represents the current BoundingBoxI.

BoundingBoxI Translate(Vector3I vctTranlsation)

Translate

float Volume()

Clone this wiki locally