Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
VRageMath.BoundingBox2 Struct Reference

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

Inheritance diagram for VRageMath.BoundingBox2:

Public Member Functions

 BoundingBox2 (Vector2 min, Vector2 max)
 Creates an instance of BoundingBox2. More...
 
Vector2[] GetCorners ()
 Gets an array of points that make up the corners of the BoundingBox2. More...
 
void GetCorners (Vector2[] corners)
 Gets the array of points that make up the corners of the BoundingBox2. More...
 
unsafe void GetCornersUnsafe (Vector2 *corners)
 Gets the array of points that make up the corners of the BoundingBox2. More...
 
bool Equals (BoundingBox2 other)
 Determines whether two instances of BoundingBox2 are equal. More...
 
override bool Equals (object obj)
 Determines whether two instances of BoundingBox2 are equal. More...
 
override int GetHashCode ()
 Gets the hash code for this instance. More...
 
override string ToString ()
 Returns a String that represents the current BoundingBox2. More...
 
BoundingBox2 Intersect (BoundingBox2 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) More...
 
bool Intersects (BoundingBox2 box)
 Checks whether the current BoundingBox2 intersects another BoundingBox2. More...
 
bool Intersects (ref BoundingBox2 box)
 
void Intersects (ref BoundingBox2 box, out bool result)
 Checks whether the current BoundingBox2 intersects another BoundingBox2. More...
 
float Distance (Vector2 point)
 
ContainmentType Contains (BoundingBox2 box)
 Tests whether the BoundingBox2 contains another BoundingBox2. More...
 
void Contains (ref BoundingBox2 box, out ContainmentType result)
 Tests whether the BoundingBox2 contains a BoundingBox2. More...
 
ContainmentType Contains (Vector2 point)
 Tests whether the BoundingBox2 contains a point. More...
 
void Contains (ref Vector2 point, out ContainmentType result)
 Tests whether the BoundingBox2 contains a point. More...
 
BoundingBox2 Translate (Vector2 vctTranlsation)
 Translate More...
 
BoundingBox2 Include (ref Vector2 point)
 return expanded aabb (abb include point) More...
 
BoundingBox2 GetIncluded (Vector2 point)
 
BoundingBox2 Include (Vector2 point)
 
BoundingBox2 Include (Vector2 p0, Vector2 p1, Vector2 p2)
 
BoundingBox2 Include (ref Vector2 p0, ref Vector2 p1, ref Vector2 p2)
 
BoundingBox2 Include (ref BoundingBox2 box)
 return expanded aabb (abb include point) More...
 
BoundingBox2 Include (BoundingBox2 box)
 
float Perimeter ()
 
float Area ()
 
void Inflate (float size)
 
void InflateToMinimum (Vector2 minimumSize)
 
void Scale (Vector2 scale)
 

Static Public Member Functions

static bool operator== (BoundingBox2 a, BoundingBox2 b)
 Determines whether two instances of BoundingBox2 are equal. More...
 
static bool operator!= (BoundingBox2 a, BoundingBox2 b)
 Determines whether two instances of BoundingBox2 are not equal. More...
 
static BoundingBox2 CreateMerged (BoundingBox2 original, BoundingBox2 additional)
 Creates the smallest BoundingBox2 that contains the two specified BoundingBox2 instances. More...
 
static void CreateMerged (ref BoundingBox2 original, ref BoundingBox2 additional, out BoundingBox2 result)
 Creates the smallest BoundingBox2 that contains the two specified BoundingBox2 instances. More...
 
static BoundingBox2 CreateFromPoints (IEnumerable< Vector2 > points)
 Creates the smallest BoundingBox2 that will contain a group of points. More...
 
static BoundingBox2 CreateFromHalfExtent (Vector2 center, float halfExtent)
 
static BoundingBox2 CreateFromHalfExtent (Vector2 center, Vector2 halfExtent)
 
static BoundingBox2 CreateInvalid ()
 

Public Attributes

const int CornerCount = 8
 Specifies the total number of corners (8) in the BoundingBox2. More...
 
Vector2 Min
 The minimum point the BoundingBox2 contains. More...
 
Vector2 Max
 The maximum point the BoundingBox2 contains. More...
 

Properties

Vector2 Center [get]
 Calculates center More...
 
Vector2 HalfExtents [get]
 
Vector2 Extents [get]
 
float Width [get]
 
float Height [get]
 
Vector2 Size [get]
 Size More...
 

Detailed Description

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

Definition at line 11 of file BoundingBox2.cs.

Constructor & Destructor Documentation

VRageMath.BoundingBox2.BoundingBox2 ( Vector2  min,
Vector2  max 
)
inline

