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

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

Inheritance diagram for VRageMath.BoundingBox2D:

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

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

Properties

Vector2D Center [get]
 Calculates center More...
 
Vector2D HalfExtents [get]
 
Vector2D Extents [get]
 
double Width [get]
 
double Height [get]
 
Vector2D Size [get]
 Size More...
 

Detailed Description

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

Definition at line 11 of file BoundingBox2D.cs.

Constructor & Destructor Documentation

VRageMath.BoundingBox2D.BoundingBox2D ( Vector2D  min,
Vector2D  max 
)
inline

Creates an instance of BoundingBox2D.

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

Definition at line 32 of file BoundingBox2D.cs.

Member Function Documentation

double VRageMath.BoundingBox2D.Area ( )
inline

Definition at line 466 of file BoundingBox2D.cs.

ContainmentType VRageMath.BoundingBox2D.Contains ( BoundingBox2D  box)
inline

Tests whether the BoundingBox2D contains another BoundingBox2D.

Parameters
boxThe BoundingBox2D to test for overlap.

Definition at line 320 of file BoundingBox2D.cs.

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

Tests whether the BoundingBox2D contains a BoundingBox2D.

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

Definition at line 331 of file BoundingBox2D.cs.

ContainmentType VRageMath.BoundingBox2D.Contains ( Vector2D  point)
inline

Tests whether the BoundingBox2D contains a point.

Parameters
pointThe point to test for overlap.

Definition at line 343 of file BoundingBox2D.cs.

void VRageMath.BoundingBox2D.Contains ( ref Vector2D  point,
out ContainmentType  result 
)
inline

Tests whether the BoundingBox2D contains a point.

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

Definition at line 357 of file BoundingBox2D.cs.

static BoundingBox2D VRageMath.BoundingBox2D.CreateFromHalfExtent ( Vector2D  center,
double  halfExtent 
)
inlinestatic

Definition at line 231 of file BoundingBox2D.cs.

static BoundingBox2D VRageMath.BoundingBox2D.CreateFromHalfExtent ( Vector2D  center,
Vector2D  halfExtent 
)
inlinestatic

Definition at line 236 of file BoundingBox2D.cs.

static BoundingBox2D VRageMath.BoundingBox2D.CreateFromPoints ( IEnumerable< Vector2D points)
inlinestatic

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

Parameters
pointsA list of points the BoundingBox2D should contain.

Definition at line 211 of file BoundingBox2D.cs.

static BoundingBox2D VRageMath.BoundingBox2D.CreateInvalid ( )
inlinestatic

Definition at line 448 of file BoundingBox2D.cs.

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

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

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

Definition at line 185 of file BoundingBox2D.cs.

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

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

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

Definition at line 197 of file BoundingBox2D.cs.

double VRageMath.BoundingBox2D.Distance ( Vector2D  point)
inline

Definition at line 310 of file BoundingBox2D.cs.

bool VRageMath.BoundingBox2D.Equals ( BoundingBox2D  other)
inline

Determines whether two instances of BoundingBox2D are equal.

Parameters
otherThe BoundingBox2D to compare with the current BoundingBox2D.

Definition at line 145 of file BoundingBox2D.cs.

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

Determines whether two instances of BoundingBox2D are equal.

Parameters
objThe Object to compare with the current BoundingBox2D.

Definition at line 157 of file BoundingBox2D.cs.

Vector2D [] VRageMath.BoundingBox2D.GetCorners ( )
inline

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

Definition at line 78 of file BoundingBox2D.cs.

void VRageMath.BoundingBox2D.GetCorners ( Vector2D[]  corners)
inline

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

Parameters
cornersAn existing array of at least 8 Vector2D points where the corners of the BoundingBox2D are written.

Definition at line 97 of file BoundingBox2D.cs.

unsafe void VRageMath.BoundingBox2D.GetCornersUnsafe ( Vector2D corners)
inline

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

Parameters
cornersAn existing array of at least 8 Vector2D points where the corners of the BoundingBox2D are written.

Definition at line 121 of file BoundingBox2D.cs.

override int VRageMath.BoundingBox2D.GetHashCode ( )
inline

Gets the hash code for this instance.

Definition at line 168 of file BoundingBox2D.cs.

BoundingBox2D VRageMath.BoundingBox2D.GetIncluded ( Vector2D  point)
inline

