Class BoundingBodyUtils
- Namespace
- OmegaEngine.Graphics
- Assembly
- OmegaEngine.dll
Helper methods for SlimDX.BoundingBoxes and SlimDX.BoundingSpheres.
public static class BoundingBodyUtils
- Inheritance
-
objectBoundingBodyUtils
Methods
Center(BoundingBox)
A vector pointing to the center of the bounding box.
[Pure]
public static Vector3 Center(this BoundingBox box)
Parameters
boxBoundingBox
Returns
- Vector3
ComputeBoundingBox(Mesh)
Generates a SlimDX.BoundingBox that completely contains all points within a SlimDX.Direct3D9.Mesh.
public static BoundingBox ComputeBoundingBox(this Mesh mesh)
Parameters
meshMeshThe SlimDX.Direct3D9.Mesh to be contained within the SlimDX.BoundingBox.
Returns
- BoundingBox
ComputeBoundingBox(VertexBuffer, int)
Generates a SlimDX.BoundingBox that completely contains all points within a SlimDX.Direct3D9.VertexBuffer.
public static BoundingBox ComputeBoundingBox(this VertexBuffer vb, int vertexCount)
Parameters
vbVertexBufferThe SlimDX.Direct3D9.VertexBuffer to be contained within the SlimDX.BoundingBox.
vertexCountintThe total number of vertex contained within
vb.
Returns
- BoundingBox
ComputeBoundingSphere(Mesh)
Generates a SlimDX.BoundingSphere that completely contains all points within a SlimDX.Direct3D9.Mesh.
public static BoundingSphere ComputeBoundingSphere(this Mesh mesh)
Parameters
meshMeshThe SlimDX.Direct3D9.Mesh to be contained within the SlimDX.BoundingSphere.
Returns
- BoundingSphere
ComputeBoundingSphere(VertexBuffer, int)
Generates a SlimDX.BoundingSphere that completely contains all points within a SlimDX.Direct3D9.VertexBuffer.
public static BoundingSphere ComputeBoundingSphere(this VertexBuffer vb, int vertexCount)
Parameters
vbVertexBufferThe SlimDX.Direct3D9.VertexBuffer to be contained within the SlimDX.BoundingSphere.
vertexCountintThe total number of vertexes contained within
vb.
Returns
- BoundingSphere
Diagonal(BoundingBox)
A vector pointing from the minimum corner to the maximum corner of the bounding box.
[Pure]
public static Vector3 Diagonal(this BoundingBox box)
Parameters
boxBoundingBox
Returns
- Vector3
Transform(BoundingBox, Matrix)
Applies a matrix transform to a bounding box.
[Pure]
public static BoundingBox Transform(this BoundingBox box, Matrix matrix)
Parameters
boxBoundingBoxThe bounding box to apply the transform to.
matrixMatrixThe transformation matrix to apply.
Returns
- BoundingBox
The transformed bounding box.
Transform(BoundingSphere, Matrix)
Applies a matrix transform to a bounding sphere.
[Pure]
public static BoundingSphere Transform(this BoundingSphere sphere, Matrix matrix)
Parameters
sphereBoundingSphereThe bounding sphere to apply the transform to.
matrixMatrixThe transformation matrix to apply.
Returns
- BoundingSphere
The transformed bounding sphere.