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
deviceDeviceThe SlimDX.Direct3D9.Device to create the SlimDX.Direct3D9.Mesh in.
widthfloatThe width of the box.
heightfloatThe height of the box.
depthfloatThe depth of the box.
tbnboolGenerate 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
deviceDeviceThe SlimDX.Direct3D9.Device to create the mesh in.
radius1floatThe radius of the cylinder at the lower end (negative Z).
radius2floatThe radius of the cylinder at the upper end (positive Z).
lengthfloatThe length of the cylinder.
slicesintThe number of vertical slices to divide the cylinder in.
stacksintThe number of horizontal stacks to divide the cylinder in.
tbnboolGenerate 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
deviceDeviceThe SlimDX.Direct3D9.Device to create the mesh in.
radiusInnerfloatThe radius of the inner circle of the ring.
radiusOuterfloatThe radius of the outer circle of the ring.
heightfloatThe height of the ring.
segmentsintThe number of segments the ring shall consist of.
tbnboolGenerate 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
deviceDeviceThe SlimDX.Direct3D9.Device to create the SlimDX.Direct3D9.Mesh in.
widthfloatThe width of the quad.
heightfloatThe height of the quad.
tbnboolGenerate 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
deviceDeviceThe SlimDX.Direct3D9.Device to create the mesh in
radiusfloatThe radius of the sphere.
slicesintThe number of vertical slices to divide the sphere into.
stacksintThe number of horizontal stacks to divide the sphere into.
tbnboolGenerate 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).