Skip to content

VRageMath.BoundingBox2D

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

IndexNamespace Index

BoundingBox2D Struct

public struct BoundingBox2D: IEquatable<BoundingBox2D>

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

Namespace: VRageMath
Assembly: VRage.Math.dll

Implements:

Fields

static int CornerCount

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

Vector2D Max

The maximum point the BoundingBox2D contains.

Vector2D Min

The minimum point the BoundingBox2D contains.

Properties

Vector2D Center { get; }

Calculates center

Vector2D Extents { get; }

Vector2D HalfExtents { get; }

double Height { get; }

Vector2D Size { get; }

Size

double Width { get; }

Constructors

BoundingBox2D(Vector2D min, Vector2D max)

Methods

static BoundingBox2D CreateFromHalfExtent(Vector2D center, double halfExtent)

static BoundingBox2D CreateFromHalfExtent(Vector2D center, Vector2D halfExtent)

static BoundingBox2D CreateFromPoints(IEnumerable<Vector2D> points)

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

static BoundingBox2D CreateInvalid()

static BoundingBox2D CreateMerged(BoundingBox2D original, BoundingBox2D additional)

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

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

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

double Area()

ContainmentType Contains(BoundingBox2D box)

Tests whether the BoundingBox2D contains another BoundingBox2D.

void Contains(ref BoundingBox2D box, out ContainmentType result)

Tests whether the BoundingBox2D contains a BoundingBox2D.

ContainmentType Contains(Vector2D point)

Tests whether the BoundingBox2D contains a point.

void Contains(ref Vector2D point, out ContainmentType result)

Tests whether the BoundingBox2D contains a point.

double Distance(Vector2D point)

bool Equals(BoundingBox2D other)

Determines whether two instances of BoundingBox2D are equal.

bool Equals(object obj)

Determines whether two instances of BoundingBox2D are equal.

Vector2D&#91] GetCorners()

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

void GetCorners(Vector2D&#91] corners)

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

void GetCornersUnsafe(*Vector2D corners)

int GetHashCode()

Gets the hash code for this instance.

BoundingBox2D GetIncluded(Vector2D point)

BoundingBox2D Include(ref Vector2D point)

return expanded aabb (abb include point)

BoundingBox2D Include(Vector2D point)

BoundingBox2D Include(Vector2D p0, Vector2D p1, Vector2D p2)

BoundingBox2D Include(ref Vector2D p0, ref Vector2D p1, ref Vector2D p2)

BoundingBox2D Include(ref BoundingBox2D box)

return expanded aabb (abb include point)

BoundingBox2D Include(BoundingBox2D box)

void Inflate(double size)

void InflateToMinimum(Vector2D minimumSize)

BoundingBox2D Intersect(BoundingBox2D box)

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

bool Intersects(BoundingBox2D box)

Checks whether the current BoundingBox2D intersects another BoundingBox2D.

bool Intersects(ref BoundingBox2D box)

void Intersects(ref BoundingBox2D box, out bool result)

Checks whether the current BoundingBox2D intersects another BoundingBox2D.

double Perimeter()

void Scale(Vector2D scale)

string ToString()

Returns a String that represents the current BoundingBox2D.

BoundingBox2D Translate(Vector2D vctTranlsation)

Translate

Clone this wiki locally