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
DeviceThe SlimDX.Direct3D9.Device to create the SlimDX.Direct3D9.Mesh in.
width
floatThe width of the box.
height
floatThe height of the box.
depth
floatThe depth of the box.
tbn
boolGenerate 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
DeviceThe SlimDX.Direct3D9.Device to create the mesh in.
radius1
floatThe radius of the cylinder at the lower end (negative Z).
radius2
floatThe radius of the cylinder at the upper end (positive Z).
length
floatThe length of the cylinder.
slices
intThe number of vertical slices to divide the cylinder in.
stacks
intThe number of horizontal stacks to divide the cylinder in.
tbn
boolGenerate 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
DeviceThe SlimDX.Direct3D9.Device to create the mesh in.
radiusInner
floatThe radius of the inner circle of the ring.
radiusOuter
floatThe radius of the outer circle of the ring.
height
floatThe height of the ring.
segments
intThe number of segments the ring shall consist of.
tbn
boolGenerate 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
DeviceThe SlimDX.Direct3D9.Device to create the SlimDX.Direct3D9.Mesh in.
width
floatThe width of the quad.
height
floatThe height of the quad.
tbn
boolGenerate 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
DeviceThe SlimDX.Direct3D9.Device to create the mesh in
radius
floatThe radius of the sphere.
slices
intThe number of vertical slices to divide the sphere into.
stacks
intThe number of horizontal stacks to divide the sphere into.
tbn
boolGenerate 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).