67 #ifndef _graphicsproceduralsphereuvmodifier_cpp
68 #define _graphicsproceduralsphereuvmodifier_cpp
70 #include "Graphics/Procedural/Mesh/sphereuvmodifier.h"
72 #include "MathTools/mathtools.h"
94 Vector2 VecXZ(NormalizedPos.
X,NormalizedPos.
Z);
96 VertIt->UV.Y = ( MathTools::ATan(NormalizedPos.
Y / VecXZ.
Length()) + MathTools::GetHalfPi() ) / MathTools::GetPi();
101 {
return "SphereUVModifier"; }
virtual String GetName() const
Gets the name of this modifier.
SphereUVModifier()
Blank constructor.
Vector3 GetNormal() const
This returns the normal for this relative to the origin.
VertexContainer::iterator VertexIterator
Iterator type for Vertex instances in a VertexContainer.
Real X
Coordinate on the X vector.
Real Z
Coordinate on the Z vector.
A convenience buffer that stores vertices and indices of a mesh to be generated.
Real AngleTo(const Vector2 &Other) const
Gets an oriented angle between this Vector2 and another Vector2.
VertexContainer & GetVertices()
Gets a modifiable reference to Vertices.
This is used to represent a point on a 2 dimentional area, such as a screen.
Real Y
Coordinate on the Y vector.
static Vector2 Unit_X()
Gets a vector representing the X unit of a Vector2.
Real Length() const
Gets the length of this vector.
virtual ~SphereUVModifier()
Class destructor.
This is used to represent a point in space, or a vector through space.
The bulk of the engine components go in this namspace.
virtual void Modify(TriangleBuffer &Buffer)
Alters the generated pixels in a TriangleBuffer.
std::string String
A datatype used to a series of characters.