Table of Contents

Class BoundingBodyUtils

Namespace
OmegaEngine.Graphics
Assembly
OmegaEngine.dll

Helper methods for SlimDX.BoundingBoxes and SlimDX.BoundingSpheres.

public static class BoundingBodyUtils
Inheritance
object
BoundingBodyUtils

Methods

Center(BoundingBox)

A vector pointing to the center of the bounding box.

[Pure]
public static Vector3 Center(this BoundingBox box)

Parameters

box BoundingBox

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

mesh Mesh

The 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

vb VertexBuffer

The SlimDX.Direct3D9.VertexBuffer to be contained within the SlimDX.BoundingBox.

vertexCount int

The 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

mesh Mesh

The 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

vb VertexBuffer

The SlimDX.Direct3D9.VertexBuffer to be contained within the SlimDX.BoundingSphere.

vertexCount int

The 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

box BoundingBox

Returns

Vector3

Transform(BoundingBox, Matrix)

Applies a matrix transform to a bounding box.

[Pure]
public static BoundingBox Transform(this BoundingBox box, Matrix matrix)

Parameters

box BoundingBox

The bounding box to apply the transform to.

matrix Matrix

The 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

sphere BoundingSphere

The bounding sphere to apply the transform to.

matrix Matrix

The transformation matrix to apply.

Returns

BoundingSphere

The transformed bounding sphere.