5 #ifndef __S_3D_VERTEX_H_INCLUDED__ 6 #define __S_3D_VERTEX_H_INCLUDED__ 70 return ((Pos == other.
Pos) && (Normal == other.
Normal) &&
76 return ((Pos != other.
Pos) || (Normal != other.
Normal) ||
82 return ((Pos < other.
Pos) ||
83 ((Pos == other.
Pos) && (Normal < other.
Normal)) ||
84 ((Pos == other.
Pos) && (Normal == other.
Normal) && (Color < other.
Color)) ||
85 ((Pos == other.
Pos) && (Normal == other.
Normal) && (Color == other.
Color) && (TCoords < other.
TCoords)));
115 :
S3DVertex(x,y,z, 0.0f, 0.0f, 0.0f, c, tu,tv), TCoords2(tu2,tv2) {}
125 :
S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords2) {}
128 S3DVertex2TCoords(
f32 x,
f32 y,
f32 z,
f32 nx,
f32 ny,
f32 nz,
SColor c,
f32 tu,
f32 tv,
f32 tu2,
f32 tv2)
129 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu2,tv2) {}
133 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), TCoords2(tu,tv) {}
138 :
S3DVertex(pos, normal, color, tcoords), TCoords2(tcoords) {}
149 return ((static_cast<S3DVertex>(*
this)==other) &&
156 return ((static_cast<S3DVertex>(*
this)!=other) ||
162 return ((static_cast<S3DVertex>(*
this) < other) ||
163 ((static_cast<S3DVertex>(*
this) == other) && (TCoords2 < other.
TCoords2)));
193 f32 tanx=0.0f,
f32 tany=0.0f,
f32 tanz=0.0f,
195 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), Tangent(tanx,tany,tanz), Binormal(bx,by,bz) { }
208 :
S3DVertex(pos, normal, c, tcoords), Tangent(tangent), Binormal(binormal) { }
218 return ((static_cast<S3DVertex>(*
this)==other) &&
225 return ((static_cast<S3DVertex>(*
this)!=other) ||
232 return ((static_cast<S3DVertex>(*
this) < other) ||
233 ((static_cast<S3DVertex>(*
this) == other) && (Tangent < other.
Tangent)) ||
234 ((static_cast<S3DVertex>(*
this) == other) && (Tangent == other.
Tangent) && (Binormal < other.
Binormal)));
S3DVertex2TCoords(const core::vector3df &pos, const core::vector3df &normal, const SColor &color, const core::vector2d< f32 > &tcoords, const core::vector2d< f32 > &tcoords2)
constructor with all values
bool operator==(const S3DVertex2TCoords &other) const
Equality operator.
bool operator!=(const S3DVertexTangents &other) const
core::vector2d< f32 > TCoords2
Second set of texture coordinates.
S3DVertexTangents getInterpolated(const S3DVertexTangents &other, f32 d)
core::vector3df Binormal
Binormal vector (tangent x normal)
SColor getInterpolated(const SColor &other, f32 d) const
Interpolates the color with a f32 value to another color.
bool operator==(const S3DVertex &other) const
float f32
32 bit floating point variable.
vector3d< T > getInterpolated(const vector3d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
core::vector3df Pos
Position.
S3DVertex getInterpolated(const S3DVertex &other, f32 d)
E_VERTEX_TYPE getType() const
S3DVertex2TCoords(S3DVertex &o)
constructor from S3DVertex
E_VERTEX_TYPE getType() const
S3DVertex2TCoords()
default constructor
bool operator<(const S3DVertex &other) const
Everything in the Irrlicht Engine can be found in this namespace.
Vertex with two texture coordinates, video::S3DVertex2TCoords.
bool operator!=(const S3DVertex2TCoords &other) const
Inequality operator.
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
vector2d< T > getInterpolated(const vector2d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
Vertex with two texture coordinates.
S3DVertex2TCoords(const core::vector3df &pos, SColor color, const core::vector2d< f32 > &tcoords, const core::vector2d< f32 > &tcoords2)
constructor with two different texture coords, but no normal
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
S3DVertex()
default constructor
unsigned int u32
32 bit unsigned variable.
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
constructor
S3DVertexTangents(const core::vector3df &pos, SColor c, const core::vector2df &tcoords)
constructor
S3DVertex(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)
constructor
S3DVertexTangents(const core::vector3df &pos, const core::vector3df &normal, SColor c, const core::vector2df &tcoords, const core::vector3df &tangent=core::vector3df(), const core::vector3df &binormal=core::vector3df())
constructor
standard vertex used by the Irrlicht engine.
S3DVertex2TCoords getInterpolated(const S3DVertex2TCoords &other, f32 d)
S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
constructor with the same texture coords and normal
S3DVertex2TCoords(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)
constructor with the same texture coords and normal
E_VERTEX_TYPE getType() const
Class representing a 32 bit ARGB color.
bool operator<(const S3DVertex2TCoords &other) const
S3DVertex2TCoords(f32 x, f32 y, f32 z, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2)
constructor with two different texture coords, but no normal
E_VERTEX_TYPE
Enumeration for all vertex types there are.
S3DVertexTangents()
default constructor
core::vector2d< f32 > TCoords
Texture coordinates.
const char *const sBuiltInVertexTypeNames[]
Array holding the built in vertex type names.
core::vector3df Normal
Normal vector.
Vertex with a tangent and binormal vector.
bool operator!=(const S3DVertex &other) const
bool operator<(const S3DVertexTangents &other) const
S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2)
constructor with all values
bool operator==(const S3DVertexTangents &other) const
S3DVertexTangents(f32 x, f32 y, f32 z, f32 nx=0.0f, f32 ny=0.0f, f32 nz=0.0f, SColor c=0xFFFFFFFF, f32 tu=0.0f, f32 tv=0.0f, f32 tanx=0.0f, f32 tany=0.0f, f32 tanz=0.0f, f32 bx=0.0f, f32 by=0.0f, f32 bz=0.0f)
constructor
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
u32 getVertexPitchFromType(E_VERTEX_TYPE vertexType)