67 #ifndef _graphicsproceduralplanegenerator_cpp
68 #define _graphicsproceduralplanegenerator_cpp
70 #include "Graphics/Procedural/Mesh/planegenerator.h"
81 PlaneNormal(
Vector3::Unit_Y() ),
118 this->
AddPoint(Buffer, orig + ( delta1 *
Real(i1) ) + ( delta2 *
Real(i2) ),
124 Boole Reverse =
false;
134 Buffer.
AddIndex( Offset + ( this->NumSegY + 1 ) );
137 Buffer.
AddIndex( Offset + ( this->NumSegY + 1 ) );
138 Buffer.
AddIndex( Offset + ( this->NumSegY + 1 ) + 1 );
142 Buffer.
AddIndex( Offset + ( this->NumSegY + 1 ) );
144 Buffer.
AddIndex( Offset + ( this->NumSegY + 1 ) + 1 );
145 Buffer.
AddIndex( Offset + ( this->NumSegY + 1 ) );
PlaneGenerator & SetNumSegY(const Whole SegY)
Sets the number of segments along local Y axis.
Vector3 Perpendicular() const
Gets a vector that is perpendicular to this one.
Vector3 CrossProduct(const Vector3 &Vec) const
This is used to calculate the crossproduct of this and another vector.
bool Boole
Generally acts a single bit, true or false.
Vector3 PlaneNormal
The facing direction of the plane.
A convenience buffer that stores vertices and indices of a mesh to be generated.
virtual ~PlaneGenerator()
Class destructor.
virtual void AddToTriangleBuffer(TriangleBuffer &Buffer) const
Adds the vertices and indices as configured in this generator to a triangle buffer.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
void EstimateIndexCount(const Whole IndexCount)
Gives an estimation of the number of indices needed for this triangle buffer.
void RebaseOffset()
Rebase index offset.
int Integer
A datatype used to represent any integer close to.
Whole NumSegX
The number of segments to generate on the X axis.
This implements the exception hiearchy for Mezzanine.
Whole NumSegY
The number of segments to generate on the Y axis.
float Real
A Datatype used to represent a real floating point number.
Real Y
Coordinate on the Y vector.
A generator class for a plane mesh.
Real X
Coordinate on the X vector.
void EstimateVertexCount(const Whole VertexCount)
Gives an estimation of the number of vertices need for this triangle buffer.
This is used to represent a point on a 2 dimentional area, such as a screen.
PlaneGenerator & SetNormal(const Vector3 &Norm)
Sets the normal of the plane. the normal is zero length a PARAMETERS_EXCEPTION will be thrown...
Vector2 PlaneSize
The size of the plane.
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.
Thrown when parameters are checked at runtime and found invalid.
Real DotProduct(const Vector3 &Vec) const
This is used to calculate the dotproduct of this and another vector.
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 ...
PlaneGenerator & SetNumSegX(const Whole SegX)
Sets the number of segements along local X axis.
TriangleBuffer & AddIndex(const Integer Index)
Adds an index to the index buffer.
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 ...
PlaneGenerator & SetSize(const Vector2 Size)
Sets the size of the plane. the size passed in on either axis is zero or less a PARAMETERS_EXCEPTION ...
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.
Boole IsZeroLength() const
Checks to see if the length of this vector is zero.
PlaneGenerator()
Blank constructor.