67 #ifndef _graphicsproceduralhemisphereuvmodifier_cpp
68 #define _graphicsproceduralhemisphereuvmodifier_cpp
70 #include "Graphics/Procedural/Mesh/hemisphereuvmodifier.h"
72 #include "MathTools/mathtools.h"
96 if( NormalizedPos.
Y > 0.0 ) {
102 Vector2 Vec2D(NormalizedPos.
X,NormalizedPos.
Z);
104 Vector2 UV =
Vector2(0.5,0.5) + ( Vec2D * ( ( Angle / MathTools::GetHalfPi() ) *
Real(0.5) ) );
106 if( NormalizedPos.
Y > 0.0 ) {
117 {
return "HemisphereUVModifier"; }
virtual ~HemisphereUVModifier()
Class destructor.
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.
HemisphereUVModifier & SetInnerHemisphereQuad(const RealRect &Inner)
Sets the texture bounds for the inside of the hemisphere.
A convenience buffer that stores vertices and indices of a mesh to be generated.
RealRect OuterHemisphereQuad
The bounds of the texture atlas that is to be applied to the top part of the hemisphere.
void ConvertToAngleAxis(Real &Angle, Vector3 &Axis) const
Converts the rotation expressed by this Quaternion into it's individual rotation and axis components...
Quaternion GetRotationToAxis(const Vector3 &Axis, const Vector3 &FallBackAxis=Vector3()) const
Gets the rotation needed to rotate this vector as an axis to another axis.
VertexContainer & GetVertices()
Gets a modifiable reference to Vertices.
float Real
A Datatype used to represent a real floating point number.
virtual void Modify(TriangleBuffer &Buffer)
Alters the generated pixels in a TriangleBuffer.
Real Y
Coordinate on the Y vector.
Real X
Coordinate on the X vector.
This is used to represent a point on a 2 dimentional area, such as a screen.
static Vector3 Unit_Y()
Gets a vector representing the Y unit of a Vector3.
HemisphereUVModifier & SetOuterHemisphereQuad(const RealRect &Outer)
Sets the texture bounds for the outside of the hemisphere.
Real Y
Coordinate on the Y vector.
void SetValues(const Real &x, const Real &y)
Sets the X and Y values of this vector2.
NumType Left
The Left edge of the rect.
HemisphereUVModifier()
Blank constructor.
RealRect InnerHemisphereQuad
The bounds of the texture atlas that is to be applied to the under part of the hemisphere.
A modifier that will generate UV coordinates as they would need to be on a hemisphere model...
This is used to represent a point in space, or a vector through space.
The bulk of the engine components go in this namspace.
NumType Top
The Top edge of the rect.
Vector2 & Normalize()
Normalizes this Vector2.
virtual String GetName() const
Gets the name of this modifier.
std::string String
A datatype used to a series of characters.
NumType GetHeight() const
Gets the height of this Rect.
static Vector3 Neg_Unit_Y()
Gets a vector representing the negative Y unit of a Vector3.