Class MyOrientedBoundingBoxD
Inheritance
System.Object
MyOrientedBoundingBoxD
Assembly: VRage.Math.dll
Syntax
public sealed class MyOrientedBoundingBoxD : ValueType, IEquatable<MyOrientedBoundingBoxD>
Constructors
MyOrientedBoundingBoxD(BoundingBoxD, MatrixD)
Declaration
public MyOrientedBoundingBoxD(BoundingBoxD box, MatrixD transform)
Parameters
MyOrientedBoundingBoxD(MatrixD)
Initializes a new instance of the MyOrientedBoundingBoxD.
Scale of matrix is size of box
Declaration
public MyOrientedBoundingBoxD(MatrixD matrix)
Parameters
Type |
Name |
Description |
MatrixD |
matrix |
|
MyOrientedBoundingBoxD(Vector3D, Vector3D, Quaternion)
Declaration
public MyOrientedBoundingBoxD(Vector3D center, Vector3D 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 Vector3D 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(ref BoundingBoxD)
Declaration
public ContainmentType Contains(ref BoundingBoxD box)
Parameters
Returns
Contains(BoundingFrustumD)
Declaration
public ContainmentType Contains(BoundingFrustumD frustum)
Parameters
Returns
Contains(BoundingFrustumD, ref MyOrientedBoundingBoxD)
Declaration
public static ContainmentType Contains(BoundingFrustumD frustum, ref MyOrientedBoundingBoxD obox)
Parameters
Returns
Contains(ref BoundingSphere, ref MyOrientedBoundingBox)
Declaration
public static ContainmentType Contains(ref BoundingSphere sphere, ref MyOrientedBoundingBox box)
Parameters
Returns
Contains(ref BoundingSphereD)
Declaration
public ContainmentType Contains(ref BoundingSphereD sphere)
Parameters
Returns
Contains(ref MyOrientedBoundingBoxD)
Declaration
public ContainmentType Contains(ref MyOrientedBoundingBoxD other)
Parameters
Returns
Contains(ref Vector3)
Declaration
public bool Contains(ref Vector3 point)
Parameters
Type |
Name |
Description |
Vector3 |
point |
|
Returns
Type |
Description |
System.Boolean |
|
Contains(ref Vector3D)
Declaration
public bool Contains(ref Vector3D point)
Parameters
Returns
Type |
Description |
System.Boolean |
|
ContainsRelativeBox(ref Vector3D, ref Vector3D, ref MatrixD)
Declaration
public static ContainmentType ContainsRelativeBox(ref Vector3D hA, ref Vector3D hB, ref MatrixD mB)
Parameters
Returns
ConvertToFrustum()
Declaration
public BoundingFrustumD ConvertToFrustum()
Returns
Create(BoundingBoxD, MatrixD)
Declaration
public static MyOrientedBoundingBoxD Create(BoundingBoxD boundingBox, MatrixD matrix)
Parameters
Returns
CreateFromBoundingBox(BoundingBoxD)
Declaration
public static MyOrientedBoundingBoxD CreateFromBoundingBox(BoundingBoxD box)
Parameters
Returns
Distance(RayD)
Declaration
public float Distance(RayD ray)
Parameters
Type |
Name |
Description |
RayD |
ray |
|
Returns
Type |
Description |
System.Single |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(MyOrientedBoundingBoxD)
Declaration
public bool Equals(MyOrientedBoundingBoxD other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GetAABB()
Declaration
public BoundingBoxD GetAABB()
Returns
GetCorner(Int32)
Gets corner of the BB by index
Declaration
public Vector3D GetCorner(int index)
Parameters
Type |
Name |
Description |
System.Int32 |
index |
index of the corner
|
Returns
Type |
Description |
Vector3D |
corner position
|
GetCorners(Vector3D[], Int32)
Declaration
public void GetCorners(Vector3D[] corners, int startIndex)
Parameters
Type |
Name |
Description |
Vector3D[] |
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(ref BoundingBoxD)
Declaration
public bool Intersects(ref BoundingBoxD box)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Intersects(BoundingFrustumD)
Declaration
public bool Intersects(BoundingFrustumD frustum)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Intersects(ref BoundingSphereD)
Declaration
public bool Intersects(ref BoundingSphereD sphere)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Intersects(ref LineD)
Declaration
public Nullable<double> Intersects(ref LineD line)
Parameters
Type |
Name |
Description |
LineD |
line |
|
Returns
Type |
Description |
System.Nullable<System.Double> |
|
Intersects(ref MyOrientedBoundingBoxD)
Declaration
public bool Intersects(ref MyOrientedBoundingBoxD other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Intersects(ref PlaneD)
Declaration
public PlaneIntersectionType Intersects(ref PlaneD plane)
Parameters
Type |
Name |
Description |
PlaneD |
plane |
|
Returns
Intersects(ref RayD)
Declaration
public Nullable<double> Intersects(ref RayD ray)
Parameters
Type |
Name |
Description |
RayD |
ray |
|
Returns
Type |
Description |
System.Nullable<System.Double> |
|
IntersectsOrContains(ref LineD)
Declaration
public Nullable<double> IntersectsOrContains(ref LineD line)
Parameters
Type |
Name |
Description |
LineD |
line |
|
Returns
Type |
Description |
System.Nullable<System.Double> |
|
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Declaration
public MyOrientedBoundingBoxD Transform(float scale, Quaternion rotation, Vector3D translation)
Parameters
Returns
Declaration
public void Transform(MatrixD matrix)
Parameters
Type |
Name |
Description |
MatrixD |
matrix |
|
Declaration
public void Transform(ref MatrixD matrix)
Parameters
Type |
Name |
Description |
MatrixD |
matrix |
|
Declaration
public MyOrientedBoundingBoxD Transform(Quaternion rotation, Vector3D translation)
Parameters
Returns
Operators
Equality(MyOrientedBoundingBoxD, MyOrientedBoundingBoxD)
Declaration
public static bool operator ==(MyOrientedBoundingBoxD a, MyOrientedBoundingBoxD b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(MyOrientedBoundingBoxD, MyOrientedBoundingBoxD)
Declaration
public static bool operator !=(MyOrientedBoundingBoxD a, MyOrientedBoundingBoxD b)
Parameters
Returns
Type |
Description |
System.Boolean |
|