Creates an instance of BoundingBox2.

Parameters
minThe minimum point the BoundingBox2 includes.
maxThe maximum point the BoundingBox2 includes.

Definition at line 32 of file BoundingBox2.cs.

Member Function Documentation

float VRageMath.BoundingBox2.Area ( )
inline

Definition at line 466 of file BoundingBox2.cs.

ContainmentType VRageMath.BoundingBox2.Contains ( BoundingBox2  box)
inline

Tests whether the BoundingBox2 contains another BoundingBox2.

Parameters
boxThe BoundingBox2 to test for overlap.

Definition at line 320 of file BoundingBox2.cs.

void VRageMath.BoundingBox2.Contains ( ref BoundingBox2  box,
out ContainmentType  result 
)
inline

Tests whether the BoundingBox2 contains a BoundingBox2.

Parameters
boxThe BoundingBox2 to test for overlap.
result[OutAttribute] Enumeration indicating the extent of overlap.

Definition at line 331 of file BoundingBox2.cs.

ContainmentType VRageMath.BoundingBox2.Contains ( Vector2  point)
inline

Tests whether the BoundingBox2 contains a point.

Parameters
pointThe point to test for overlap.

Definition at line 343 of file BoundingBox2.cs.

void VRageMath.BoundingBox2.Contains ( ref Vector2  point,
out ContainmentType  result 
)
inline

Tests whether the BoundingBox2 contains a point.

Parameters
pointThe point to test for overlap.
result[OutAttribute] Enumeration indicating the extent of overlap.

Definition at line 357 of file BoundingBox2.cs.

static BoundingBox2 VRageMath.BoundingBox2.CreateFromHalfExtent ( Vector2  center,
float  halfExtent 
)
inlinestatic

Definition at line 231 of file BoundingBox2.cs.

static BoundingBox2 VRageMath.BoundingBox2.CreateFromHalfExtent ( Vector2  center,
Vector2  halfExtent 
)
inlinestatic

Definition at line 236 of file BoundingBox2.cs.

static BoundingBox2 VRageMath.BoundingBox2.CreateFromPoints ( IEnumerable< Vector2 points)
inlinestatic

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

Parameters
pointsA list of points the BoundingBox2 should contain.

Definition at line 211 of file BoundingBox2.cs.

static BoundingBox2 VRageMath.BoundingBox2.CreateInvalid ( )
inlinestatic

Definition at line 448 of file BoundingBox2.cs.

static BoundingBox2 VRageMath.BoundingBox2.CreateMerged ( BoundingBox2  original,
BoundingBox2  additional 
)
inlinestatic

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

Parameters
originalOne of the BoundingBox2s to contain.
additionalOne of the BoundingBox2s to contain.

Definition at line 185 of file BoundingBox2.cs.

static void VRageMath.BoundingBox2.CreateMerged ( ref BoundingBox2  original,
ref BoundingBox2  additional,
out BoundingBox2  result 
)
inlinestatic

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

Parameters
originalOne of the BoundingBox2 instances to contain.
additionalOne of the BoundingBox2 instances to contain.
result[OutAttribute] The created BoundingBox2.

Definition at line 197 of file BoundingBox2.cs.

float VRageMath.BoundingBox2.Distance ( Vector2  point)
inline

Definition at line 310 of file BoundingBox2.cs.

bool VRageMath.BoundingBox2.Equals ( BoundingBox2  other)
inline

Determines whether two instances of BoundingBox2 are equal.

Parameters
otherThe BoundingBox2 to compare with the current BoundingBox2.

Definition at line 145 of file BoundingBox2.cs.

override bool VRageMath.BoundingBox2.Equals ( object  obj)
inline

Determines whether two instances of BoundingBox2 are equal.

Parameters
objThe Object to compare with the current BoundingBox2.

Definition at line 157 of file BoundingBox2.cs.

Vector2 [] VRageMath.BoundingBox2.GetCorners ( )
inline

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

Definition at line 78 of file BoundingBox2.cs.

void VRageMath.BoundingBox2.GetCorners ( Vector2[]  corners)
inline

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

Parameters
cornersAn existing array of at least 8 Vector2 points where the corners of the BoundingBox2 are written.

Definition at line 97 of file BoundingBox2.cs.

unsafe void VRageMath.BoundingBox2.GetCornersUnsafe ( Vector2 corners)
inline

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

Parameters
cornersAn existing array of at least 8 Vector2 points where the corners of the BoundingBox2 are written.

Definition at line 121 of file BoundingBox2.cs.

