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

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

Inheritance diagram for VRageMath.BoundingBox2I:

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

Properties

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

Detailed Description

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

Definition at line 11 of file BoundingBox2I.cs.

Constructor & Destructor Documentation

VRageMath.BoundingBox2I.BoundingBox2I ( Vector2I  min,
Vector2I  max 
)
inline

Creates an instance of BoundingBox2I.

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

Definition at line 32 of file BoundingBox2I.cs.

Member Function Documentation

float VRageMath.BoundingBox2I.Area ( )
inline

Definition at line 457 of file BoundingBox2I.cs.

ContainmentType VRageMath.BoundingBox2I.Contains ( BoundingBox2I  box)
inline

Tests whether the BoundingBox2I contains another BoundingBox2I.

Parameters
boxThe BoundingBox2I to test for overlap.

Definition at line 311 of file BoundingBox2I.cs.

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

Tests whether the BoundingBox2I contains a BoundingBox2I.

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

Definition at line 322 of file BoundingBox2I.cs.

ContainmentType VRageMath.BoundingBox2I.Contains ( Vector2I  point)
inline

Tests whether the BoundingBox2I contains a point.

Parameters
pointThe point to test for overlap.

Definition at line 334 of file BoundingBox2I.cs.

void VRageMath.BoundingBox2I.Contains ( ref Vector2I  point,
out ContainmentType  result 
)
inline

Tests whether the BoundingBox2I contains a point.

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

Definition at line 348 of file BoundingBox2I.cs.

static BoundingBox2I VRageMath.BoundingBox2I.CreateFromHalfExtent ( Vector2I  center,
int  halfExtent 
)
inlinestatic

Definition at line 228 of file BoundingBox2I.cs.

static BoundingBox2I VRageMath.BoundingBox2I.CreateFromHalfExtent ( Vector2I  center,
Vector2I  halfExtent 
)
inlinestatic

Definition at line 233 of file BoundingBox2I.cs.

static BoundingBox2I VRageMath.BoundingBox2I.CreateFromPoints ( IEnumerable< Vector2I points)
inlinestatic

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

Parameters
pointsA list of points the BoundingBox2I should contain.

Definition at line 209 of file BoundingBox2I.cs.

static BoundingBox2I VRageMath.BoundingBox2I.CreateInvalid ( )
inlinestatic

Definition at line 439 of file BoundingBox2I.cs.

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

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

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

Definition at line 183 of file BoundingBox2I.cs.

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

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

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

Definition at line 195 of file BoundingBox2I.cs.

bool VRageMath.BoundingBox2I.Equals ( BoundingBox2I  other)
inline

Determines whether two instances of BoundingBox2I are equal.

Parameters
otherThe BoundingBox2I to compare with the current BoundingBox2I.

Definition at line 144 of file BoundingBox2I.cs.

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

Determines whether two instances of BoundingBox2I are equal.

Parameters
objThe Object to compare with the current BoundingBox2I.

Definition at line 155 of file BoundingBox2I.cs.

Vector2I [] VRageMath.BoundingBox2I.GetCorners ( )
inline

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

Definition at line 77 of file BoundingBox2I.cs.

void VRageMath.BoundingBox2I.GetCorners ( Vector2I[]  corners)
inline

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

Parameters
cornersAn existing array of at least 8 Vector2I points where the corners of the BoundingBox2I are written.

Definition at line 96 of file BoundingBox2I.cs.

unsafe void VRageMath.BoundingBox2I.GetCornersUnsafe ( Vector2I corners)
inline

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

Parameters
cornersAn existing array of at least 8 Vector2I points where the corners of the BoundingBox2I are written.

Definition at line 120 of file BoundingBox2I.cs.

override int VRageMath.BoundingBox2I.GetHashCode ( )
inline

Gets the hash code for this instance.

Definition at line 166 of file BoundingBox2I.cs.

BoundingBox2I VRageMath.BoundingBox2I.GetIncluded ( Vector2I  point)
inline

Definition at line 397 of file BoundingBox2I.cs.

BoundingBox2I VRageMath.BoundingBox2I.Include ( ref Vector2I  point)
inline

