A generator class for a cylinder mesh with flat ends. More...
#include <cylindergenerator.h>
Public Member Functions | |||
CylinderGenerator (const Real Radius, const Real Height, const Whole SegCircle=16, const Whole SegHeight=1, const Boole Capped=true) | |||
Class constructor. More... | |||
virtual | ~CylinderGenerator () | ||
Class destructor. | |||
virtual void | AddToTriangleBuffer (TriangleBuffer &Buffer) const | ||
Adds the vertices and indices as configured in this generator to a triangle buffer. More... | |||
CylinderGenerator & | SetCapped (const Boole Capped) | ||
Sets whether the cylinder has endings or not. More... | |||
CylinderGenerator & | SetHeight (const Real Height) | ||
Sets the number of segments along the height of the cylinder.
| |||
CylinderGenerator & | SetNumSegCircle (const Whole SegCircle) | ||
Sets the number of segments when rotating around the cylinder's axis.
| |||
CylinderGenerator & | SetNumSegHeight (const Whole SegHeight) | ||
Sets the number of segments along the height of the cylinder.
| |||
CylinderGenerator & | SetRadius (const Real Radius) | ||
Sets the radius of the cylinder.
| |||
![]() | |||
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... | |||
CylinderGenerator & | ResetTransforms () | ||
Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More... | |||
CylinderGenerator & | SetEnableNormals (Boole EnableNormals) | ||
Sets whether normals are enabled or not. More... | |||
CylinderGenerator & | SetNumTexCoordSet (const UInt8 NumSets) | ||
Sets the number of texture coordintate sets. More... | |||
CylinderGenerator & | SetOrientation (const Quaternion &Ori) | ||
Sets an orientation baked into the resulting mesh. More... | |||
CylinderGenerator & | SetOrientation (const Real X, const Real Y, const Real Z, const Real W) | ||
Sets an orientation baked into the resulting mesh. More... | |||
CylinderGenerator & | SetPosition (const Vector3 &Loc) | ||
Sets a translation baked into the resulting mesh. More... | |||
CylinderGenerator & | SetPosition (const Real X, const Real Y, const Real Z) | ||
Sets a translation baked into the resulting mesh. More... | |||
CylinderGenerator & | SetScale (const Vector3 &Scaling) | ||
Sets a scale baked into the resulting mesh. More... | |||
CylinderGenerator & | SetScale (const Real Scaling) | ||
Sets a uniform scale baked into the resulting mesh. More... | |||
CylinderGenerator & | SetScale (const Real X, const Real Y, const Real Z) | ||
Sets a scale baked into the resulting mesh. More... | |||
CylinderGenerator & | SetSwitchUV (Boole SwitchUV) | ||
Sets whether to switch U and V texture coordinates. More... | |||
CylinderGenerator & | SetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom) | ||
Sets the texture rectangle. More... | |||
CylinderGenerator & | SetUTile (const Real uTile) | ||
Sets the U Tile. More... | |||
CylinderGenerator & | SetVTile (const Real vTile) | ||
Sets the V Tile. More... | |||
Protected Attributes | |
Boole | CapEnds |
Whether or not the ends of the cylinder will be generated/closed. More... | |
Real | CylinderHeight |
The height of the cylinder. More... | |
Real | CylinderRadius |
The radius of the cylinder. More... | |
Whole | NumSegCircle |
The resolution of the circular component of the cylinder. More... | |
Whole | NumSegHeight |
The number of segments in the cylinders length. More... | |
![]() | |
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 | |
![]() | |
enum | GeneratorOptions |
A convenience enum used to describe boolean options for a generator. | |
![]() | |
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 cylinder mesh with flat ends.
Definition at line 82 of file cylindergenerator.h.
Mezzanine::Graphics::Procedural::CylinderGenerator::CylinderGenerator | ( | const Real | Radius, |
const Real | Height, | ||
const Whole | SegCircle = 16 , |
||
const Whole | SegHeight = 1 , |
||
const Boole | Capped = true |
||
) |
Class constructor.
Radius | The radius of the cylinder. |
Height | The height of the cylinder. |
SegCircle | The resolution of the circular component of the cylinder. |
SegHeight | The number of segments in the cylinders length. |
Capped | Whether or not the ends of the cylinder will be generated/closed. |
Definition at line 81 of file cylindergenerator.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< CylinderGenerator >.
Definition at line 95 of file cylindergenerator.cpp.
CylinderGenerator & Mezzanine::Graphics::Procedural::CylinderGenerator::SetCapped | ( | const Boole | Capped | ) |
Sets whether the cylinder has endings or not.
Capped | Whether or not the ends of the cylinder will be generated/closed. |
Definition at line 204 of file cylindergenerator.cpp.
CylinderGenerator & Mezzanine::Graphics::Procedural::CylinderGenerator::SetHeight | ( | const Real | Height | ) |
Sets the number of segments along the height of the cylinder.
If | the height is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
Height | The height of the cylinder. |
Definition at line 195 of file cylindergenerator.cpp.
CylinderGenerator & Mezzanine::Graphics::Procedural::CylinderGenerator::SetNumSegCircle | ( | const Whole | SegCircle | ) |
Sets the number of segments when rotating around the cylinder'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 cylinder. |
Definition at line 210 of file cylindergenerator.cpp.
CylinderGenerator & Mezzanine::Graphics::Procedural::CylinderGenerator::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 cylinders length. |
Definition at line 219 of file cylindergenerator.cpp.
CylinderGenerator & Mezzanine::Graphics::Procedural::CylinderGenerator::SetRadius | ( | const Real | Radius | ) |
Sets the radius of the cylinder.
If | the radius is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
Radius | The radius of the cylinder. |
Definition at line 186 of file cylindergenerator.cpp.
|
protected |
Whether or not the ends of the cylinder will be generated/closed.
Definition at line 99 of file cylindergenerator.h.
|
protected |
The height of the cylinder.
Definition at line 90 of file cylindergenerator.h.
|
protected |
The radius of the cylinder.
Definition at line 87 of file cylindergenerator.h.
|
protected |
The resolution of the circular component of the cylinder.
Definition at line 93 of file cylindergenerator.h.
|
protected |
The number of segments in the cylinders length.
Definition at line 96 of file cylindergenerator.h.