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

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

#include <planegenerator.h>

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

Public Member Functions

 PlaneGenerator ()
 Blank constructor.
 
 PlaneGenerator (const Vector3 &Norm, const Vector2 &Size)
 Descriptive constructor. More...
 
virtual ~PlaneGenerator ()
 Class destructor.
 
virtual void AddToTriangleBuffer (TriangleBuffer &Buffer) const
 Adds the vertices and indices as configured in this generator to a triangle buffer. More...
 
PlaneGeneratorSetNormal (const Vector3 &Norm)
 Sets the normal of the plane.

Exceptions
Ifthe normal is zero length a PARAMETERS_EXCEPTION will be thrown.
More...
 
PlaneGeneratorSetNumSegX (const Whole SegX)
 Sets the number of segements along local X axis. More...
 
PlaneGeneratorSetNumSegY (const Whole SegY)
 Sets the number of segments along local Y axis. More...
 
PlaneGeneratorSetSize (const Vector2 Size)
 Sets the size of the plane.

Exceptions
Ifthe size passed in on either axis is zero or less a PARAMETERS_EXCEPTION will be thrown.
More...
 
PlaneGeneratorSetSizeX (const Real SizeX)
 Sets the size of this plane on the X axis.

Exceptions
Ifthe size passed in is zero or less a PARAMETERS_EXCEPTION will be thrown.
More...
 
PlaneGeneratorSetSizeY (const Real SizeY)
 Sets the size of this plane on the Y axis.

Exceptions
Ifthe size passed in is zero or less a PARAMETERS_EXCEPTION will be thrown.
More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< PlaneGenerator >
 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...
 
PlaneGeneratorResetTransforms ()
 Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More...
 
PlaneGeneratorSetEnableNormals (Boole EnableNormals)
 Sets whether normals are enabled or not. More...
 
PlaneGeneratorSetNumTexCoordSet (const UInt8 NumSets)
 Sets the number of texture coordintate sets. More...
 
PlaneGeneratorSetOrientation (const Quaternion &Ori)
 Sets an orientation baked into the resulting mesh. More...
 
PlaneGeneratorSetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets an orientation baked into the resulting mesh. More...
 
PlaneGeneratorSetPosition (const Vector3 &Loc)
 Sets a translation baked into the resulting mesh. More...
 
PlaneGeneratorSetPosition (const Real X, const Real Y, const Real Z)
 Sets a translation baked into the resulting mesh. More...
 
PlaneGeneratorSetScale (const Vector3 &Scaling)
 Sets a scale baked into the resulting mesh. More...
 
PlaneGeneratorSetScale (const Real Scaling)
 Sets a uniform scale baked into the resulting mesh. More...
 
PlaneGeneratorSetScale (const Real X, const Real Y, const Real Z)
 Sets a scale baked into the resulting mesh. More...
 
PlaneGeneratorSetSwitchUV (Boole SwitchUV)
 Sets whether to switch U and V texture coordinates. More...
 
PlaneGeneratorSetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom)
 Sets the texture rectangle. More...
 
PlaneGeneratorSetUTile (const Real uTile)
 Sets the U Tile. More...
 
PlaneGeneratorSetVTile (const Real vTile)
 Sets the V Tile. More...
 

Protected Attributes

Whole NumSegX
 The number of segments to generate on the X axis. More...
 
Whole NumSegY
 The number of segments to generate on the Y axis. More...
 
Vector3 PlaneNormal
 The facing direction of the plane. More...
 
Vector2 PlaneSize
 The size of the plane. More...
 
- Protected Attributes inherited from Mezzanine::Graphics::Procedural::MeshGenerator< PlaneGenerator >
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< PlaneGenerator >
enum  GeneratorOptions
 A convenience enum used to describe boolean options for a generator.
 
- Protected Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< PlaneGenerator >
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 plane mesh.

Definition at line 82 of file planegenerator.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Procedural::PlaneGenerator::PlaneGenerator ( const Vector3 Norm,
const Vector2 Size 
)

Descriptive constructor.

Parameters
NormThe facing direction of the plane.
SizeThe size of the plane.

Definition at line 87 of file planegenerator.cpp.

Member Function Documentation

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

Definition at line 100 of file planegenerator.cpp.

PlaneGenerator & Mezzanine::Graphics::Procedural::PlaneGenerator::SetNormal ( const Vector3 Norm)

Sets the normal of the plane.

Exceptions
Ifthe normal is zero length a PARAMETERS_EXCEPTION will be thrown.

Parameters
NormThe facing direction to apply to the plane.
Returns
Returns a reference to this.

Definition at line 156 of file planegenerator.cpp.

PlaneGenerator & Mezzanine::Graphics::Procedural::PlaneGenerator::SetNumSegX ( const Whole  SegX)

Sets the number of segements along local X axis.

Remarks
The default number of segments on the X axis is 1.
Exceptions
Ifthe number of segments is set to 0, a PARAMETERS_EXCEPTION will be thrown.
Parameters
SegXThe number of segments to set along the X axis.
Returns
Returns a reference to this.

Definition at line 190 of file planegenerator.cpp.

PlaneGenerator & Mezzanine::Graphics::Procedural::PlaneGenerator::SetNumSegY ( const Whole  SegY)

Sets the number of segments along local Y axis.

Remarks
The default number of segments on the Y axis is 1.
Exceptions
Ifthe number of segments is set to 0, a PARAMETERS_EXCEPTION will be thrown.
Parameters
SegYThe number of segments to set along the Y axis.
Returns
Returns a reference to this.

Definition at line 199 of file planegenerator.cpp.

PlaneGenerator & Mezzanine::Graphics::Procedural::PlaneGenerator::SetSize ( const Vector2  Size)

Sets the size of the plane.

Exceptions
Ifthe size passed in on either axis is zero or less a PARAMETERS_EXCEPTION will be thrown.

Parameters
SizeThe size to set for the generated plane.
Returns
Returns a reference to this.

Definition at line 183 of file planegenerator.cpp.

PlaneGenerator & Mezzanine::Graphics::Procedural::PlaneGenerator::SetSizeX ( const Real  SizeX)

Sets the size of this plane on the X axis.

Exceptions
Ifthe size passed in is zero or less a PARAMETERS_EXCEPTION will be thrown.

Parameters
SizeXThe size to set for the generated plane on the X axis.
Returns
Returns a reference to this.

Definition at line 165 of file planegenerator.cpp.

PlaneGenerator & Mezzanine::Graphics::Procedural::PlaneGenerator::SetSizeY ( const Real  SizeY)

Sets the size of this plane on the Y axis.

Exceptions
Ifthe size passed in is zero or less a PARAMETERS_EXCEPTION will be thrown.

Parameters
SizeXThe size to set for the generated plane on the Y axis.
Returns
Returns a reference to this.

Definition at line 174 of file planegenerator.cpp.

Member Data Documentation

Whole Mezzanine::Graphics::Procedural::PlaneGenerator::NumSegX
protected

The number of segments to generate on the X axis.

Definition at line 93 of file planegenerator.h.

Whole Mezzanine::Graphics::Procedural::PlaneGenerator::NumSegY
protected

The number of segments to generate on the Y axis.

Definition at line 96 of file planegenerator.h.

Vector3 Mezzanine::Graphics::Procedural::PlaneGenerator::PlaneNormal
protected

The facing direction of the plane.

Definition at line 87 of file planegenerator.h.

Vector2 Mezzanine::Graphics::Procedural::PlaneGenerator::PlaneSize
protected

The size of the plane.

Definition at line 90 of file planegenerator.h.


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