5 #ifndef __S_3D_VERTEX_H_INCLUDED__
6 #define __S_3D_VERTEX_H_INCLUDED__
82 return ((
Pos < other.
Pos) ||
115 :
S3DVertex(x,y,z, 0.0f, 0.0f, 0.0f, c, tu,tv),
TCoords2(tu2,tv2) {}
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) {}
149 return ((static_cast<S3DVertex>(*
this)==other) &&
156 return ((static_cast<S3DVertex>(*
this)!=other) ||
162 return ((static_cast<S3DVertex>(*
this) < other) ||
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) { }
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)) ||
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
core::vector2d< f32 > TCoords2
Second set of texture coordinates.
S3DVertexTangents getInterpolated(const S3DVertexTangents &other, f32 d)
core::vector3df Binormal
Binormal vector (tangent x normal)
float f32
32 bit floating point variable.
bool operator==(const S3DVertexTangents &other) const
core::vector3df Pos
Position.
S3DVertex getInterpolated(const S3DVertex &other, f32 d)
S3DVertex2TCoords(S3DVertex &o)
constructor from S3DVertex
bool operator<(const S3DVertexTangents &other) const
S3DVertex2TCoords()
default constructor
Vertex with two texture coordinates, video::S3DVertex2TCoords.
vector3d< T > getInterpolated(const vector3d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Vertex with two texture coordinates.
E_VERTEX_TYPE getType() const
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.
vector2d< T > getInterpolated(const vector2d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
constructor
SColor getInterpolated(const SColor &other, f32 d) const
Interpolates the color with a f32 value to another color.
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)
bool operator!=(const S3DVertex &other) const
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
bool operator!=(const S3DVertex2TCoords &other) const
Inequality operator.
Class representing a 32 bit ARGB color.
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
bool operator!=(const S3DVertexTangents &other) const
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.
E_VERTEX_TYPE getType() const
bool operator==(const S3DVertex2TCoords &other) const
Equality operator.
core::vector3df Normal
Normal vector.
Vertex with a tangent and binormal vector.
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 S3DVertex &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
bool operator==(const S3DVertex &other) const
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)