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

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

Inheritance diagram for VRageMath.BoundingBoxI:

Public Member Functions

 BoundingBoxI (BoundingBox box)
 Creates an instance of BoundingBoxI. More...
 
 BoundingBoxI (Vector3I min, Vector3I max)
 Creates an instance of BoundingBoxI. More...
 
 BoundingBoxI (int min, int max)
 Creates an instance of BoundingBoxI. More...
 
Vector3I[] GetCorners ()
 Gets an array of points that make up the corners of the BoundingBoxI. More...
 
void GetCorners (Vector3I[] corners)
 Gets the array of points that make up the corners of the BoundingBoxI. More...
 
unsafe void GetCornersUnsafe (Vector3I *corners)
 Gets the array of points that make up the corners of the BoundingBoxI. More...
 
bool Equals (BoundingBoxI other)
 Determines whether two instances of BoundingBoxI are equal. More...
 
override bool Equals (object obj)
 Determines whether two instances of BoundingBoxI are equal. More...
 
override int GetHashCode ()
 Gets the hash code for this instance. More...
 
override string ToString ()
 Returns a String that represents the current BoundingBoxI. More...
 
void IntersectWith (ref BoundingBoxI 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...
 
BoundingBoxI Intersect (BoundingBox 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 (BoundingBoxI box)
 Checks whether the current BoundingBoxI intersects another BoundingBoxI. More...
 
bool Intersects (ref BoundingBoxI box)
 
void Intersects (ref BoundingBoxI box, out bool result)
 Checks whether the current BoundingBoxI intersects another BoundingBoxI. More...
 
bool IntersectsTriangle (Vector3I v0, Vector3I v1, Vector3I v2)
 
bool IntersectsTriangle (ref Vector3I v0, ref Vector3I v1, ref Vector3I v2)
 
PlaneIntersectionType Intersects (Plane plane)
 Checks whether the current BoundingBoxI intersects a BoundingFrustum. More...
 
void Intersects (ref Plane plane, out PlaneIntersectionType result)
 Checks whether the current BoundingBoxI intersects a Plane. More...
 
bool Intersects (Line line, out float distance)
 
float Intersects (Ray ray)
 Checks whether the current BoundingBoxI intersects a Ray. More...
 
void Intersects (ref Ray ray, out float?result)
 Checks whether the current BoundingBoxI intersects a Ray. More...
 
float Distance (Vector3I point)
 Checks whether the current BoundingBoxI intersects a BoundingSphere. More...
 
ContainmentType Contains (BoundingBoxI box)
 Tests whether the BoundingBoxI contains another BoundingBoxI. More...
 
void Contains (ref BoundingBoxI box, out ContainmentType result)
 Tests whether the BoundingBoxI contains a BoundingBoxI. More...
 
ContainmentType Contains (Vector3I point)
 Tests whether the BoundingBoxI contains a BoundingFrustum. More...
 
ContainmentType Contains (Vector3 point)
 
void Contains (ref Vector3I point, out ContainmentType result)
 Tests whether the BoundingBoxI contains a point. More...
 
BoundingBoxI Translate (Vector3I vctTranlsation)
 Translate More...
 
BoundingBoxI Include (ref Vector3I point)
 Matrix of AABB, respection center and size More...
 
BoundingBoxI GetIncluded (Vector3I 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) More...
 
BoundingBoxI Include (BoundingBoxI box)
 
float SurfaceArea ()
 
float Volume ()
 
void Inflate (int size)
 
void InflateToMinimum (Vector3I minimumSize)
 

Static Public Member Functions

static bool operator== (BoundingBoxI a, BoundingBoxI b)
 Determines whether two instances of BoundingBoxI are equal. More...
 
static bool operator!= (BoundingBoxI a, BoundingBoxI b)
 Determines whether two instances of BoundingBoxI are not equal. More...
 
static BoundingBoxI CreateMerged (BoundingBoxI original, BoundingBoxI additional)
 Creates the smallest BoundingBoxI that contains the two specified BoundingBoxI instances. More...
 
static void CreateMerged (ref BoundingBoxI original, ref BoundingBoxI additional, out BoundingBoxI result)
 Creates the smallest BoundingBoxI that contains the two specified BoundingBoxI instances. More...
 
static BoundingBoxI CreateFromSphere (BoundingSphere sphere)
 Creates the smallest BoundingBoxI that will contain the specified BoundingSphere. More...
 
static void CreateFromSphere (ref BoundingSphere sphere, out BoundingBoxI result)
 Creates the smallest BoundingBoxI that will contain the specified BoundingSphere. More...
 
static BoundingBoxI CreateFromPoints (IEnumerable< Vector3I > points)
 Creates the smallest BoundingBoxI that will contain a group of points. More...
 
static BoundingBoxI CreateInvalid ()
 

Public Attributes

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

Properties

Vector3I Center [get]
 Calculates center More...
 
Vector3I HalfExtents [get]
 
Vector3I Size [get]
 Size More...
 
float Perimeter [get]
 return perimeter of edges More...
 
bool IsValid [get]
 

Detailed Description

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

Definition at line 11 of file BoundingBoxI.cs.

Constructor & Destructor Documentation

VRageMath.BoundingBoxI.BoundingBoxI ( BoundingBox  box)
inline

Creates an instance of BoundingBoxI.

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

Definition at line 32 of file BoundingBoxI.cs.

VRageMath.BoundingBoxI.BoundingBoxI ( Vector3I  min,
Vector3I  max 
)
inline

Creates an instance of BoundingBoxI.

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

Definition at line 42 of file BoundingBoxI.cs.

VRageMath.BoundingBoxI.BoundingBoxI ( int  min,
int  max 
)
inline

Creates an instance of BoundingBoxI.

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

Definition at line 52 of file BoundingBoxI.cs.

Member Function Documentation

ContainmentType VRageMath.BoundingBoxI.Contains ( BoundingBoxI  box)
inline

Tests whether the BoundingBoxI contains another BoundingBoxI.

Parameters
boxThe BoundingBoxI to test for overlap.

Definition at line 734 of file BoundingBoxI.cs.

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

Tests whether the BoundingBoxI contains a BoundingBoxI.

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

Definition at line 745 of file BoundingBoxI.cs.

ContainmentType VRageMath.BoundingBoxI.Contains ( Vector3I  point)
inline

Tests whether the BoundingBoxI contains a BoundingFrustum.

Parameters
frustumThe BoundingFrustum to test for overlap.

Tests whether the BoundingBoxI contains a point.

Parameters
pointThe point to test for overlap.

Definition at line 773 of file BoundingBoxI.cs.

ContainmentType VRageMath.BoundingBoxI.Contains ( Vector3  point)
inline

Definition at line 778 of file BoundingBoxI.cs.

void VRageMath.BoundingBoxI.Contains ( ref Vector3I  point,
out ContainmentType  result 
)
inline

Tests whether the BoundingBoxI contains a point.

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

Definition at line 787 of file BoundingBoxI.cs.

static BoundingBoxI VRageMath.BoundingBoxI.CreateFromPoints ( IEnumerable< Vector3I points)
inlinestatic

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

Parameters
pointsA list of points the BoundingBoxI should contain.

Definition at line 265 of file BoundingBoxI.cs.

static BoundingBoxI VRageMath.BoundingBoxI.CreateFromSphere ( BoundingSphere  sphere)
inlinestatic

Creates the smallest BoundingBoxI that will contain the specified BoundingSphere.

Parameters
sphereThe BoundingSphere to contain.

Definition at line 235 of file BoundingBoxI.cs.

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

Creates the smallest BoundingBoxI that will contain the specified BoundingSphere.

Parameters
sphereThe BoundingSphere to contain.
result[OutAttribute] The created BoundingBoxI.

Definition at line 251 of file BoundingBoxI.cs.

static BoundingBoxI VRageMath.BoundingBoxI.CreateInvalid ( )
inlinestatic

Definition at line 1052 of file BoundingBoxI.cs.

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

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

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

Definition at line 209 of file BoundingBoxI.cs.

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

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

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

Definition at line 221 of file BoundingBoxI.cs.

float VRageMath.BoundingBoxI.Distance ( Vector3I  point)
inline

Checks whether the current BoundingBoxI intersects a BoundingSphere.

Parameters
sphereThe BoundingSphere to check for intersection with.

Checks whether the current BoundingBoxI intersects a BoundingSphere.

Parameters
sphereThe BoundingSphere to check for intersection with.
result[OutAttribute] true if the BoundingBoxI and BoundingSphere intersect; false otherwise.

Definition at line 724 of file BoundingBoxI.cs.

bool VRageMath.BoundingBoxI.Equals ( BoundingBoxI  other)
inline

Determines whether two instances of BoundingBoxI are equal.

Parameters
otherThe BoundingBoxI to compare with the current BoundingBoxI.

Definition at line 165 of file BoundingBoxI.cs.

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

Determines whether two instances of BoundingBoxI are equal.

Parameters
objThe Object to compare with the current BoundingBoxI.

Definition at line 177 of file BoundingBoxI.cs.

Vector3I [] VRageMath.BoundingBoxI.GetCorners ( )
inline

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

Definition at line 82 of file BoundingBoxI.cs.

void VRageMath.BoundingBoxI.GetCorners ( Vector3I[]  corners)
inline

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

Parameters
cornersAn existing array of at least 8 Vector3I points where the corners of the BoundingBoxI are written.

Definition at line 101 of file BoundingBoxI.cs.

unsafe void VRageMath.BoundingBoxI.GetCornersUnsafe ( Vector3I corners)
inline

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

Parameters
cornersAn existing array of at least 8 Vector3I points where the corners of the BoundingBoxI are written.

Definition at line 134 of file BoundingBoxI.cs.

override int VRageMath.BoundingBoxI.GetHashCode ( )
inline

Gets the hash code for this instance.

Definition at line 188 of file BoundingBoxI.cs.

BoundingBoxI VRageMath.BoundingBoxI.GetIncluded ( Vector3I  point)
inline

Definition at line 961 of file BoundingBoxI.cs.

BoundingBoxI VRageMath.BoundingBoxI.Include ( ref Vector3I  point)
inline

Matrix of AABB, respection center and size

return expanded aabb (abb include point)

Parameters
bbox
point
Returns

Definition at line 937 of file BoundingBoxI.cs.

BoundingBoxI VRageMath.BoundingBoxI.Include ( Vector3I  point)
inline

Definition at line 968 of file BoundingBoxI.cs.

BoundingBoxI VRageMath.BoundingBoxI.Include ( Vector3I  p0,
Vector3I  p1,
Vector3I  p2 
)
inline

Definition at line 973 of file BoundingBoxI.cs.

BoundingBoxI VRageMath.BoundingBoxI.Include ( ref Vector3I  p0,
ref Vector3I  p1,
ref Vector3I  p2 
)
inline

Definition at line 978 of file BoundingBoxI.cs.

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

return expanded aabb (abb include point)

Parameters
bbox
point
Returns

Definition at line 993 of file BoundingBoxI.cs.

BoundingBoxI VRageMath.BoundingBoxI.Include ( BoundingBoxI  box)
inline

Definition at line 999 of file BoundingBoxI.cs.

void VRageMath.BoundingBoxI.Inflate ( int  size)
inline

Definition at line 1099 of file BoundingBoxI.cs.

void VRageMath.BoundingBoxI.InflateToMinimum ( Vector3I  minimumSize)
inline

Definition at line 1105 of file BoundingBoxI.cs.

BoundingBoxI VRageMath.BoundingBoxI.Intersect ( BoundingBox  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 305 of file BoundingBoxI.cs.

bool VRageMath.BoundingBoxI.Intersects ( BoundingBoxI  box)
inline

Checks whether the current BoundingBoxI intersects another BoundingBoxI.

Parameters
boxThe BoundingBoxI to check for intersection with.

Definition at line 321 of file BoundingBoxI.cs.

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

Definition at line 326 of file BoundingBoxI.cs.

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

Checks whether the current BoundingBoxI intersects another BoundingBoxI.

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

Definition at line 335 of file BoundingBoxI.cs.

PlaneIntersectionType VRageMath.BoundingBoxI.Intersects ( Plane  plane)
inline

Checks whether the current BoundingBoxI intersects a BoundingFrustum.

Parameters
frustumThe BoundingFrustum to check for intersection with.

Checks whether the current BoundingBoxI intersects a Plane.

Parameters
planeThe Plane to check for intersection with.

Definition at line 479 of file BoundingBoxI.cs.

void VRageMath.BoundingBoxI.Intersects ( ref Plane  plane,
out PlaneIntersectionType  result 
)
inline

Checks whether the current BoundingBoxI intersects a Plane.

Parameters
planeThe Plane to check for intersection with.
result[OutAttribute] An enumeration indicating whether the BoundingBoxI intersects the Plane.

Definition at line 498 of file BoundingBoxI.cs.

bool VRageMath.BoundingBoxI.Intersects ( Line  line,
out float  distance 
)
inline

Definition at line 517 of file BoundingBoxI.cs.

float VRageMath.BoundingBoxI.Intersects ( Ray  ray)
inline

Checks whether the current BoundingBoxI intersects a Ray.

Parameters
rayThe Ray to check for intersection with.

Definition at line 538 of file BoundingBoxI.cs.

void VRageMath.BoundingBoxI.Intersects ( ref Ray  ray,
out float?  result 
)
inline

Checks whether the current BoundingBoxI intersects a Ray.

Parameters
rayThe Ray to check for intersection with.
result[OutAttribute] Distance at which the ray intersects the BoundingBoxI, or null if there is no intersection.

Definition at line 612 of file BoundingBoxI.cs.

bool VRageMath.BoundingBoxI.IntersectsTriangle ( Vector3I  v0,
Vector3I  v1,
Vector3I  v2 
)
inline

Definition at line 343 of file BoundingBoxI.cs.

bool VRageMath.BoundingBoxI.IntersectsTriangle ( ref Vector3I  v0,
ref Vector3I  v1,
ref Vector3I  v2 
)
inline

Definition at line 348 of file BoundingBoxI.cs.

void VRageMath.BoundingBoxI.IntersectWith ( ref BoundingBoxI  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 290 of file BoundingBoxI.cs.

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

Determines whether two instances of BoundingBoxI 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 71 of file BoundingBoxI.cs.

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

Determines whether two instances of BoundingBoxI are equal.

Parameters
aBoundingBoxI to compare.
bBoundingBoxI to compare.

Definition at line 62 of file BoundingBoxI.cs.

float VRageMath.BoundingBoxI.SurfaceArea ( )
inline

Definition at line 1064 of file BoundingBoxI.cs.

override string VRageMath.BoundingBoxI.ToString ( )
inline

Returns a String that represents the current BoundingBoxI.

Definition at line 196 of file BoundingBoxI.cs.

BoundingBoxI VRageMath.BoundingBoxI.Translate ( Vector3I  vctTranlsation)
inline

Translate

Translate

Parameters
bbox
worldMatrix
Returns
Parameters
bbox
vctTranlsation
Returns

Definition at line 851 of file BoundingBoxI.cs.

float VRageMath.BoundingBoxI.Volume ( )
inline

Definition at line 1070 of file BoundingBoxI.cs.

Member Data Documentation

const int VRageMath.BoundingBoxI.CornerCount = 8

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

Definition at line 16 of file BoundingBoxI.cs.

Vector3I VRageMath.BoundingBoxI.Max

The maximum point the BoundingBoxI contains.

Definition at line 26 of file BoundingBoxI.cs.

Vector3I VRageMath.BoundingBoxI.Min

The minimum point the BoundingBoxI contains.

Definition at line 21 of file BoundingBoxI.cs.

Property Documentation

Vector3I VRageMath.BoundingBoxI.Center
get

Calculates center

Definition at line 454 of file BoundingBoxI.cs.

Vector3I VRageMath.BoundingBoxI.HalfExtents
get

Definition at line 459 of file BoundingBoxI.cs.

bool VRageMath.BoundingBoxI.IsValid
get

Definition at line 1126 of file BoundingBoxI.cs.

float VRageMath.BoundingBoxI.Perimeter
get

return perimeter of edges

Returns

Definition at line 1088 of file BoundingBoxI.cs.

Vector3I VRageMath.BoundingBoxI.Size
get

Size

Returns

Definition at line 863 of file BoundingBoxI.cs.


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