Show / Hide Table of Contents

Class MyOrientedBoundingBox

Inheritance
System.Object
MyOrientedBoundingBox
Namespace: VRageMath
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
Type Name Description
Vector3 center
Vector3 halfExtents
Quaternion orientation

Fields

Center

Declaration
public Vector3 Center
Field Value
Type Description
Vector3

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
Type Description
Vector3

Orientation

Declaration
public Quaternion Orientation
Field Value
Type Description
Quaternion

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
Type Description
Vector3[]

XNeighbourVectorsForw

Declaration
public static readonly Vector3[] XNeighbourVectorsForw
Field Value
Type Description
Vector3[]

YNeighbourVectorsBack

Declaration
public static readonly Vector3[] YNeighbourVectorsBack
Field Value
Type Description
Vector3[]

YNeighbourVectorsForw

Declaration
public static readonly Vector3[] YNeighbourVectorsForw
Field Value
Type Description
Vector3[]

ZNeighbourVectorsBack

Declaration
public static readonly Vector3[] ZNeighbourVectorsBack
Field Value
Type Description
Vector3[]

ZNeighbourVectorsForw

Declaration
public static readonly Vector3[] ZNeighbourVectorsForw
Field Value
Type Description
Vector3[]

Methods

Contains(ref BoundingBox)

Declaration
public ContainmentType Contains(ref BoundingBox box)
Parameters
Type Name Description
BoundingBox box
Returns
Type Description
ContainmentType

Contains(ref BoundingBox, ref MyOrientedBoundingBox)

Declaration
public static ContainmentType Contains(ref BoundingBox boxA, ref MyOrientedBoundingBox oboxB)
Parameters
Type Name Description
BoundingBox boxA
MyOrientedBoundingBox oboxB
Returns
Type Description
ContainmentType

Contains(BoundingFrustum)

Declaration
public ContainmentType Contains(BoundingFrustum frustum)
Parameters
Type Name Description
BoundingFrustum frustum
Returns
Type Description
ContainmentType

Contains(BoundingFrustum, ref MyOrientedBoundingBox)

Declaration
public static ContainmentType Contains(BoundingFrustum frustum, ref MyOrientedBoundingBox obox)
Parameters
Type Name Description
BoundingFrustum frustum
MyOrientedBoundingBox obox
Returns
Type Description
ContainmentType

Contains(ref BoundingSphere)

Declaration
public ContainmentType Contains(ref BoundingSphere sphere)
Parameters
Type Name Description
BoundingSphere sphere
Returns
Type Description
ContainmentType

Contains(ref BoundingSphere, ref MyOrientedBoundingBox)

Declaration
public static ContainmentType Contains(ref BoundingSphere sphere, ref MyOrientedBoundingBox box)
Parameters
Type Name Description
BoundingSphere sphere
MyOrientedBoundingBox box
Returns
Type Description
ContainmentType

Contains(ref MyOrientedBoundingBox)

Declaration
public ContainmentType Contains(ref MyOrientedBoundingBox other)
Parameters
Type Name Description
MyOrientedBoundingBox other
Returns
Type Description
ContainmentType

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
Type Name Description
Vector3 hA
Vector3 hB
Matrix mB
Returns
Type Description
ContainmentType

ConvertToFrustum()

Declaration
public BoundingFrustum ConvertToFrustum()
Returns
Type Description
BoundingFrustum

Create(BoundingBox, Matrix)

Declaration
public static MyOrientedBoundingBox Create(BoundingBox boundingBox, Matrix matrix)
Parameters
Type Name Description
BoundingBox boundingBox
Matrix matrix
Returns
Type Description
MyOrientedBoundingBox

CreateFromBoundingBox(BoundingBox)

Declaration
public static MyOrientedBoundingBox CreateFromBoundingBox(BoundingBox box)
Parameters
Type Name Description
BoundingBox box
Returns
Type Description
MyOrientedBoundingBox

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
Type Name Description
MyOrientedBoundingBox other
Returns
Type Description
System.Boolean

GetAABB()

Declaration
public BoundingBox GetAABB()
Returns
Type Description
BoundingBox

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
Type Name Description
BoundingBox box
Returns
Type Description
System.Boolean

Intersects(BoundingFrustum)

Declaration
public bool Intersects(BoundingFrustum frustum)
Parameters
Type Name Description
BoundingFrustum frustum
Returns
Type Description
System.Boolean

Intersects(ref BoundingSphere)

Declaration
public bool Intersects(ref BoundingSphere sphere)
Parameters
Type Name Description
BoundingSphere sphere
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
Type Name Description
MyOrientedBoundingBox other
Returns
Type Description
System.Boolean

Intersects(ref Plane)

Declaration
public PlaneIntersectionType Intersects(ref Plane plane)
Parameters
Type Name Description
Plane plane
Returns
Type Description
PlaneIntersectionType

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

Transform(Single, Quaternion, Vector3)

Declaration
public MyOrientedBoundingBox Transform(float scale, Quaternion rotation, Vector3 translation)
Parameters
Type Name Description
System.Single scale
Quaternion rotation
Vector3 translation
Returns
Type Description
MyOrientedBoundingBox

Transform(Matrix)

Declaration
public void Transform(Matrix matrix)
Parameters
Type Name Description
Matrix matrix

Transform(Quaternion, Vector3)

Declaration
public MyOrientedBoundingBox Transform(Quaternion rotation, Vector3 translation)
Parameters
Type Name Description
Quaternion rotation
Vector3 translation
Returns
Type Description
MyOrientedBoundingBox

Operators

Equality(MyOrientedBoundingBox, MyOrientedBoundingBox)

Declaration
public static bool operator ==(MyOrientedBoundingBox a, MyOrientedBoundingBox b)
Parameters
Type Name Description
MyOrientedBoundingBox a
MyOrientedBoundingBox b
Returns
Type Description
System.Boolean

Inequality(MyOrientedBoundingBox, MyOrientedBoundingBox)

Declaration
public static bool operator !=(MyOrientedBoundingBox a, MyOrientedBoundingBox b)
Parameters
Type Name Description
MyOrientedBoundingBox a
MyOrientedBoundingBox b
Returns
Type Description
System.Boolean
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