OmegaEngine API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Static Public Member Functions | List of all members
OmegaEngine.Graphics.MeshGenerator Class Reference

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

Static Public Member Functions

static Mesh Quad (Device device, float width, float height)
 Creates a new Mesh representing a textured 2D quad. More...
 
static Mesh Box (Device device, float width, float height, float depth)
 Creates a new Mesh representing a textured box. More...
 
static Mesh Sphere (Device device, float radius, int slices, int stacks)
 Creates a new Mesh representing a textured sphere with spherical mapping. More...
 
static Mesh Cylinder (Device device, float radius1, float radius2, float length, int slices, int stacks)
 Creates a new Mesh representing a textured cylinder with spherical mapping. More...
 
static Mesh Disc (Device device, float radiusInner, float radiusOuter, float height, int segments)
 Creates a model of a textured round disc with a hole in the middle. More...
 

Detailed Description

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

Member Function Documentation

static Mesh OmegaEngine.Graphics.MeshGenerator.Box ( Device  device,
float  width,
float  height,
float  depth 
)
inlinestatic

Creates a new Mesh representing a textured box.

Parameters
deviceThe Device to create the Mesh in.
widthThe width of the box.
heightThe height of the box.
depthThe depth of the box.

The box is formed like the one created by Mesh.CreateBox.

static Mesh OmegaEngine.Graphics.MeshGenerator.Cylinder ( Device  device,
float  radius1,
float  radius2,
float  length,
int  slices,
int  stacks 
)
inlinestatic

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

Parameters
deviceThe Device to create the mesh in.
radius1The radius of the cylinder at the lower end (negative Z).
radius2The radius of the cylinder at the upper end (positive Z).
lengthThe length of the cylinder.
slicesThe number of vertical slices to divide the cylinder in.
stacksThe number of horizontal stacks to divide the cylinder in.

The cylinder is formed like the one created by Mesh.CreateCylinder.

static Mesh OmegaEngine.Graphics.MeshGenerator.Disc ( Device  device,
float  radiusInner,
float  radiusOuter,
float  height,
int  segments 
)
inlinestatic

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

Parameters
deviceThe Device to create the mesh in.
radiusInnerThe radius of the inner circle of the ring.
radiusOuterThe radius of the outer circle of the ring.
heightThe height of the ring.
segmentsThe number of segments the ring shall consist of.
static Mesh OmegaEngine.Graphics.MeshGenerator.Quad ( Device  device,
float  width,
float  height 
)
inlinestatic

Creates a new Mesh representing a textured 2D quad.

Parameters
deviceThe Device to create the Mesh in.
widthThe width of the quad.
heightThe height of the quad.
static Mesh OmegaEngine.Graphics.MeshGenerator.Sphere ( Device  device,
float  radius,
int  slices,
int  stacks 
)
inlinestatic

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

Parameters
deviceThe Device to create the mesh in
radiusThe radius of the sphere.
slicesThe number of vertical slices to divide the sphere into.
stacksThe number of horizontal stacks to divide the sphere into.

The sphere is formed like the one created by Mesh.CreateSphere.


The documentation for this class was generated from the following file: