Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
VRageMath.MyOrientedBoundingBox Struct Reference
Inheritance diagram for VRageMath.MyOrientedBoundingBox:

Public Member Functions

 MyOrientedBoundingBox (ref Matrix matrix)
 Initializes a new instance of the MyOrientedBoundingBox. Scale of matrix is size of box More...
 
 MyOrientedBoundingBox (Vector3 center, Vector3 halfExtents, Quaternion orientation)
 
MyOrientedBoundingBox Transform (Quaternion rotation, Vector3 translation)
 
MyOrientedBoundingBox Transform (float scale, Quaternion rotation, Vector3 translation)
 
void Transform (Matrix matrix)
 
bool Equals (MyOrientedBoundingBox other)
 
override bool Equals (Object obj)
 
override int GetHashCode ()
 
override string ToString ()
 
bool Intersects (ref BoundingBox box)
 
ContainmentType Contains (ref BoundingBox box)
 
bool Intersects (ref MyOrientedBoundingBox other)
 
ContainmentType Contains (ref MyOrientedBoundingBox other)
 
ContainmentType Contains (BoundingFrustum frustum)
 
bool Intersects (BoundingFrustum frustum)
 
ContainmentType Contains (ref BoundingSphere sphere)
 
bool Intersects (ref BoundingSphere sphere)
 
bool Contains (ref Vector3 point)
 
float Intersects (ref Ray ray)
 
float Intersects (ref Line line)
 
PlaneIntersectionType Intersects (ref Plane plane)
 
void GetCorners (Vector3[] corners, int startIndex)
 
BoundingFrustum ConvertToFrustum ()
 
BoundingBox GetAABB ()
 

Static Public Member Functions

static bool GetNormalBetweenEdges (int axis, int edge0, int edge1, out Vector3 normal)
 Returns normal between two cube edge of same direction More...
 
static MyOrientedBoundingBox CreateFromBoundingBox (BoundingBox box)
 
static bool operator== (MyOrientedBoundingBox a, MyOrientedBoundingBox b)
 
static bool operator!= (MyOrientedBoundingBox a, MyOrientedBoundingBox b)
 
static ContainmentType Contains (ref BoundingBox boxA, ref MyOrientedBoundingBox oboxB)
 
static ContainmentType Contains (BoundingFrustum frustum, ref MyOrientedBoundingBox obox)
 
static ContainmentType Contains (ref BoundingSphere sphere, ref MyOrientedBoundingBox box)
 
static ContainmentType ContainsRelativeBox (ref Vector3 hA, ref Vector3 hB, ref Matrix mB)
 
static MyOrientedBoundingBox Create (BoundingBox boundingBox, Matrix matrix)
 

Public Attributes

const int CornerCount = 8
 
const float RAY_EPSILON = 1e-20F
 
Vector3 Center
 
Vector3 HalfExtent
 
Quaternion Orientation
 

Static Public Attributes

static readonly int[] StartVertices
 
static readonly int[] EndVertices
 
static readonly int[] StartXVertices
 
static readonly int[] EndXVertices
 
static readonly int[] StartYVertices
 
static readonly int[] EndYVertices
 
static readonly int[] StartZVertices
 
static readonly int[] EndZVertices
 
static readonly Vector3[] XNeighbourVectorsBack
 
static readonly Vector3[] XNeighbourVectorsForw
 
static readonly Vector3[] YNeighbourVectorsBack
 
static readonly Vector3[] YNeighbourVectorsForw
 
static readonly Vector3[] ZNeighbourVectorsBack
 
static readonly Vector3[] ZNeighbourVectorsForw
 

Detailed Description

Definition at line 8 of file MyOrientedBoundingBox.cs.

Constructor & Destructor Documentation

VRageMath.MyOrientedBoundingBox.MyOrientedBoundingBox ( ref Matrix  matrix)
inline

Initializes a new instance of the MyOrientedBoundingBox. Scale of matrix is size of box

Definition at line 234 of file MyOrientedBoundingBox.cs.

VRageMath.MyOrientedBoundingBox.MyOrientedBoundingBox ( Vector3  center,
Vector3  halfExtents,
Quaternion  orientation 
)
inline

Definition at line 249 of file MyOrientedBoundingBox.cs.

Member Function Documentation

ContainmentType VRageMath.MyOrientedBoundingBox.Contains ( ref BoundingBox  box)
inline

Definition at line 351 of file MyOrientedBoundingBox.cs.

static ContainmentType VRageMath.MyOrientedBoundingBox.Contains ( ref BoundingBox  boxA,
ref MyOrientedBoundingBox  oboxB 
)
inlinestatic

Definition at line 367 of file MyOrientedBoundingBox.cs.

ContainmentType VRageMath.MyOrientedBoundingBox.Contains ( ref MyOrientedBoundingBox  other)
inline

Definition at line 389 of file MyOrientedBoundingBox.cs.

ContainmentType VRageMath.MyOrientedBoundingBox.Contains ( BoundingFrustum  frustum)
inline

Definition at line 409 of file MyOrientedBoundingBox.cs.

