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

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

#include <conegenerator.h>

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

Public Member Functions

 ConeGenerator (const Real Radius, const Real Height, const Whole SegCircle=16, const Whole SegHeight=1)
 Class constructor. More...
 
virtual ~ConeGenerator ()
 Class destructor.
 
virtual void AddToTriangleBuffer (TriangleBuffer &Buffer) const
 Adds the vertices and indices as configured in this generator to a triangle buffer. More...
 
ConeGeneratorSetHeight (const Real Height)
 Sets the height of the cone.

Exceptions
Ifthe height is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown.
More...
 
ConeGeneratorSetNumSegCircle (const Whole SegCircle)
 Sets the number of segments on the side of the base.

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

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

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< ConeGenerator >
 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...
 
ConeGeneratorResetTransforms ()
 Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More...
 
ConeGeneratorSetEnableNormals (Boole EnableNormals)
 Sets whether normals are enabled or not. More...
 
ConeGeneratorSetNumTexCoordSet (const UInt8 NumSets)
 Sets the number of texture coordintate sets. More...
 
ConeGeneratorSetOrientation (const Quaternion &Ori)
 Sets an orientation baked into the resulting mesh. More...
 
ConeGeneratorSetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets an orientation baked into the resulting mesh. More...
 
ConeGeneratorSetPosition (const Vector3 &Loc)
 Sets a translation baked into the resulting mesh. More...
 
ConeGeneratorSetPosition (const Real X, const Real Y, const Real Z)
 Sets a translation baked into the resulting mesh. More...
 
ConeGeneratorSetScale (const Vector3 &Scaling)
 Sets a scale baked into the resulting mesh. More...
 
ConeGeneratorSetScale (const Real Scaling)
 Sets a uniform scale baked into the resulting mesh. More...
 
ConeGeneratorSetScale (const Real X, const Real Y, const Real Z)
 Sets a scale baked into the resulting mesh. More...
 
ConeGeneratorSetSwitchUV (Boole SwitchUV)
 Sets whether to switch U and V texture coordinates. More...
 
ConeGeneratorSetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom)
 Sets the texture rectangle. More...
 
ConeGeneratorSetUTile (const Real uTile)
 Sets the U Tile. More...
 
ConeGeneratorSetVTile (const Real vTile)
 Sets the V Tile. More...
 

Protected Attributes

Real ConeHeight
 The height of the cone. More...
 
Real ConeRadius
 The radius of the cone. More...
 
Whole NumSegCircle
 The resolution of the circular component of the cone. More...
 
Whole NumSegHeight
 The number of segments in the cones length. More...
 
- Protected Attributes inherited from Mezzanine::Graphics::Procedural::MeshGenerator< ConeGenerator >
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< ConeGenerator >
enum  GeneratorOptions
 A convenience enum used to describe boolean options for a generator.
 
- Protected Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< ConeGenerator >
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 cone mesh.

Definition at line 82 of file conegenerator.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Procedural::ConeGenerator::ConeGenerator ( const Real  Radius,
const Real  Height,
const Whole  SegCircle = 16,
const Whole  SegHeight = 1 
)

Class constructor.

Parameters
RadiusThe radius of the cone.
HeightThe height of the cone.
SegCircleThe resolution of the circular component of the cone.
SegHeightThe number of segments in the cones length.

Definition at line 81 of file conegenerator.cpp.

Member Function Documentation

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

Definition at line 94 of file conegenerator.cpp.

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

Sets the height of the cone.

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

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

Definition at line 170 of file conegenerator.cpp.

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

Sets the number of segments on the side of the base.

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

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

Definition at line 179 of file conegenerator.cpp.

ConeGenerator & Mezzanine::Graphics::Procedural::ConeGenerator::SetNumSegHeight ( const Whole  SegHeight)

Sets the number of segments on the height.

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

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

Definition at line 188 of file conegenerator.cpp.

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

Sets the base radius.

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

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

Definition at line 161 of file conegenerator.cpp.

Member Data Documentation

Real Mezzanine::Graphics::Procedural::ConeGenerator::ConeHeight
protected

The height of the cone.

Definition at line 90 of file conegenerator.h.

Real Mezzanine::Graphics::Procedural::ConeGenerator::ConeRadius
protected

The radius of the cone.

Definition at line 87 of file conegenerator.h.

Whole Mezzanine::Graphics::Procedural::ConeGenerator::NumSegCircle
protected

The resolution of the circular component of the cone.

Definition at line 93 of file conegenerator.h.

Whole Mezzanine::Graphics::Procedural::ConeGenerator::NumSegHeight
protected

The number of segments in the cones length.

Definition at line 96 of file conegenerator.h.


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