override int VRageMath.BoundingBox2.GetHashCode ( )
inline

Gets the hash code for this instance.

Definition at line 168 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.GetIncluded ( Vector2  point)
inline

Definition at line 406 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.Include ( ref Vector2  point)
inline

return expanded aabb (abb include point)

Parameters
point
Returns

Definition at line 397 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.Include ( Vector2  point)
inline

Definition at line 413 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.Include ( Vector2  p0,
Vector2  p1,
Vector2  p2 
)
inline

Definition at line 418 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.Include ( ref Vector2  p0,
ref Vector2  p1,
ref Vector2  p2 
)
inline

Definition at line 423 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.Include ( ref BoundingBox2  box)
inline

return expanded aabb (abb include point)

Parameters
box
Returns

Definition at line 437 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.Include ( BoundingBox2  box)
inline

Definition at line 443 of file BoundingBox2.cs.

void VRageMath.BoundingBox2.Inflate ( float  size)
inline

Definition at line 472 of file BoundingBox2.cs.

void VRageMath.BoundingBox2.InflateToMinimum ( Vector2  minimumSize)
inline

Definition at line 478 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.Intersect ( BoundingBox2  box)
inline

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)

Definition at line 246 of file BoundingBox2.cs.

bool VRageMath.BoundingBox2.Intersects ( BoundingBox2  box)
inline

Checks whether the current BoundingBox2 intersects another BoundingBox2.

Parameters
boxThe BoundingBox2 to check for intersection with.

Definition at line 260 of file BoundingBox2.cs.

bool VRageMath.BoundingBox2.Intersects ( ref BoundingBox2  box)
inline

Definition at line 265 of file BoundingBox2.cs.

void VRageMath.BoundingBox2.Intersects ( ref BoundingBox2  box,
out bool  result 
)
inline

Checks whether the current BoundingBox2 intersects another BoundingBox2.

Parameters
boxThe BoundingBox2 to check for intersection with.
result[OutAttribute] true if the BoundingBox2 instances intersect; false otherwise.

Definition at line 274 of file BoundingBox2.cs.

static bool VRageMath.BoundingBox2.operator!= ( BoundingBox2  a,
BoundingBox2  b 
)
inlinestatic

Determines whether two instances of BoundingBox2 are not equal.

Parameters
aThe object to the left of the inequality operator.
bThe object to the right of the inequality operator.

Definition at line 67 of file BoundingBox2.cs.

static bool VRageMath.BoundingBox2.operator== ( BoundingBox2  a,
BoundingBox2  b 
)
inlinestatic

Determines whether two instances of BoundingBox2 are equal.

Parameters
aBoundingBox2 to compare.
bBoundingBox2 to compare.

Definition at line 58 of file BoundingBox2.cs.

float VRageMath.BoundingBox2.Perimeter ( )
inline

Definition at line 460 of file BoundingBox2.cs.

void VRageMath.BoundingBox2.Scale ( Vector2  scale)
inline

Definition at line 512 of file BoundingBox2.cs.

override string VRageMath.BoundingBox2.ToString ( )
inline

Returns a String that represents the current BoundingBox2.

Definition at line 176 of file BoundingBox2.cs.

BoundingBox2 VRageMath.BoundingBox2.Translate ( Vector2  vctTranlsation)
inline

Translate

Parameters
vctTranlsation
Returns

Definition at line 373 of file BoundingBox2.cs.

Member Data Documentation

const int VRageMath.BoundingBox2.CornerCount = 8

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

Definition at line 16 of file BoundingBox2.cs.

Vector2 VRageMath.BoundingBox2.Max

The maximum point the BoundingBox2 contains.

Definition at line 26 of file BoundingBox2.cs.

Vector2 VRageMath.BoundingBox2.Min

The minimum point the BoundingBox2 contains.

Definition at line 21 of file BoundingBox2.cs.

Property Documentation

Vector2 VRageMath.BoundingBox2.Center
get

Calculates center

Definition at line 286 of file BoundingBox2.cs.

Vector2 VRageMath.BoundingBox2.Extents
get

Definition at line 296 of file BoundingBox2.cs.

Vector2 VRageMath.BoundingBox2.HalfExtents
get

Definition at line 291 of file BoundingBox2.cs.

float VRageMath.BoundingBox2.Height
get

Definition at line 306 of file BoundingBox2.cs.

Vector2 VRageMath.BoundingBox2.Size
get

Size

Returns

Definition at line 385 of file BoundingBox2.cs.

float VRageMath.BoundingBox2.Width
get

Definition at line 301 of file BoundingBox2.cs.


The documentation for this struct was generated from the following file: