A generator class for a tube mesh. More...
#include <tubegenerator.h>
Public Member Functions | |||
TubeGenerator (const Real InnerRadius, const Real OuterRadius, const Real Height, const Whole SegCircle, const Whole SegHeight) | |||
Class constructor. More... | |||
virtual | ~TubeGenerator () | ||
Class destructor. | |||
virtual void | AddToTriangleBuffer (TriangleBuffer &Buffer) const | ||
Adds the vertices and indices as configured in this generator to a triangle buffer. More... | |||
TubeGenerator & | SetHeight (const Real Height) | ||
Sets the height of the tube.
| |||
TubeGenerator & | SetInnerRadius (const Real InnerRadius) | ||
Sets the inner radius of the tube.
| |||
TubeGenerator & | SetNumSegCircle (const Whole SegCircle) | ||
Sets the number of segments when rotating around the tube's axis.
| |||
TubeGenerator & | SetNumSegHeight (const Whole SegHeight) | ||
Sets the number of segments along the height of the cylinder.
| |||
TubeGenerator & | SetOuterRadius (const Real OuterRadius) | ||
Sets the outer radius of the tube.
| |||
Public Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< TubeGenerator > | |||
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... | |||
TubeGenerator & | ResetTransforms () | ||
Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More... | |||
TubeGenerator & | SetEnableNormals (Boole EnableNormals) | ||
Sets whether normals are enabled or not. More... | |||
TubeGenerator & | SetNumTexCoordSet (const UInt8 NumSets) | ||
Sets the number of texture coordintate sets. More... | |||
TubeGenerator & | SetOrientation (const Quaternion &Ori) | ||
Sets an orientation baked into the resulting mesh. More... | |||
TubeGenerator & | SetOrientation (const Real X, const Real Y, const Real Z, const Real W) | ||
Sets an orientation baked into the resulting mesh. More... | |||
TubeGenerator & | SetPosition (const Vector3 &Loc) | ||
Sets a translation baked into the resulting mesh. More... | |||
TubeGenerator & | SetPosition (const Real X, const Real Y, const Real Z) | ||
Sets a translation baked into the resulting mesh. More... | |||
TubeGenerator & | SetScale (const Vector3 &Scaling) | ||
Sets a scale baked into the resulting mesh. More... | |||
TubeGenerator & | SetScale (const Real Scaling) | ||
Sets a uniform scale baked into the resulting mesh. More... | |||
TubeGenerator & | SetScale (const Real X, const Real Y, const Real Z) | ||
Sets a scale baked into the resulting mesh. More... | |||
TubeGenerator & | SetSwitchUV (Boole SwitchUV) | ||
Sets whether to switch U and V texture coordinates. More... | |||
TubeGenerator & | SetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom) | ||
Sets the texture rectangle. More... | |||
TubeGenerator & | SetUTile (const Real uTile) | ||
Sets the U Tile. More... | |||
TubeGenerator & | SetVTile (const Real vTile) | ||
Sets the V Tile. More... | |||
Protected Attributes | |
Whole | NumSegCircle |
The resolution of the circular component of the tube. More... | |
Whole | NumSegHeight |
The number of segments in the tubes length. More... | |
Real | TubeHeight |
The height of the tube. More... | |
Real | TubeInnerRadius |
The radius of the inner edge of the tube. More... | |
Real | TubeOuterRadius |
The radius of the outer edge of the tube. More... | |
Protected Attributes inherited from Mezzanine::Graphics::Procedural::MeshGenerator< TubeGenerator > | |
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< TubeGenerator > | |
enum | GeneratorOptions |
A convenience enum used to describe boolean options for a generator. | |
Protected Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< TubeGenerator > | |
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 tube mesh.
Definition at line 82 of file tubegenerator.h.
Mezzanine::Graphics::Procedural::TubeGenerator::TubeGenerator | ( | const Real | InnerRadius, |
const Real | OuterRadius, | ||
const Real | Height, | ||
const Whole | SegCircle, | ||
const Whole | SegHeight | ||
) |
Class constructor.
InnerRadius | The radius of the inner edge of the tube. |
OuterRadius | The radius of the outer edge of the tube. |
Height | The height of the tube. |
SegCircle | The resolution of the circular component of the tube. |
SegHeight | The number of segments in the tubes length. |
Definition at line 81 of file tubegenerator.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< TubeGenerator >.
Definition at line 95 of file tubegenerator.cpp.
TubeGenerator & Mezzanine::Graphics::Procedural::TubeGenerator::SetHeight | ( | const Real | Height | ) |
Sets the height of the tube.
If | the height is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
Height | The height of the tube. |
Definition at line 234 of file tubegenerator.cpp.
TubeGenerator & Mezzanine::Graphics::Procedural::TubeGenerator::SetInnerRadius | ( | const Real | InnerRadius | ) |
Sets the inner radius of the tube.
If | the radius is set to 0 or less OR if the radius is greater than the outer radius, a PARAMETERS_EXCEPTION will be thrown. |
InnerRadius | The radius of the inner edge of the tube. |
Definition at line 210 of file tubegenerator.cpp.
TubeGenerator & Mezzanine::Graphics::Procedural::TubeGenerator::SetNumSegCircle | ( | const Whole | SegCircle | ) |
Sets the number of segments when rotating around the tube's axis.
If | the number of segments is less than three, a PARAMETERS_EXCEPTION will be thrown. |
SegCircle | The resolution of the circular component of the tube. |
Definition at line 243 of file tubegenerator.cpp.
TubeGenerator & Mezzanine::Graphics::Procedural::TubeGenerator::SetNumSegHeight | ( | const Whole | SegHeight | ) |
Sets the number of segments along the height of the cylinder.
If | the number of segments is set to 0, a PARAMETERS_EXCEPTION will be thrown. |
SegHeight | The number of segments in the tubes length. |
Definition at line 252 of file tubegenerator.cpp.
TubeGenerator & Mezzanine::Graphics::Procedural::TubeGenerator::SetOuterRadius | ( | const Real | OuterRadius | ) |
Sets the outer radius of the tube.
If | the radius is set to 0 or less OR if the radius is less than the inner radius, a PARAMETERS_EXCEPTION will be thrown. |
OuterRadius | The radius of the outer edge of the tube. |
Definition at line 222 of file tubegenerator.cpp.
|
protected |
The resolution of the circular component of the tube.
Definition at line 96 of file tubegenerator.h.
|
protected |
The number of segments in the tubes length.
Definition at line 99 of file tubegenerator.h.
|
protected |
The height of the tube.
Definition at line 93 of file tubegenerator.h.
|
protected |
The radius of the inner edge of the tube.
Definition at line 87 of file tubegenerator.h.
|
protected |
The radius of the outer edge of the tube.
Definition at line 90 of file tubegenerator.h.