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

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...
 
TorusGeneratorSetNumPoloidalSeg (const Whole PoloidalSeg)
 Sets the number of segments on the Poloidal ring.

Exceptions
Ifthe number of segments is less than three, a PARAMETERS_EXCEPTION will be thrown.
More...
 
TorusGeneratorSetNumToroidalSeg (const Whole ToroidalSeg)
 Sets the number of segments along the guiding circle.

Exceptions
Ifthe number of segments is less than three, a PARAMETERS_EXCEPTION will be thrown.
More...
 
TorusGeneratorSetPoloidalRadius (const Real PoloidalRadius)
 Sets the radius of the torus.

Exceptions
Ifthe radius is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown.
More...
 
TorusGeneratorSetToroidalRadius (const Real ToroidalRadius)
 Sets the radius of the torus ring. AKA it's thickness.

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< 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...
 
MeshGenerateMesh (const String &MeshName, const String &MeshGroup, const String &MatName, const String &MatGroup) const
 Generates the mesh. More...
 
TorusGeneratorResetTransforms ()
 Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More...
 
TorusGeneratorSetEnableNormals (Boole EnableNormals)
 Sets whether normals are enabled or not. More...
 
TorusGeneratorSetNumTexCoordSet (const UInt8 NumSets)
 Sets the number of texture coordintate sets. More...
 
TorusGeneratorSetOrientation (const Quaternion &Ori)
 Sets an orientation baked into the resulting mesh. More...
 
TorusGeneratorSetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets an orientation baked into the resulting mesh. More...
 
TorusGeneratorSetPosition (const Vector3 &Loc)
 Sets a translation baked into the resulting mesh. More...
 
TorusGeneratorSetPosition (const Real X, const Real Y, const Real Z)
 Sets a translation baked into the resulting mesh. More...
 
TorusGeneratorSetScale (const Vector3 &Scaling)
 Sets a scale baked into the resulting mesh. More...
 
TorusGeneratorSetScale (const Real Scaling)
 Sets a uniform scale baked into the resulting mesh. More...
 
TorusGeneratorSetScale (const Real X, const Real Y, const Real Z)
 Sets a scale baked into the resulting mesh. More...
 
TorusGeneratorSetSwitchUV (Boole SwitchUV)
 Sets whether to switch U and V texture coordinates. More...
 
TorusGeneratorSetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom)
 Sets the texture rectangle. More...
 
TorusGeneratorSetUTile (const Real uTile)
 Sets the U Tile. More...
 
TorusGeneratorSetVTile (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...
 

Detailed Description

A generator class for a torus mesh.

Definition at line 82 of file torusgenerator.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Procedural::TorusGenerator::TorusGenerator ( const Real  PoloidalRadius,
const Real  ToroidalRadius,
const Whole  PoloidalSeg = 16,
const Whole  ToroidalSeg = 16 
)

Class constructor.

Parameters
PoloidalRadiusThe radius of the primary ring of the torus.
ToroidalRadiusThe radius of the secondary ring of the torus.
PoloidalSegThe resolution of the primary ring of the torus.
ToroidalSegThe resolution of the secondary ring of the torus.

Definition at line 81 of file torusgenerator.cpp.

Member Function Documentation

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

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

Parameters
PoloidalSegThe resolution of the primary ring of the torus.
Returns
Returns a reference to this.

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.

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

Parameters
ToroidalSegTheresolution of the secondary ring of the torus.
Returns
Returns a reference to this.

Definition at line 160 of file torusgenerator.cpp.

TorusGenerator & Mezzanine::Graphics::Procedural::TorusGenerator::SetPoloidalRadius ( const Real  PoloidalRadius)

Sets the radius of the torus.

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

Parameters
PoloidalRadiusThe radius of the primary ring of the torus.
Returns
Returns a reference to this.

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.

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

Parameters
ToroidalRadiusThe radius of the secondary ring of the torus.
Returns
Returns a reference to this.

Definition at line 142 of file torusgenerator.cpp.

Member Data Documentation

Whole Mezzanine::Graphics::Procedural::TorusGenerator::NumPoloidalSeg
protected

The resolution of the Poloidal ring.

Definition at line 95 of file torusgenerator.h.

Whole Mezzanine::Graphics::Procedural::TorusGenerator::NumToroidalSeg
protected

The resolution of the Toroidal ring.

Definition at line 98 of file torusgenerator.h.

Real Mezzanine::Graphics::Procedural::TorusGenerator::TorusPoloidalRadius
protected

The radius of the primary ring of the torus.

Remarks
This radius does not encapsulate the complete AABB of the torus. Add Toroidal radius to this value to get the full bounds.

Definition at line 88 of file torusgenerator.h.

Real Mezzanine::Graphics::Procedural::TorusGenerator::TorusToroidalRadius
protected

The radius of the secondary ring of the torus.

Remarks
This is the value for the "thickness" of the ring.

Definition at line 92 of file torusgenerator.h.


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