static ContainmentType VRageMath.MyOrientedBoundingBox.Contains ( BoundingFrustum  frustum,
ref MyOrientedBoundingBox  obox 
)
inlinestatic

Definition at line 427 of file MyOrientedBoundingBox.cs.

ContainmentType VRageMath.MyOrientedBoundingBox.Contains ( ref BoundingSphere  sphere)
inline

Definition at line 437 of file MyOrientedBoundingBox.cs.

static ContainmentType VRageMath.MyOrientedBoundingBox.Contains ( ref BoundingSphere  sphere,
ref MyOrientedBoundingBox  box 
)
inlinestatic

Definition at line 486 of file MyOrientedBoundingBox.cs.

bool VRageMath.MyOrientedBoundingBox.Contains ( ref Vector3  point)
inline

Definition at line 519 of file MyOrientedBoundingBox.cs.

static ContainmentType VRageMath.MyOrientedBoundingBox.ContainsRelativeBox ( ref Vector3  hA,
ref Vector3  hB,
ref Matrix  mB 
)
inlinestatic

Definition at line 762 of file MyOrientedBoundingBox.cs.

BoundingFrustum VRageMath.MyOrientedBoundingBox.ConvertToFrustum ( )
inline

Definition at line 880 of file MyOrientedBoundingBox.cs.

static MyOrientedBoundingBox VRageMath.MyOrientedBoundingBox.Create ( BoundingBox  boundingBox,
Matrix  matrix 
)
inlinestatic

Definition at line 906 of file MyOrientedBoundingBox.cs.

static MyOrientedBoundingBox VRageMath.MyOrientedBoundingBox.CreateFromBoundingBox ( BoundingBox  box)
inlinestatic

Definition at line 259 of file MyOrientedBoundingBox.cs.

bool VRageMath.MyOrientedBoundingBox.Equals ( MyOrientedBoundingBox  other)
inline

Definition at line 294 of file MyOrientedBoundingBox.cs.

override bool VRageMath.MyOrientedBoundingBox.Equals ( Object  obj)
inline

Definition at line 299 of file MyOrientedBoundingBox.cs.

BoundingBox VRageMath.MyOrientedBoundingBox.GetAABB ( )
inline

Definition at line 898 of file MyOrientedBoundingBox.cs.

void VRageMath.MyOrientedBoundingBox.GetCorners ( Vector3[]  corners,
int  startIndex 
)
inline

Definition at line 739 of file MyOrientedBoundingBox.cs.

override int VRageMath.MyOrientedBoundingBox.GetHashCode ( )
inline

Definition at line 312 of file MyOrientedBoundingBox.cs.

static bool VRageMath.MyOrientedBoundingBox.GetNormalBetweenEdges ( int  axis,
int  edge0,
int  edge1,
out Vector3  normal 
)
inlinestatic

Returns normal between two cube edge of same direction

Parameters
axisEdge direction axis (0 = X, 1 = Y, 2 = Z)
edge0
edge1
normal
Returns
false if edges are not neighbors

Definition at line 153 of file MyOrientedBoundingBox.cs.

bool VRageMath.MyOrientedBoundingBox.Intersects ( ref BoundingBox  box)
inline

Definition at line 339 of file MyOrientedBoundingBox.cs.

bool VRageMath.MyOrientedBoundingBox.Intersects ( ref MyOrientedBoundingBox  other)
inline

Definition at line 382 of file MyOrientedBoundingBox.cs.

bool VRageMath.MyOrientedBoundingBox.Intersects ( BoundingFrustum  frustum)
inline

Definition at line 420 of file MyOrientedBoundingBox.cs.

bool VRageMath.MyOrientedBoundingBox.Intersects ( ref BoundingSphere  sphere)
inline

Definition at line 465 of file MyOrientedBoundingBox.cs.

float VRageMath.MyOrientedBoundingBox.Intersects ( ref Ray  ray)
inline

Definition at line 534 of file MyOrientedBoundingBox.cs.

float VRageMath.MyOrientedBoundingBox.Intersects ( ref Line  line)
inline

Definition at line 639 of file MyOrientedBoundingBox.cs.

PlaneIntersectionType VRageMath.MyOrientedBoundingBox.Intersects ( ref Plane  plane)
inline

Definition at line 678 of file MyOrientedBoundingBox.cs.

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

Definition at line 322 of file MyOrientedBoundingBox.cs.

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

Definition at line 317 of file MyOrientedBoundingBox.cs.

override string VRageMath.MyOrientedBoundingBox.ToString ( )
inline

Definition at line 327 of file MyOrientedBoundingBox.cs.

MyOrientedBoundingBox VRageMath.MyOrientedBoundingBox.Transform ( Quaternion  rotation,
Vector3  translation 
)
inline

Definition at line 268 of file MyOrientedBoundingBox.cs.

MyOrientedBoundingBox VRageMath.MyOrientedBoundingBox.Transform ( float  scale,
Quaternion  rotation,
Vector3  translation 
)
inline

Definition at line 277 of file MyOrientedBoundingBox.cs.

