A generator class for a torus mesh. More...
#include <torusgenerator.h>
Inheritance diagram for Mezzanine::Graphics::Procedural::TorusGenerator:
Collaboration diagram for Mezzanine::Graphics::Procedural::TorusGenerator:Public Member Functions | |||
| TorusGenerator (const Real PoloidalRadius, const Real ToroidalRadius, const Whole PoloidalSeg=16, const Whole ToroidalSeg=16) | |||
| Class constructor. More... | |||
| virtual | ~TorusGenerator () | ||
| Class destructor. | |||
| virtual void | AddToTriangleBuffer (TriangleBuffer &Buffer) const | ||
| Adds the vertices and indices as configured in this generator to a triangle buffer. More... | |||
| TorusGenerator & | SetNumPoloidalSeg (const Whole PoloidalSeg) | ||
Sets the number of segments on the Poloidal ring.
| |||
| TorusGenerator & | SetNumToroidalSeg (const Whole ToroidalSeg) | ||
Sets the number of segments along the guiding circle.
| |||
| TorusGenerator & | SetPoloidalRadius (const Real PoloidalRadius) | ||
Sets the radius of the torus.
| |||
| TorusGenerator & | SetToroidalRadius (const Real ToroidalRadius) | ||
Sets the radius of the torus ring. AKA it's thickness.
| |||
Public Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< TorusGenerator > | |||
| MeshGenerator () | |||
| Class constructor. | |||
| virtual | ~MeshGenerator () | ||
| Class destructor. | |||
| 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... | |||
| TorusGenerator & | ResetTransforms () | ||
| Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More... | |||
| TorusGenerator & | SetEnableNormals (Boole EnableNormals) | ||
| Sets whether normals are enabled or not. More... | |||
| TorusGenerator & | SetNumTexCoordSet (const UInt8 NumSets) | ||
| Sets the number of texture coordintate sets. More... | |||
| TorusGenerator & | SetOrientation (const Quaternion &Ori) | ||
| Sets an orientation baked into the resulting mesh. More... | |||
| TorusGenerator & | SetOrientation (const Real X, const Real Y, const Real Z, const Real W) | ||
| Sets an orientation baked into the resulting mesh. More... | |||
| TorusGenerator & | SetPosition (const Vector3 &Loc) | ||
| Sets a translation baked into the resulting mesh. More... | |||
| TorusGenerator & | SetPosition (const Real X, const Real Y, const Real Z) | ||
| Sets a translation baked into the resulting mesh. More... | |||
| TorusGenerator & | SetScale (const Vector3 &Scaling) | ||
| Sets a scale baked into the resulting mesh. More... | |||
| TorusGenerator & | SetScale (const Real Scaling) | ||
| Sets a uniform scale baked into the resulting mesh. More... | |||
| TorusGenerator & | SetScale (const Real X, const Real Y, const Real Z) | ||
| Sets a scale baked into the resulting mesh. More... | |||
| TorusGenerator & | SetSwitchUV (Boole SwitchUV) | ||
| Sets whether to switch U and V texture coordinates. More... | |||
| TorusGenerator & | SetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom) | ||
| Sets the texture rectangle. More... | |||
| TorusGenerator & | SetUTile (const Real uTile) | ||
| Sets the U Tile. More... | |||
| TorusGenerator & | SetVTile (const Real vTile) | ||
| Sets the V Tile. More... | |||
Protected Attributes | |
| Whole | NumPoloidalSeg |
| The resolution of the Poloidal ring. More... | |
| Whole | NumToroidalSeg |
| The resolution of the Toroidal ring. More... | |
| Real | TorusPoloidalRadius |
| The radius of the primary ring of the torus. More... | |
| Real | TorusToroidalRadius |
| The radius of the secondary ring of the torus. More... | |
Protected Attributes inherited from Mezzanine::Graphics::Procedural::MeshGenerator< TorusGenerator > | |
| 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... | |
Additional Inherited Members | |
Public Types inherited from Mezzanine::Graphics::Procedural::MeshGenerator< TorusGenerator > | |
| enum | GeneratorOptions |
| A convenience enum used to describe boolean options for a generator. | |
Protected Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< TorusGenerator > | |
| 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... | |
A generator class for a torus mesh.
Definition at line 82 of file torusgenerator.h.
| Mezzanine::Graphics::Procedural::TorusGenerator::TorusGenerator | ( | const Real | PoloidalRadius, |
| const Real | ToroidalRadius, | ||
| const Whole | PoloidalSeg = 16, |
||
| const Whole | ToroidalSeg = 16 |
||
| ) |
Class constructor.
| PoloidalRadius | The radius of the primary ring of the torus. |
| ToroidalRadius | The radius of the secondary ring of the torus. |
| PoloidalSeg | The resolution of the primary ring of the torus. |
| ToroidalSeg | The resolution of the secondary ring of the torus. |
Definition at line 81 of file torusgenerator.cpp.
|
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. |
Implements Mezzanine::Graphics::Procedural::MeshGenerator< TorusGenerator >.
Definition at line 94 of file torusgenerator.cpp.
| TorusGenerator & Mezzanine::Graphics::Procedural::TorusGenerator::SetNumPoloidalSeg | ( | const Whole | PoloidalSeg | ) |
Sets the number of segments on the Poloidal ring.
| If | the number of segments is less than three, a PARAMETERS_EXCEPTION will be thrown. |
| PoloidalSeg | The resolution of the primary ring of the torus. |
Definition at line 151 of file torusgenerator.cpp.
| TorusGenerator & Mezzanine::Graphics::Procedural::TorusGenerator::SetNumToroidalSeg | ( | const Whole | ToroidalSeg | ) |
Sets the number of segments along the guiding circle.
| If | the number of segments is less than three, a PARAMETERS_EXCEPTION will be thrown. |
| ToroidalSegThe | resolution of the secondary ring of the torus. |
Definition at line 160 of file torusgenerator.cpp.
| TorusGenerator & Mezzanine::Graphics::Procedural::TorusGenerator::SetPoloidalRadius | ( | const Real | PoloidalRadius | ) |
Sets the radius of the torus.
| If | the radius is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
| PoloidalRadius | The radius of the primary ring of the torus. |
Definition at line 133 of file torusgenerator.cpp.
| TorusGenerator & Mezzanine::Graphics::Procedural::TorusGenerator::SetToroidalRadius | ( | const Real | ToroidalRadius | ) |
Sets the radius of the torus ring. AKA it's thickness.
| If | the radius is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
| ToroidalRadius | The radius of the secondary ring of the torus. |
Definition at line 142 of file torusgenerator.cpp.
|
protected |
The resolution of the Poloidal ring.
Definition at line 95 of file torusgenerator.h.
|
protected |
The resolution of the Toroidal ring.
Definition at line 98 of file torusgenerator.h.
|
protected |
The radius of the primary ring of the torus.
Definition at line 88 of file torusgenerator.h.
|
protected |
The radius of the secondary ring of the torus.
Definition at line 92 of file torusgenerator.h.
1.8.9.1. Thanks to the
Open Icon Library
for help with some of the icons.