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

A generator class for a tube mesh. More...

#include <tubegenerator.h>

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

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...
 
TubeGeneratorSetHeight (const Real Height)
 Sets the height of the tube.

Exceptions
Ifthe height is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown.
More...
 
TubeGeneratorSetInnerRadius (const Real InnerRadius)
 Sets the inner radius of the tube.

Exceptions
Ifthe radius is set to 0 or less OR if the radius is greater than the outer radius, a PARAMETERS_EXCEPTION will be thrown.
More...
 
TubeGeneratorSetNumSegCircle (const Whole SegCircle)
 Sets the number of segments when rotating around the tube's axis.

Exceptions
Ifthe number of segments is less than three, a PARAMETERS_EXCEPTION will be thrown.
More...
 
TubeGeneratorSetNumSegHeight (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...
 
TubeGeneratorSetOuterRadius (const Real OuterRadius)
 Sets the outer radius of the tube.

Exceptions
Ifthe radius is set to 0 or less OR if the radius is less than the inner radius, a PARAMETERS_EXCEPTION will be thrown.
More...
 
- 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...
 
MeshGenerateMesh (const String &MeshName, const String &MeshGroup, const String &MatName, const String &MatGroup) const
 Generates the mesh. More...
 
TubeGeneratorResetTransforms ()
 Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More...
 
TubeGeneratorSetEnableNormals (Boole EnableNormals)
 Sets whether normals are enabled or not. More...
 
TubeGeneratorSetNumTexCoordSet (const UInt8 NumSets)
 Sets the number of texture coordintate sets. More...
 
TubeGeneratorSetOrientation (const Quaternion &Ori)
 Sets an orientation baked into the resulting mesh. More...
 
TubeGeneratorSetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets an orientation baked into the resulting mesh. More...
 
TubeGeneratorSetPosition (const Vector3 &Loc)
 Sets a translation baked into the resulting mesh. More...
 
TubeGeneratorSetPosition (const Real X, const Real Y, const Real Z)
 Sets a translation baked into the resulting mesh. More...
 
TubeGeneratorSetScale (const Vector3 &Scaling)
 Sets a scale baked into the resulting mesh. More...
 
TubeGeneratorSetScale (const Real Scaling)
 Sets a uniform scale baked into the resulting mesh. More...
 
TubeGeneratorSetScale (const Real X, const Real Y, const Real Z)
 Sets a scale baked into the resulting mesh. More...
 
TubeGeneratorSetSwitchUV (Boole SwitchUV)
 Sets whether to switch U and V texture coordinates. More...
 
TubeGeneratorSetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom)
 Sets the texture rectangle. More...
 
TubeGeneratorSetUTile (const Real uTile)
 Sets the U Tile. More...
 
TubeGeneratorSetVTile (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...
 

Detailed Description

A generator class for a tube mesh.

Definition at line 82 of file tubegenerator.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Procedural::TubeGenerator::TubeGenerator ( const Real  InnerRadius,
const Real  OuterRadius,
const Real  Height,
const Whole  SegCircle,
const Whole  SegHeight 
)

Class constructor.

Parameters
InnerRadiusThe radius of the inner edge of the tube.
OuterRadiusThe radius of the outer edge of the tube.
HeightThe height of the tube.
SegCircleThe resolution of the circular component of the tube.
SegHeightThe number of segments in the tubes length.

Definition at line 81 of file tubegenerator.cpp.

Member Function Documentation

void Mezzanine::Graphics::Procedural::TubeGenerator::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< TubeGenerator >.

Definition at line 95 of file tubegenerator.cpp.

TubeGenerator & Mezzanine::Graphics::Procedural::TubeGenerator::SetHeight ( const Real  Height)

Sets the height of the tube.

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

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

Definition at line 234 of file tubegenerator.cpp.

TubeGenerator & Mezzanine::Graphics::Procedural::TubeGenerator::SetInnerRadius ( const Real  InnerRadius)

Sets the inner radius of the tube.

Exceptions
Ifthe radius is set to 0 or less OR if the radius is greater than the outer radius, a PARAMETERS_EXCEPTION will be thrown.

Parameters
InnerRadiusThe radius of the inner edge of the tube.
Returns
Returns a reference to this.

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.

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

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

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.

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

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

Definition at line 252 of file tubegenerator.cpp.

TubeGenerator & Mezzanine::Graphics::Procedural::TubeGenerator::SetOuterRadius ( const Real  OuterRadius)

Sets the outer radius of the tube.

Exceptions
Ifthe radius is set to 0 or less OR if the radius is less than the inner radius, a PARAMETERS_EXCEPTION will be thrown.

Parameters
OuterRadiusThe radius of the outer edge of the tube.
Returns
Returns a reference to this.

Definition at line 222 of file tubegenerator.cpp.

Member Data Documentation

Whole Mezzanine::Graphics::Procedural::TubeGenerator::NumSegCircle
protected

The resolution of the circular component of the tube.

Definition at line 96 of file tubegenerator.h.

Whole Mezzanine::Graphics::Procedural::TubeGenerator::NumSegHeight
protected

The number of segments in the tubes length.

Definition at line 99 of file tubegenerator.h.

Real Mezzanine::Graphics::Procedural::TubeGenerator::TubeHeight
protected

The height of the tube.

Definition at line 93 of file tubegenerator.h.

Real Mezzanine::Graphics::Procedural::TubeGenerator::TubeInnerRadius
protected

The radius of the inner edge of the tube.

Definition at line 87 of file tubegenerator.h.

Real Mezzanine::Graphics::Procedural::TubeGenerator::TubeOuterRadius
protected

The radius of the outer edge of the tube.

Definition at line 90 of file tubegenerator.h.


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