67 #ifndef _graphicsproceduralcylinderuvmodifier_cpp
68 #define _graphicsproceduralcylinderuvmodifier_cpp
70 #include "Graphics/Procedural/Mesh/cylinderuvmodifier.h"
72 #include "MathTools/mathtools.h"
103 Vector2 XZNorm( VertIt->Normal.X, VertIt->Normal.Z );
104 Real Alpha = ( MathTools::ATan( VertIt->Normal.Y / XZNorm.
Length() ) + MathTools::GetHalfPi() );
105 if( MathTools::Abs(Alpha) > AngleThreshold ) {
106 Vector2 XZVec( VertIt->Position.X, VertIt->Position.Z );
109 Vector2 XZVec( VertIt->Position.X, VertIt->Position.Z );
117 {
return "CylinderUVModifier"; }
CylinderUVModifier & SetHeight(const Real Height)
Sets the Height of the cylinder to generate UV's for.
Real CylinderHeight
The total height of the cylinder to project the UV's onto.
VertexContainer::iterator VertexIterator
Iterator type for Vertex instances in a VertexContainer.
A convenience buffer that stores vertices and indices of a mesh to be generated.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
virtual void Modify(TriangleBuffer &Buffer)
Alters the generated pixels in a TriangleBuffer.
Real AngleTo(const Vector2 &Other) const
Gets an oriented angle between this Vector2 and another Vector2.
This implements the exception hiearchy for Mezzanine.
VertexContainer & GetVertices()
Gets a modifiable reference to Vertices.
float Real
A Datatype used to represent a real floating point number.
CylinderUVModifier & SetRadius(const Real Radius)
Sets the Radius of the cylinder to generate UV's for.
This is used to represent a point on a 2 dimentional area, such as a screen.
static Vector2 Unit_X()
Gets a vector representing the X unit of a Vector2.
Thrown when the available information should have worked but failed for unknown reasons.
Real Length() const
Gets the length of this vector.
The bulk of the engine components go in this namspace.
virtual ~CylinderUVModifier()
Class destructor.
CylinderUVModifier()
Blank constructor.
Real CylinderRadius
The radius of the cylinder to project the UV's onto.
virtual String GetName() const
Gets the name of this modifier.
A modifier that will generate UV coordinates as they would need to be on a cylinder model...
std::string String
A datatype used to a series of characters.