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

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

#include <spheregenerator.h>

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

Public Member Functions

 SphereGenerator (const Real Radius, const Whole Rings=16, const Whole SegCircle=16)
 Class constuctor. More...
 
virtual ~SphereGenerator ()
 Class destructor.
 
virtual void AddToTriangleBuffer (TriangleBuffer &Buffer) const
 Adds the vertices and indices as configured in this generator to a triangle buffer. More...
 
SphereGeneratorSetNumRings (const Whole Rings)
 Sets the number of rings,

Exceptions
Ifthe number of rings is set to 0, a PARAMETERS_EXCEPTION will be thrown.
More...
 
SphereGeneratorSetNumSegCircle (const Whole SegCircle)
 Sets the number of segments along the circumference of the rings.

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

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< SphereGenerator >
 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...
 
SphereGeneratorResetTransforms ()
 Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More...
 
SphereGeneratorSetEnableNormals (Boole EnableNormals)
 Sets whether normals are enabled or not. More...
 
SphereGeneratorSetNumTexCoordSet (const UInt8 NumSets)
 Sets the number of texture coordintate sets. More...
 
SphereGeneratorSetOrientation (const Quaternion &Ori)
 Sets an orientation baked into the resulting mesh. More...
 
SphereGeneratorSetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets an orientation baked into the resulting mesh. More...
 
SphereGeneratorSetPosition (const Vector3 &Loc)
 Sets a translation baked into the resulting mesh. More...
 
SphereGeneratorSetPosition (const Real X, const Real Y, const Real Z)
 Sets a translation baked into the resulting mesh. More...
 
SphereGeneratorSetScale (const Vector3 &Scaling)
 Sets a scale baked into the resulting mesh. More...
 
SphereGeneratorSetScale (const Real Scaling)
 Sets a uniform scale baked into the resulting mesh. More...
 
SphereGeneratorSetScale (const Real X, const Real Y, const Real Z)
 Sets a scale baked into the resulting mesh. More...
 
SphereGeneratorSetSwitchUV (Boole SwitchUV)
 Sets whether to switch U and V texture coordinates. More...
 
SphereGeneratorSetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom)
 Sets the texture rectangle. More...
 
SphereGeneratorSetUTile (const Real uTile)
 Sets the U Tile. More...
 
SphereGeneratorSetVTile (const Real vTile)
 Sets the V Tile. More...
 

Protected Attributes

Whole NumRings
 The number of rings controlling the resolution along the vertical axis. More...
 
Whole NumSegCircle
 The number of segments along the circumference of the rings. More...
 
Real SphereRadius
 The radius of the sphere. More...
 
- Protected Attributes inherited from Mezzanine::Graphics::Procedural::MeshGenerator< SphereGenerator >
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< SphereGenerator >
enum  GeneratorOptions
 A convenience enum used to describe boolean options for a generator.
 
- Protected Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< SphereGenerator >
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 sphere mesh.

Definition at line 82 of file spheregenerator.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Procedural::SphereGenerator::SphereGenerator ( const Real  Radius,
const Whole  Rings = 16,
const Whole  SegCircle = 16 
)

Class constuctor.

Parameters
RadiusThe radius of the sphere.
RingsThe number of rings controlling the resolution along the vertical axis.
SegCircleThe number of segments along the circumference of the rings.

Definition at line 81 of file spheregenerator.cpp.

Member Function Documentation

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

Definition at line 93 of file spheregenerator.cpp.

SphereGenerator & Mezzanine::Graphics::Procedural::SphereGenerator::SetNumRings ( const Whole  Rings)

Sets the number of rings,

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

Parameters
RingsThe number of rings controlling the resolution along the vertical axis.
Returns
Returns a reference to this.

Definition at line 148 of file spheregenerator.cpp.

SphereGenerator & Mezzanine::Graphics::Procedural::SphereGenerator::SetNumSegCircle ( const Whole  SegCircle)

Sets the number of segments along the circumference of the rings.

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

Parameters
SegCircleThe number of segments along the circumference of the rings.
Returns
Returns a reference to this.

Definition at line 157 of file spheregenerator.cpp.

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

Sets the radius of the sphere.

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

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

Definition at line 139 of file spheregenerator.cpp.

Member Data Documentation

Whole Mezzanine::Graphics::Procedural::SphereGenerator::NumRings
protected

The number of rings controlling the resolution along the vertical axis.

Definition at line 90 of file spheregenerator.h.

Whole Mezzanine::Graphics::Procedural::SphereGenerator::NumSegCircle
protected

The number of segments along the circumference of the rings.

Definition at line 93 of file spheregenerator.h.

Real Mezzanine::Graphics::Procedural::SphereGenerator::SphereRadius
protected

The radius of the sphere.

Definition at line 87 of file spheregenerator.h.


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