Table of Contents

Class TexturedMesh

Namespace
OmegaEngine.Graphics
Assembly
OmegaEngine.dll

Methods for creating meshes of simple geometric shapes (box, sphere, etc.) with texture coordinates.

public static class TexturedMesh
Inheritance
TexturedMesh
Inherited Members

Methods

Box(Device, float, float, float, bool)

Creates a new SlimDX.Direct3D9.Mesh representing a textured box.

public static Mesh Box(Device device, float width, float height, float depth, bool tbn = false)

Parameters

device Device

The SlimDX.Direct3D9.Device to create the SlimDX.Direct3D9.Mesh in.

width float

The width of the box.

height float

The height of the box.

depth float

The depth of the box.

tbn bool

Generate TBN (tangent, binormal, normal) vectors instead of just normal vectors.

Returns

Mesh

Remarks

The box is formed like the one created by CreateBox(Device, float, float, float).

Cylinder(Device, float, float, float, int, int, bool)

Creates a new SlimDX.Direct3D9.Mesh representing a textured cylinder with spherical mapping.

public static Mesh Cylinder(Device device, float radius1, float radius2, float length, int slices, int stacks, bool tbn = false)

Parameters

device Device

The SlimDX.Direct3D9.Device to create the mesh in.

radius1 float

The radius of the cylinder at the lower end (negative Z).

radius2 float

The radius of the cylinder at the upper end (positive Z).

length float

The length of the cylinder.

slices int

The number of vertical slices to divide the cylinder in.

stacks int

The number of horizontal stacks to divide the cylinder in.

tbn bool

Generate TBN (tangent, binormal, normal) vectors instead of just normal vectors.

Returns

Mesh

Remarks

The cylinder is formed like the one created by CreateCylinder(Device, float, float, float, int, int).

Disc(Device, float, float, float, int, bool)

Creates a model of a textured round disc with a hole in the middle.

public static Mesh Disc(Device device, float radiusInner, float radiusOuter, float height, int segments, bool tbn = false)

Parameters

device Device

The SlimDX.Direct3D9.Device to create the mesh in.

radiusInner float

The radius of the inner circle of the ring.

radiusOuter float

The radius of the outer circle of the ring.

height float

The height of the ring.

segments int

The number of segments the ring shall consist of.

tbn bool

Generate TBN (tangent, binormal, normal) vectors instead of just normal vectors.

Returns

Mesh

Quad(Device, float, float, bool)

Creates a new SlimDX.Direct3D9.Mesh representing a textured 2D quad.

public static Mesh Quad(Device device, float width, float height, bool tbn = false)

Parameters

device Device

The SlimDX.Direct3D9.Device to create the SlimDX.Direct3D9.Mesh in.

width float

The width of the quad.

height float

The height of the quad.

tbn bool

Generate TBN (tangent, binormal, normal) vectors instead of just normal vectors.

Returns

Mesh

Sphere(Device, float, int, int, bool)

Creates a new SlimDX.Direct3D9.Mesh representing a textured sphere with spherical mapping.

public static Mesh Sphere(Device device, float radius, int slices, int stacks, bool tbn = false)

Parameters

device Device

The SlimDX.Direct3D9.Device to create the mesh in

radius float

The radius of the sphere.

slices int

The number of vertical slices to divide the sphere into.

stacks int

The number of horizontal stacks to divide the sphere into.

tbn bool

Generate TBN (tangent, binormal, normal) vectors instead of just normal vectors.

Returns

Mesh

Remarks

The sphere is formed like the one created by CreateSphere(Device, float, int, int).