return expanded aabb (abb include point)

Parameters
point
Returns

Definition at line 388 of file BoundingBox2I.cs.

BoundingBox2I VRageMath.BoundingBox2I.Include ( Vector2I  point)
inline

Definition at line 404 of file BoundingBox2I.cs.

BoundingBox2I VRageMath.BoundingBox2I.Include ( Vector2I  p0,
Vector2I  p1,
Vector2I  p2 
)
inline

Definition at line 409 of file BoundingBox2I.cs.

BoundingBox2I VRageMath.BoundingBox2I.Include ( ref Vector2I  p0,
ref Vector2I  p1,
ref Vector2I  p2 
)
inline

Definition at line 414 of file BoundingBox2I.cs.

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

return expanded aabb (abb include point)

Parameters
box
Returns

Definition at line 428 of file BoundingBox2I.cs.

BoundingBox2I VRageMath.BoundingBox2I.Include ( BoundingBox2I  box)
inline

Definition at line 434 of file BoundingBox2I.cs.

void VRageMath.BoundingBox2I.Inflate ( int  size)
inline

Definition at line 463 of file BoundingBox2I.cs.

void VRageMath.BoundingBox2I.InflateToMinimum ( Vector2I  minimumSize)
inline

Definition at line 469 of file BoundingBox2I.cs.

BoundingBox2I VRageMath.BoundingBox2I.Intersect ( BoundingBox2I  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 243 of file BoundingBox2I.cs.

bool VRageMath.BoundingBox2I.Intersects ( BoundingBox2I  box)
inline

Checks whether the current BoundingBox2I intersects another BoundingBox2I.

Parameters
boxThe BoundingBox2I to check for intersection with.

Definition at line 257 of file BoundingBox2I.cs.

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

Definition at line 262 of file BoundingBox2I.cs.

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

Checks whether the current BoundingBox2I intersects another BoundingBox2I.

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

Definition at line 271 of file BoundingBox2I.cs.

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

Determines whether two instances of BoundingBox2I 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 BoundingBox2I.cs.

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

Determines whether two instances of BoundingBox2I are equal.

Parameters
aBoundingBox2I to compare.
bBoundingBox2I to compare.

Definition at line 58 of file BoundingBox2I.cs.

float VRageMath.BoundingBox2I.Perimeter ( )
inline

Definition at line 451 of file BoundingBox2I.cs.

void VRageMath.BoundingBox2I.Scale ( Vector2I  scale)
inline

Definition at line 503 of file BoundingBox2I.cs.

override string VRageMath.BoundingBox2I.ToString ( )
inline

Returns a String that represents the current BoundingBox2I.

Definition at line 174 of file BoundingBox2I.cs.

BoundingBox2I VRageMath.BoundingBox2I.Translate ( Vector2I  vctTranlsation)
inline

Translate

Parameters
vctTranlsation
Returns

Definition at line 364 of file BoundingBox2I.cs.

Member Data Documentation

const int VRageMath.BoundingBox2I.CornerCount = 8

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

Definition at line 16 of file BoundingBox2I.cs.

Vector2I VRageMath.BoundingBox2I.Max

The maximum point the BoundingBox2I contains.

Definition at line 26 of file BoundingBox2I.cs.

Vector2I VRageMath.BoundingBox2I.Min

The minimum point the BoundingBox2I contains.

Definition at line 21 of file BoundingBox2I.cs.

Property Documentation

Vector2I VRageMath.BoundingBox2I.Center
get

Calculates center

Definition at line 283 of file BoundingBox2I.cs.

Vector2I VRageMath.BoundingBox2I.Extents
get

Definition at line 293 of file BoundingBox2I.cs.

Vector2I VRageMath.BoundingBox2I.HalfExtents
get

Definition at line 288 of file BoundingBox2I.cs.

float VRageMath.BoundingBox2I.Height
get

Definition at line 303 of file BoundingBox2I.cs.

Vector2I VRageMath.BoundingBox2I.Size
get

Size

Returns

Definition at line 376 of file BoundingBox2I.cs.

float VRageMath.BoundingBox2I.Width
get

Definition at line 298 of file BoundingBox2I.cs.


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