A base class containing all of the utilities needed for a mesh generator. More...
#include <meshgenerator.h>
Public Types | |
enum | GeneratorOptions { GO_EnableNormals = 1, GO_SwitchUV = 2, GO_Transform = 4 } |
A convenience enum used to describe boolean options for a generator. More... | |
Public Member Functions | |
MeshGenerator () | |
Class constructor. | |
virtual | ~MeshGenerator () |
Class destructor. | |
virtual void | AddToTriangleBuffer (TriangleBuffer &Buffer) const =0 |
Adds the vertices and indices as configured in this generator to a triangle buffer. More... | |
TriangleBuffer | BuildTriangleBuffer () const |
Creates a TriangleBuffer with the the vertices and indices as configured in this generator. More... | |
Mesh * | GenerateMesh (const String &MeshName, const String &MeshGroup, const String &MatName, const String &MatGroup) const |
Generates the mesh. More... | |
T & | ResetTransforms () |
Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More... | |
T & | SetEnableNormals (Boole EnableNormals) |
Sets whether normals are enabled or not. More... | |
T & | SetNumTexCoordSet (const UInt8 NumSets) |
Sets the number of texture coordintate sets. More... | |
T & | SetOrientation (const Quaternion &Ori) |
Sets an orientation baked into the resulting mesh. More... | |
T & | SetOrientation (const Real X, const Real Y, const Real Z, const Real W) |
Sets an orientation baked into the resulting mesh. More... | |
T & | SetPosition (const Vector3 &Loc) |
Sets a translation baked into the resulting mesh. More... | |
T & | SetPosition (const Real X, const Real Y, const Real Z) |
Sets a translation baked into the resulting mesh. More... | |
T & | SetScale (const Vector3 &Scaling) |
Sets a scale baked into the resulting mesh. More... | |
T & | SetScale (const Real Scaling) |
Sets a uniform scale baked into the resulting mesh. More... | |
T & | SetScale (const Real X, const Real Y, const Real Z) |
Sets a scale baked into the resulting mesh. More... | |
T & | SetSwitchUV (Boole SwitchUV) |
Sets whether to switch U and V texture coordinates. More... | |
T & | SetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom) |
Sets the texture rectangle. More... | |
T & | SetUTile (const Real uTile) |
Sets the U Tile. More... | |
T & | SetVTile (const Real vTile) |
Sets the V Tile. More... | |
Protected Member Functions | |
void | AddPoint (TriangleBuffer &Buffer, const Vector3 &Loc, const Vector3 &Norm, const Vector2 &UV) const |
Adds a new point to a triangle buffer, using the format defined for that MeshGenerator. More... | |
Protected Attributes | |
UInt8 | GeneratorOpts |
Storage for the boolean options to be used by this generator. More... | |
UInt8 | NumTexCoordSet |
The number of texture coordinate sets to include. More... | |
Quaternion | Orientation |
Orientation to apply the mesh. More... | |
Vector3 | Position |
Position to apply to the mesh. More... | |
Vector3 | Scale |
Scale to apply to the mesh. More... | |
Real | UTile |
U tile for texture coords generation. More... | |
Vector2 | UVOrigin |
Rectangle in which the texture coordinates will be placed. More... | |
Real | VTile |
V tile for texture coords generation. More... | |
A base class containing all of the utilities needed for a mesh generator.
Definition at line 87 of file meshgenerator.h.
enum Mezzanine::Graphics::Procedural::MeshGenerator::GeneratorOptions |
A convenience enum used to describe boolean options for a generator.
Definition at line 91 of file meshgenerator.h.
|
inlineprotected |
Adds a new point to a triangle buffer, using the format defined for that MeshGenerator.
Buffer | The triangle buffer to update. |
Loc | The location of the new point. |
Norm | the normal of the new point. |
UV | the uv texcoord of the new point. |
Definition at line 128 of file meshgenerator.h.
|
pure virtual |
Adds the vertices and indices as configured in this generator to a triangle buffer.
Buffer | The buffer to append this generators vertices and indices to. |
Implemented in Mezzanine::Graphics::Procedural::Triangulator, Mezzanine::Graphics::Procedural::Extruder, Mezzanine::Graphics::Procedural::RoundedBoxGenerator, Mezzanine::Graphics::Procedural::Lathe, Mezzanine::Graphics::Procedural::BoxGenerator, Mezzanine::Graphics::Procedural::TorusKnotGenerator, Mezzanine::Graphics::Procedural::CapsuleGenerator, Mezzanine::Graphics::Procedural::CylinderGenerator, Mezzanine::Graphics::Procedural::TubeGenerator, Mezzanine::Graphics::Procedural::BooleanGenerator, Mezzanine::Graphics::Procedural::TorusGenerator, Mezzanine::Graphics::Procedural::ConeGenerator, Mezzanine::Graphics::Procedural::PlaneGenerator, Mezzanine::Graphics::Procedural::BoxCornerGenerator, Mezzanine::Graphics::Procedural::SphereGenerator, Mezzanine::Graphics::Procedural::IcoSphereGenerator, and Mezzanine::Graphics::Procedural::MeshLoader.
|
inline |
Creates a TriangleBuffer with the the vertices and indices as configured in this generator.
Definition at line 186 of file meshgenerator.h.
|
inline |
Generates the mesh.
MeshName | The name to give to the generated mesh. |
MeshGroup | The asset group to place the mesh in. |
MatName | The name of the material to apply to the mesh. |
MatGroup | The asset group where the material can be found. |
Definition at line 177 of file meshgenerator.h.
|
inline |
Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values.
Definition at line 342 of file meshgenerator.h.
|
inline |
Sets whether normals are enabled or not.
EnableNormals | True to generate normals as points are added to the mesh, false otherwise. |
Definition at line 244 of file meshgenerator.h.
|
inline |
Sets the number of texture coordintate sets.
NumSets | The number of texture coordinate sets to use. |
Definition at line 234 of file meshgenerator.h.
|
inline |
Sets an orientation baked into the resulting mesh.
Ori | The rotation to apply to a generated mesh. |
Definition at line 293 of file meshgenerator.h.
|
inline |
Sets an orientation baked into the resulting mesh.
X | The X component of the Axis. |
Y | The Y component of the Axis. |
Z | The Z component of the Axis. |
W | Rotation on the Axis X, Y and Z defined. |
Definition at line 305 of file meshgenerator.h.
|
inline |
Sets a translation baked into the resulting mesh.
Loc | The amount of translation to be applied on each axis. |
Definition at line 273 of file meshgenerator.h.
|
inline |
Sets a translation baked into the resulting mesh.
X | The amount of translation to be applied on the X axis. |
Y | The amount of translation to be applied on the Y axis. |
Z | The amount of translation to be applied on the Z axis. |
Definition at line 284 of file meshgenerator.h.
|
inline |
Sets a scale baked into the resulting mesh.
Scaling | The amount of scaling to apply on each axis to all meshes generated by this generator. |
Definition at line 314 of file meshgenerator.h.
|
inline |
Sets a uniform scale baked into the resulting mesh.
Scaling | The amount of scaling to apply on each axis to all meshes generated by this generator. |
Definition at line 323 of file meshgenerator.h.
|
inline |
Sets a scale baked into the resulting mesh.
X | The amount of scaling to apply on the X axis to all meshes generated by this generator. |
Y | The amount of scaling to apply on the Y axis to all meshes generated by this generator. |
Z | The amount of scaling to apply on the Z axis to all meshes generated by this generator. |
Definition at line 334 of file meshgenerator.h.
|
inline |
Sets whether to switch U and V texture coordinates.
SwitchUV | True to swap the UV texture coordinates as points are added to the mesh, false otherwise. |
Definition at line 257 of file meshgenerator.h.
|
inline |
Sets the texture rectangle.
RectLeft | The texture coordinate for the left edge. |
RectRight | The texture coordinate for the right edge. |
RectTop | The texture coordinate for the top edge. |
RectBottom | The texture coordinate for the bottom. |
Definition at line 223 of file meshgenerator.h.
|
inline |
Sets the U Tile.
uTile | The number by which U texture coordinates are multiplied. |
Definition at line 203 of file meshgenerator.h.
|
inline |
Sets the V Tile.
vTile | The number by which V texture coordinates are multiplied. |
Definition at line 212 of file meshgenerator.h.
|
protected |
Storage for the boolean options to be used by this generator.
Definition at line 118 of file meshgenerator.h.
|
protected |
The number of texture coordinate sets to include.
Definition at line 121 of file meshgenerator.h.
|
protected |
Orientation to apply the mesh.
Definition at line 100 of file meshgenerator.h.
|
protected |
Position to apply to the mesh.
Definition at line 103 of file meshgenerator.h.
|
protected |
Scale to apply to the mesh.
Definition at line 106 of file meshgenerator.h.
|
protected |
U tile for texture coords generation.
Definition at line 112 of file meshgenerator.h.
|
protected |
Rectangle in which the texture coordinates will be placed.
Definition at line 109 of file meshgenerator.h.
|
protected |
V tile for texture coords generation.
Definition at line 115 of file meshgenerator.h.