Definition at line 406 of file BoundingBox2D.cs.

BoundingBox2D VRageMath.BoundingBox2D.Include ( ref Vector2D  point)
inline

return expanded aabb (abb include point)

Parameters
point
Returns

Definition at line 397 of file BoundingBox2D.cs.

BoundingBox2D VRageMath.BoundingBox2D.Include ( Vector2D  point)
inline

Definition at line 413 of file BoundingBox2D.cs.

BoundingBox2D VRageMath.BoundingBox2D.Include ( Vector2D  p0,
Vector2D  p1,
Vector2D  p2 
)
inline

Definition at line 418 of file BoundingBox2D.cs.

BoundingBox2D VRageMath.BoundingBox2D.Include ( ref Vector2D  p0,
ref Vector2D  p1,
ref Vector2D  p2 
)
inline

Definition at line 423 of file BoundingBox2D.cs.

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

return expanded aabb (abb include point)

Parameters
box
Returns

Definition at line 437 of file BoundingBox2D.cs.

BoundingBox2D VRageMath.BoundingBox2D.Include ( BoundingBox2D  box)
inline

Definition at line 443 of file BoundingBox2D.cs.

void VRageMath.BoundingBox2D.Inflate ( double  size)
inline

Definition at line 472 of file BoundingBox2D.cs.

void VRageMath.BoundingBox2D.InflateToMinimum ( Vector2D  minimumSize)
inline

Definition at line 478 of file BoundingBox2D.cs.

BoundingBox2D VRageMath.BoundingBox2D.Intersect ( BoundingBox2D  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 BoundingBox2D.cs.

bool VRageMath.BoundingBox2D.Intersects ( BoundingBox2D  box)
inline

Checks whether the current BoundingBox2D intersects another BoundingBox2D.

Parameters
boxThe BoundingBox2D to check for intersection with.

Definition at line 260 of file BoundingBox2D.cs.

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

Definition at line 265 of file BoundingBox2D.cs.

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

Checks whether the current BoundingBox2D intersects another BoundingBox2D.

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

Definition at line 274 of file BoundingBox2D.cs.

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

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

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

Determines whether two instances of BoundingBox2D are equal.

Parameters
aBoundingBox2D to compare.
bBoundingBox2D to compare.

Definition at line 58 of file BoundingBox2D.cs.

double VRageMath.BoundingBox2D.Perimeter ( )
inline

Definition at line 460 of file BoundingBox2D.cs.

void VRageMath.BoundingBox2D.Scale ( Vector2D  scale)
inline

Definition at line 512 of file BoundingBox2D.cs.

override string VRageMath.BoundingBox2D.ToString ( )
inline

Returns a String that represents the current BoundingBox2D.

Definition at line 176 of file BoundingBox2D.cs.

BoundingBox2D VRageMath.BoundingBox2D.Translate ( Vector2D  vctTranlsation)
inline

Translate

Parameters
vctTranlsation
Returns

Definition at line 373 of file BoundingBox2D.cs.

Member Data Documentation

const int VRageMath.BoundingBox2D.CornerCount = 8

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

Definition at line 16 of file BoundingBox2D.cs.

Vector2D VRageMath.BoundingBox2D.Max

The maximum point the BoundingBox2D contains.

Definition at line 26 of file BoundingBox2D.cs.

Vector2D VRageMath.BoundingBox2D.Min

The minimum point the BoundingBox2D contains.

Definition at line 21 of file BoundingBox2D.cs.

Property Documentation

Vector2D VRageMath.BoundingBox2D.Center
get

Calculates center

Definition at line 286 of file BoundingBox2D.cs.

Vector2D VRageMath.BoundingBox2D.Extents
get

Definition at line 296 of file BoundingBox2D.cs.

Vector2D VRageMath.BoundingBox2D.HalfExtents
get

Definition at line 291 of file BoundingBox2D.cs.

double VRageMath.BoundingBox2D.Height
get

Definition at line 306 of file BoundingBox2D.cs.

Vector2D VRageMath.BoundingBox2D.Size
get

Size

Returns

Definition at line 385 of file BoundingBox2D.cs.

double VRageMath.BoundingBox2D.Width
get

Definition at line 301 of file BoundingBox2D.cs.


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