void VRageMath.MyOrientedBoundingBox.Transform ( Matrix  matrix)
inline

Definition at line 284 of file MyOrientedBoundingBox.cs.

Member Data Documentation

Vector3 VRageMath.MyOrientedBoundingBox.Center

Definition at line 223 of file MyOrientedBoundingBox.cs.

const int VRageMath.MyOrientedBoundingBox.CornerCount = 8

Definition at line 11 of file MyOrientedBoundingBox.cs.

readonly int [] VRageMath.MyOrientedBoundingBox.EndVertices
static
Initial value:
= new int[]
{
1,
5,
4,
0,
2,
6,
7,
3,
3,
2,
6,
7,
}

Definition at line 33 of file MyOrientedBoundingBox.cs.

readonly int [] VRageMath.MyOrientedBoundingBox.EndXVertices
static
Initial value:
= new int[]
{
1,
5,
6,
2,
}

Definition at line 57 of file MyOrientedBoundingBox.cs.

readonly int [] VRageMath.MyOrientedBoundingBox.EndYVertices
static
Initial value:
= new int[]
{
3,
2,
6,
7,
}

Definition at line 73 of file MyOrientedBoundingBox.cs.

readonly int [] VRageMath.MyOrientedBoundingBox.EndZVertices
static
Initial value:
= new int[]
{
4,
7,
6,
5,
}

Definition at line 89 of file MyOrientedBoundingBox.cs.

Vector3 VRageMath.MyOrientedBoundingBox.HalfExtent

Definition at line 224 of file MyOrientedBoundingBox.cs.

Quaternion VRageMath.MyOrientedBoundingBox.Orientation

Definition at line 225 of file MyOrientedBoundingBox.cs.

const float VRageMath.MyOrientedBoundingBox.RAY_EPSILON = 1e-20F

Definition at line 14 of file MyOrientedBoundingBox.cs.

readonly int [] VRageMath.MyOrientedBoundingBox.StartVertices
static
Initial value:
= new int[]
{
0,
1,
5,
4,
3,
2,
6,
7,
0,
1,
5,
4,
}

Definition at line 17 of file MyOrientedBoundingBox.cs.

readonly int [] VRageMath.MyOrientedBoundingBox.StartXVertices
static
Initial value:
= new int[]
{
0,
4,
7,
3,
}

Definition at line 49 of file MyOrientedBoundingBox.cs.

readonly int [] VRageMath.MyOrientedBoundingBox.StartYVertices
static
Initial value:
= new int[]
{
0,
1,
5,
4,
}

Definition at line 65 of file MyOrientedBoundingBox.cs.

readonly int [] VRageMath.MyOrientedBoundingBox.StartZVertices
static
Initial value:
= new int[]
{
0,
3,
2,
1,
}

Definition at line 81 of file MyOrientedBoundingBox.cs.

readonly Vector3 [] VRageMath.MyOrientedBoundingBox.XNeighbourVectorsBack
static
Initial value:
= new Vector3[]
{
new Vector3(0, 0, 1),
new Vector3(0, 1, 0),
new Vector3(0, 0, -1),
new Vector3(0, -1, 0),
}

Definition at line 97 of file MyOrientedBoundingBox.cs.

readonly Vector3 [] VRageMath.MyOrientedBoundingBox.XNeighbourVectorsForw
static
Initial value:
= new Vector3[]
{
new Vector3(0, 0, -1),
new Vector3(0, -1, 0),
new Vector3(0, 0, 1),
new Vector3(0, 1, 0),
}

Definition at line 105 of file MyOrientedBoundingBox.cs.

readonly Vector3 [] VRageMath.MyOrientedBoundingBox.YNeighbourVectorsBack
static
Initial value:
= new Vector3[]
{
new Vector3(1, 0, 0),
new Vector3(0, 0, 1),
new Vector3(-1, 0, 0),
new Vector3(0, 0, -1),
}

Definition at line 113 of file MyOrientedBoundingBox.cs.

readonly Vector3 [] VRageMath.MyOrientedBoundingBox.YNeighbourVectorsForw
static
Initial value:
= new Vector3[]
{
new Vector3(-1, 0, 0),
new Vector3(0, 0, -1),
new Vector3(1, 0, 0),
new Vector3(0, 0, 1),
}

Definition at line 121 of file MyOrientedBoundingBox.cs.

readonly Vector3 [] VRageMath.MyOrientedBoundingBox.ZNeighbourVectorsBack
static
Initial value:
= new Vector3[]
{
new Vector3(0, 1, 0),
new Vector3(1, 0, 0),
new Vector3(0, -1, 0),
new Vector3(-1, 0, 0),
}

Definition at line 129 of file MyOrientedBoundingBox.cs.

readonly Vector3 [] VRageMath.MyOrientedBoundingBox.ZNeighbourVectorsForw
static
Initial value:
= new Vector3[]
{
new Vector3(0, -1, 0),
new Vector3(-1, 0, 0),
new Vector3(0, 1, 0),
new Vector3(1, 0, 0),
}

Definition at line 137 of file MyOrientedBoundingBox.cs.


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