Class MyOrientedBoundingBox
Inheritance
System.Object
MyOrientedBoundingBox
Assembly: VRage.Math.dll
Syntax
public sealed class MyOrientedBoundingBox : ValueType, IEquatable<MyOrientedBoundingBox>
Constructors
MyOrientedBoundingBox(ref Matrix)
Initializes a new instance of the MyOrientedBoundingBox.
Scale of matrix is size of box
Declaration
public MyOrientedBoundingBox(ref Matrix matrix)
Parameters
Type |
Name |
Description |
Matrix |
matrix |
|
MyOrientedBoundingBox(Vector3, Vector3, Quaternion)
Declaration
public MyOrientedBoundingBox(Vector3 center, Vector3 halfExtents, Quaternion orientation)
Parameters
Fields
Center
Declaration
Field Value
CornerCount
Declaration
public const int CornerCount = 8
Field Value
Type |
Description |
System.Int32 |
|
EndVertices
Declaration
public static readonly int[] EndVertices
Field Value
Type |
Description |
System.Int32[] |
|
EndXVertices
Declaration
public static readonly int[] EndXVertices
Field Value
Type |
Description |
System.Int32[] |
|
EndYVertices
Declaration
public static readonly int[] EndYVertices
Field Value
Type |
Description |
System.Int32[] |
|
EndZVertices
Declaration
public static readonly int[] EndZVertices
Field Value
Type |
Description |
System.Int32[] |
|
HalfExtent
Declaration
public Vector3 HalfExtent
Field Value
Orientation
Declaration
public Quaternion Orientation
Field Value
StartVertices
Declaration
public static readonly int[] StartVertices
Field Value
Type |
Description |
System.Int32[] |
|
StartXVertices
Declaration
public static readonly int[] StartXVertices
Field Value
Type |
Description |
System.Int32[] |
|
StartYVertices
Declaration
public static readonly int[] StartYVertices
Field Value
Type |
Description |
System.Int32[] |
|
StartZVertices
Declaration
public static readonly int[] StartZVertices
Field Value
Type |
Description |
System.Int32[] |
|
XNeighbourVectorsBack
Declaration
public static readonly Vector3[] XNeighbourVectorsBack
Field Value
XNeighbourVectorsForw
Declaration
public static readonly Vector3[] XNeighbourVectorsForw
Field Value
YNeighbourVectorsBack
Declaration
public static readonly Vector3[] YNeighbourVectorsBack
Field Value
YNeighbourVectorsForw
Declaration
public static readonly Vector3[] YNeighbourVectorsForw
Field Value
ZNeighbourVectorsBack
Declaration
public static readonly Vector3[] ZNeighbourVectorsBack
Field Value
ZNeighbourVectorsForw
Declaration
public static readonly Vector3[] ZNeighbourVectorsForw
Field Value
Methods
Contains(ref BoundingBox)
Declaration
public ContainmentType Contains(ref BoundingBox box)
Parameters
Returns
Contains(ref BoundingBox, ref MyOrientedBoundingBox)
Declaration
public static ContainmentType Contains(ref BoundingBox boxA, ref MyOrientedBoundingBox oboxB)
Parameters
Returns
Contains(BoundingFrustum)
Declaration
public ContainmentType Contains(BoundingFrustum frustum)
Parameters
Returns
Contains(BoundingFrustum, ref MyOrientedBoundingBox)
Declaration
public static ContainmentType Contains(BoundingFrustum frustum, ref MyOrientedBoundingBox obox)
Parameters
Returns
Contains(ref BoundingSphere)
Declaration
public ContainmentType Contains(ref BoundingSphere sphere)
Parameters
Returns
Contains(ref BoundingSphere, ref MyOrientedBoundingBox)
Declaration
public static ContainmentType Contains(ref BoundingSphere sphere, ref MyOrientedBoundingBox box)
Parameters
Returns
Contains(ref MyOrientedBoundingBox)
Declaration
public ContainmentType Contains(ref MyOrientedBoundingBox other)
Parameters
Returns
Contains(ref Vector3)
Declaration
public bool Contains(ref Vector3 point)
Parameters
Type |
Name |
Description |
Vector3 |
point |
|
Returns
Type |
Description |
System.Boolean |
|
ContainsRelativeBox(ref Vector3, ref Vector3, ref Matrix)
Declaration
public static ContainmentType ContainsRelativeBox(ref Vector3 hA, ref Vector3 hB, ref Matrix mB)
Parameters
Returns
ConvertToFrustum()
Declaration
public BoundingFrustum ConvertToFrustum()
Returns
Create(BoundingBox, Matrix)
Declaration
public static MyOrientedBoundingBox Create(BoundingBox boundingBox, Matrix matrix)
Parameters
Returns
CreateFromBoundingBox(BoundingBox)
Declaration
public static MyOrientedBoundingBox CreateFromBoundingBox(BoundingBox box)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(MyOrientedBoundingBox)
Declaration
public bool Equals(MyOrientedBoundingBox other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GetAABB()
Declaration
public BoundingBox GetAABB()
Returns
GetCorners(Vector3[], Int32)
Declaration
public void GetCorners(Vector3[] corners, int startIndex)
Parameters
Type |
Name |
Description |
Vector3[] |
corners |
|
System.Int32 |
startIndex |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
GetNormalBetweenEdges(Int32, Int32, Int32, out Vector3)
Returns normal between two cube edge of same direction
Declaration
public static bool GetNormalBetweenEdges(int axis, int edge0, int edge1, out Vector3 normal)
Parameters
Type |
Name |
Description |
System.Int32 |
axis |
Edge direction axis (0 = X, 1 = Y, 2 = Z)
|
System.Int32 |
edge0 |
|
System.Int32 |
edge1 |
|
Vector3 |
normal |
|
Returns
Type |
Description |
System.Boolean |
false if edges are not neighbors
|
Intersects(ref BoundingBox)
Declaration
public bool Intersects(ref BoundingBox box)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Intersects(BoundingFrustum)
Declaration
public bool Intersects(BoundingFrustum frustum)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Intersects(ref BoundingSphere)
Declaration
public bool Intersects(ref BoundingSphere sphere)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Intersects(ref Line)
Declaration
public Nullable<float> Intersects(ref Line line)
Parameters
Type |
Name |
Description |
Line |
line |
|
Returns
Type |
Description |
System.Nullable<System.Single> |
|
Intersects(ref MyOrientedBoundingBox)
Declaration
public bool Intersects(ref MyOrientedBoundingBox other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Intersects(ref Plane)
Declaration
public PlaneIntersectionType Intersects(ref Plane plane)
Parameters
Type |
Name |
Description |
Plane |
plane |
|
Returns
Intersects(ref Ray)
Declaration
public Nullable<float> Intersects(ref Ray ray)
Parameters
Type |
Name |
Description |
Ray |
ray |
|
Returns
Type |
Description |
System.Nullable<System.Single> |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Declaration
public MyOrientedBoundingBox Transform(float scale, Quaternion rotation, Vector3 translation)
Parameters
Returns
Declaration
public void Transform(Matrix matrix)
Parameters
Type |
Name |
Description |
Matrix |
matrix |
|
Declaration
public MyOrientedBoundingBox Transform(Quaternion rotation, Vector3 translation)
Parameters
Returns
Operators
Equality(MyOrientedBoundingBox, MyOrientedBoundingBox)
Declaration
public static bool operator ==(MyOrientedBoundingBox a, MyOrientedBoundingBox b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(MyOrientedBoundingBox, MyOrientedBoundingBox)
Declaration
public static bool operator !=(MyOrientedBoundingBox a, MyOrientedBoundingBox b)
Parameters
Returns
Type |
Description |
System.Boolean |
|