Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Protected Attributes | List of all members
Mezzanine::Graphics::Procedural::CylinderGenerator Class Reference

A generator class for a cylinder mesh with flat ends. More...

#include <cylindergenerator.h>

+ Inheritance diagram for Mezzanine::Graphics::Procedural::CylinderGenerator:
+ Collaboration diagram for Mezzanine::Graphics::Procedural::CylinderGenerator:

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...
 
CylinderGeneratorSetCapped (const Boole Capped)
 Sets whether the cylinder has endings or not. More...
 
CylinderGeneratorSetHeight (const Real Height)
 Sets the number of segments along the height of the cylinder.

Exceptions
Ifthe height is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown.
More...
 
CylinderGeneratorSetNumSegCircle (const Whole SegCircle)
 Sets the number of segments when rotating around the cylinder's axis.

Exceptions
Ifthe number of segments is less than three, a PARAMETERS_EXCEPTION will be thrown.
More...
 
CylinderGeneratorSetNumSegHeight (const Whole SegHeight)
 Sets the number of segments along the height of the cylinder.

Exceptions
Ifthe number of segments is set to 0, a PARAMETERS_EXCEPTION will be thrown.
More...
 
CylinderGeneratorSetRadius (const Real Radius)
 Sets the radius of the cylinder.

Exceptions
Ifthe radius is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown.
More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< CylinderGenerator >
 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...
 
MeshGenerateMesh (const String &MeshName, const String &MeshGroup, const String &MatName, const String &MatGroup) const
 Generates the mesh. More...
 
CylinderGeneratorResetTransforms ()
 Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More...
 
CylinderGeneratorSetEnableNormals (Boole EnableNormals)
 Sets whether normals are enabled or not. More...
 
CylinderGeneratorSetNumTexCoordSet (const UInt8 NumSets)
 Sets the number of texture coordintate sets. More...
 
CylinderGeneratorSetOrientation (const Quaternion &Ori)
 Sets an orientation baked into the resulting mesh. More...
 
CylinderGeneratorSetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets an orientation baked into the resulting mesh. More...
 
CylinderGeneratorSetPosition (const Vector3 &Loc)
 Sets a translation baked into the resulting mesh. More...
 
CylinderGeneratorSetPosition (const Real X, const Real Y, const Real Z)
 Sets a translation baked into the resulting mesh. More...
 
CylinderGeneratorSetScale (const Vector3 &Scaling)
 Sets a scale baked into the resulting mesh. More...
 
CylinderGeneratorSetScale (const Real Scaling)
 Sets a uniform scale baked into the resulting mesh. More...
 
CylinderGeneratorSetScale (const Real X, const Real Y, const Real Z)
 Sets a scale baked into the resulting mesh. More...
 
CylinderGeneratorSetSwitchUV (Boole SwitchUV)
 Sets whether to switch U and V texture coordinates. More...
 
CylinderGeneratorSetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom)
 Sets the texture rectangle. More...
 
CylinderGeneratorSetUTile (const Real uTile)
 Sets the U Tile. More...
 
CylinderGeneratorSetVTile (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...
 
- Protected Attributes inherited from Mezzanine::Graphics::Procedural::MeshGenerator< CylinderGenerator >
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< CylinderGenerator >
enum  GeneratorOptions
 A convenience enum used to describe boolean options for a generator.
 
- Protected Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< CylinderGenerator >
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...
 

Detailed Description

A generator class for a cylinder mesh with flat ends.

Definition at line 82 of file cylindergenerator.h.

Constructor & Destructor Documentation

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.

Parameters
RadiusThe radius of the cylinder.
HeightThe height of the cylinder.
SegCircleThe resolution of the circular component of the cylinder.
SegHeightThe number of segments in the cylinders length.
CappedWhether or not the ends of the cylinder will be generated/closed.

Definition at line 81 of file cylindergenerator.cpp.

Member Function Documentation

void Mezzanine::Graphics::Procedural::CylinderGenerator::AddToTriangleBuffer ( TriangleBuffer Buffer) const
virtual

Adds the vertices and indices as configured in this generator to a triangle buffer.

Parameters
BufferThe 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.

Parameters
CappedWhether or not the ends of the cylinder will be generated/closed.
Returns
Returns a reference to this.

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.

Exceptions
Ifthe height is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown.

Parameters
HeightThe height of the cylinder.
Returns
Returns a reference to this.

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.

Exceptions
Ifthe number of segments is less than three, a PARAMETERS_EXCEPTION will be thrown.

Parameters
SegCircleThe resolution of the circular component of the cylinder.
Returns
Returns a reference to this.

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.

Exceptions
Ifthe number of segments is set to 0, a PARAMETERS_EXCEPTION will be thrown.

Parameters
SegHeightThe number of segments in the cylinders length.
Returns
Returns a reference to this.

Definition at line 219 of file cylindergenerator.cpp.

CylinderGenerator & Mezzanine::Graphics::Procedural::CylinderGenerator::SetRadius ( const Real  Radius)

Sets the radius of the cylinder.

Exceptions
Ifthe radius is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown.

Parameters
RadiusThe radius of the cylinder.
Returns
Returns a reference to this.

Definition at line 186 of file cylindergenerator.cpp.

Member Data Documentation

Boole Mezzanine::Graphics::Procedural::CylinderGenerator::CapEnds
protected

Whether or not the ends of the cylinder will be generated/closed.

Definition at line 99 of file cylindergenerator.h.

Real Mezzanine::Graphics::Procedural::CylinderGenerator::CylinderHeight
protected

The height of the cylinder.

Definition at line 90 of file cylindergenerator.h.

Real Mezzanine::Graphics::Procedural::CylinderGenerator::CylinderRadius
protected

The radius of the cylinder.

Definition at line 87 of file cylindergenerator.h.

Whole Mezzanine::Graphics::Procedural::CylinderGenerator::NumSegCircle
protected

The resolution of the circular component of the cylinder.

Definition at line 93 of file cylindergenerator.h.

Whole Mezzanine::Graphics::Procedural::CylinderGenerator::NumSegHeight
protected

The number of segments in the cylinders length.

Definition at line 96 of file cylindergenerator.h.


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