A generator class for a mesh composed of boxes that outline the corner edges of a larger box. More...
#include <boxcornergenerator.h>
Public Member Functions | |||
BoxCornerGenerator (const Vector3 &HalfExtents, const Real CornerThickness) | |||
Vector constructor. More... | |||
BoxCornerGenerator (const Real HalfSizeX, const Real HalfSizeY, const Real HalfSizeZ, const Real CornerThickness) | |||
Real constructor. More... | |||
virtual | ~BoxCornerGenerator () | ||
Class destructor. | |||
virtual void | AddToTriangleBuffer (TriangleBuffer &Buffer) const | ||
Adds the vertices and indices as configured in this generator to a triangle buffer. More... | |||
BoxCornerGenerator & | SetCornerThickness (const Real CornerThickness) | ||
Sets how far into the box from the edge for each axis the corner component will be sized for.
| |||
BoxCornerGenerator & | SetHalfExtents (const Vector3 &HalfExtents) | ||
Sets the half size of the box. More... | |||
BoxCornerGenerator & | SetHalfSizeX (const Real HalfSizeX) | ||
Sets the half size along the X axis.
| |||
BoxCornerGenerator & | SetHalfSizeY (const Real HalfSizeY) | ||
Sets the half size along the Y axis.
| |||
BoxCornerGenerator & | SetHalfSizeZ (const Real HalfSizeZ) | ||
Sets the half size along the Z axis.
| |||
Public Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< BoxCornerGenerator > | |||
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... | |||
Mesh * | GenerateMesh (const String &MeshName, const String &MeshGroup, const String &MatName, const String &MatGroup) const | ||
Generates the mesh. More... | |||
BoxCornerGenerator & | ResetTransforms () | ||
Resets all transforms (orientation, position and scale) that would have been applied to the mesh to their default values. More... | |||
BoxCornerGenerator & | SetEnableNormals (Boole EnableNormals) | ||
Sets whether normals are enabled or not. More... | |||
BoxCornerGenerator & | SetNumTexCoordSet (const UInt8 NumSets) | ||
Sets the number of texture coordintate sets. More... | |||
BoxCornerGenerator & | SetOrientation (const Quaternion &Ori) | ||
Sets an orientation baked into the resulting mesh. More... | |||
BoxCornerGenerator & | SetOrientation (const Real X, const Real Y, const Real Z, const Real W) | ||
Sets an orientation baked into the resulting mesh. More... | |||
BoxCornerGenerator & | SetPosition (const Vector3 &Loc) | ||
Sets a translation baked into the resulting mesh. More... | |||
BoxCornerGenerator & | SetPosition (const Real X, const Real Y, const Real Z) | ||
Sets a translation baked into the resulting mesh. More... | |||
BoxCornerGenerator & | SetScale (const Vector3 &Scaling) | ||
Sets a scale baked into the resulting mesh. More... | |||
BoxCornerGenerator & | SetScale (const Real Scaling) | ||
Sets a uniform scale baked into the resulting mesh. More... | |||
BoxCornerGenerator & | SetScale (const Real X, const Real Y, const Real Z) | ||
Sets a scale baked into the resulting mesh. More... | |||
BoxCornerGenerator & | SetSwitchUV (Boole SwitchUV) | ||
Sets whether to switch U and V texture coordinates. More... | |||
BoxCornerGenerator & | SetTextureRectangle (const Real RectLeft, const Real RectRight, const Real RectTop, const Real RectBottom) | ||
Sets the texture rectangle. More... | |||
BoxCornerGenerator & | SetUTile (const Real uTile) | ||
Sets the U Tile. More... | |||
BoxCornerGenerator & | SetVTile (const Real vTile) | ||
Sets the V Tile. More... | |||
Protected Attributes | |
Vector3 | BoxHalf |
The size of the box to generate. More... | |
Real | BoxThick |
The thickness of boxes that will be generated in each corner for each axis. More... | |
Protected Attributes inherited from Mezzanine::Graphics::Procedural::MeshGenerator< BoxCornerGenerator > | |
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< BoxCornerGenerator > | |
enum | GeneratorOptions |
A convenience enum used to describe boolean options for a generator. | |
Protected Member Functions inherited from Mezzanine::Graphics::Procedural::MeshGenerator< BoxCornerGenerator > | |
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... | |
A generator class for a mesh composed of boxes that outline the corner edges of a larger box.
Definition at line 82 of file boxcornergenerator.h.
Mezzanine::Graphics::Procedural::BoxCornerGenerator::BoxCornerGenerator | ( | const Vector3 & | HalfExtents, |
const Real | CornerThickness | ||
) |
Vector constructor.
HalfExtents | The half size of the box to generate. |
CornerThickness | The thickness of boxes that will be generated in each corner for each axis. |
Definition at line 80 of file boxcornergenerator.cpp.
Mezzanine::Graphics::Procedural::BoxCornerGenerator::BoxCornerGenerator | ( | const Real | HalfSizeX, |
const Real | HalfSizeY, | ||
const Real | HalfSizeZ, | ||
const Real | CornerThickness | ||
) |
Real constructor.
HalfSizeX | The half size of the box to generate on the X axis. |
HalfSizeY | The half size of the box to generate on the Y axis. |
HalfSizeZ | The half size of the box to generate on the Z axis. |
CornerThickness | The thickness of boxes that will be generated in each corner for each axis. |
Definition at line 86 of file boxcornergenerator.cpp.
|
virtual |
Adds the vertices and indices as configured in this generator to a triangle buffer.
Buffer | The buffer to append this generators vertices and indices to. |
Implements Mezzanine::Graphics::Procedural::MeshGenerator< BoxCornerGenerator >.
Definition at line 100 of file boxcornergenerator.cpp.
BoxCornerGenerator & Mezzanine::Graphics::Procedural::BoxCornerGenerator::SetCornerThickness | ( | const Real | CornerThickness | ) |
Sets how far into the box from the edge for each axis the corner component will be sized for.
If | the thickness is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
CornerThickness | The thickness of boxes that will be generated in each corner for each axis. |
Definition at line 334 of file boxcornergenerator.cpp.
BoxCornerGenerator & Mezzanine::Graphics::Procedural::BoxCornerGenerator::SetHalfExtents | ( | const Vector3 & | HalfExtents | ) |
Sets the half size of the box.
Size | The half size of the box that will be generated. |
Definition at line 326 of file boxcornergenerator.cpp.
BoxCornerGenerator & Mezzanine::Graphics::Procedural::BoxCornerGenerator::SetHalfSizeX | ( | const Real | HalfSizeX | ) |
Sets the half size along the X axis.
If | the size is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
SizeX | The size to set for the generated box on the X axis. |
Definition at line 299 of file boxcornergenerator.cpp.
BoxCornerGenerator & Mezzanine::Graphics::Procedural::BoxCornerGenerator::SetHalfSizeY | ( | const Real | HalfSizeY | ) |
Sets the half size along the Y axis.
If | the size is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
SizeY | The size to set for the generated box on the Y axis. |
Definition at line 308 of file boxcornergenerator.cpp.
BoxCornerGenerator & Mezzanine::Graphics::Procedural::BoxCornerGenerator::SetHalfSizeZ | ( | const Real | HalfSizeZ | ) |
Sets the half size along the Z axis.
If | the size is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown. |
SizeZ | The size to set for the generated box on the Z axis. |
Definition at line 317 of file boxcornergenerator.cpp.
|
protected |
The size of the box to generate.
Definition at line 87 of file boxcornergenerator.h.
|
protected |
The thickness of boxes that will be generated in each corner for each axis.
Definition at line 90 of file boxcornergenerator.h.