67 #ifndef _graphicsproceduralboxgenerator_cpp
68 #define _graphicsproceduralboxgenerator_cpp
70 #include "Graphics/Procedural/Mesh/boxgenerator.h"
71 #include "Graphics/Procedural/Mesh/planegenerator.h"
157 if( HalfSizeX <= 0.0 )
166 if( HalfSizeY <= 0.0 )
175 if( HalfSizeZ <= 0.0 )
PlaneGenerator & SetNumSegY(const Whole SegY)
Sets the number of segments along local Y axis.
Real X
Coordinate on the X vector.
A generator class for a box mesh.
Real Z
Coordinate on the Z vector.
T & SetVTile(const Real vTile)
Sets the V Tile.
A convenience buffer that stores vertices and indices of a mesh to be generated.
BoxGenerator & SetHalfSizeY(const Real HalfSizeY)
Sets the half size along the Y axis. the size is set to 0 or less, a PARAMETERS_EXCEPTION will be thr...
Vector3 BoxHalf
The size of the box to generate.
virtual void AddToTriangleBuffer(TriangleBuffer &Buffer) const
Adds the vertices and indices as configured in this generator to a triangle buffer.
BoxGenerator & SetNumSegZ(const Whole SegZ)
Sets the number of segments along Z axis.
static const String TAG_Z
A String containing the name of the Z face of the box.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
T & SetScale(const Vector3 &Scaling)
Sets a scale baked into the resulting mesh.
static const String TAG_Y
A String containing the name of the Y face of the box.
Whole NumSegX
The number of segments to generate along the X axis for each face.
BoxGenerator & SetHalfExtents(const Vector3 &HalfExtents)
Sets the half size of the box.
Vector3 Scale
Scale to apply to the mesh.
This implements the exception hiearchy for Mezzanine.
float Real
A Datatype used to represent a real floating point number.
static const String TAG_NEGX
A String containing the name of the Negative X face of the box.
T & SetPosition(const Vector3 &Loc)
Sets a translation baked into the resulting mesh.
T & SetOrientation(const Quaternion &Ori)
Sets an orientation baked into the resulting mesh.
Whole NumSegZ
The number of segments to generate along the Z axis for each face.
static const String TAG_NEGZ
A String containing the name of the Negative Z face of the box.
A generator class for a plane mesh.
Vector3 Position
Position to apply to the mesh.
Whole NumSegY
The number of segments to generate along the Y axis for each face.
static Vector3 Unit_Y()
Gets a vector representing the Y unit of a Vector3.
PlaneGenerator & SetNormal(const Vector3 &Norm)
Sets the normal of the plane. the normal is zero length a PARAMETERS_EXCEPTION will be thrown...
Real Y
Coordinate on the Y vector.
BoxGenerator(const Vector3 &HalfExtents, const Whole SegX=1, const Whole SegY=1, const Whole SegZ=1)
Vector constructor.
static Vector3 Neg_Unit_X()
Gets a vector representing the negative X unit of a Vector3.
static const String TAG_X
A String containing the name of the X face of the box.
Real VTile
V tile for texture coords generation.
Thrown when parameters are checked at runtime and found invalid.
static Vector3 Unit_X()
Gets a vector representing the X unit of a Vector3.
BoxGenerator & SetNumSegX(const Whole SegX)
Sets the number of segments along X axis.
PlaneGenerator & SetSizeX(const Real SizeX)
Sets the size of this plane on the X axis. the size passed in is zero or less a PARAMETERS_EXCEPTION ...
static const String TAG_NEGY
A String containing the name of the Negative Y face of the box.
static Vector3 Unit_Z()
Gets a vector representing the Z unit of a Vector3.
PlaneGenerator & SetNumSegX(const Whole SegX)
Sets the number of segements along local X axis.
This is used to represent a point in space, or a vector through space.
PlaneGenerator & SetSizeY(const Real SizeY)
Sets the size of this plane on the Y axis. the size passed in is zero or less a PARAMETERS_EXCEPTION ...
Whether or not a transform has been defined and is to be used.
virtual ~BoxGenerator()
Class destructor.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
T & SetUTile(const Real uTile)
Sets the U Tile.
BoxGenerator & SetHalfSizeX(const Real HalfSizeX)
Sets the half size along the X axis. the size is set to 0 or less, a PARAMETERS_EXCEPTION will be thr...
virtual void AddToTriangleBuffer(TriangleBuffer &Buffer) const
Adds the vertices and indices as configured in this generator to a triangle buffer.
UInt8 GeneratorOpts
Storage for the boolean options to be used by this generator.
Real UTile
U tile for texture coords generation.
BoxGenerator & SetHalfSizeZ(const Real HalfSizeZ)
Sets the half size along the Z axis. the size is set to 0 or less, a PARAMETERS_EXCEPTION will be thr...
static Vector3 Neg_Unit_Z()
Gets a vector representing the negative Z unit of a Vector3.
std::string String
A datatype used to a series of characters.
Quaternion Orientation
Orientation to apply the mesh.
static Vector3 Neg_Unit_Y()
Gets a vector representing the negative Y unit of a Vector3.
BoxGenerator & SetNumSegY(const Whole SegY)
Sets the number of segments along Y axis.