5 #ifndef __S_3D_VERTEX_H_INCLUDED__ 6 #define __S_3D_VERTEX_H_INCLUDED__ 84 return ((
Pos < other.
Pos) ||
119 :
S3DVertex(
x,
y,
z, 0.0
f, 0.0
f, 0.0
f,
c, tu,tv),
TCoords2(tu2,tv2) {}
132 S3DVertex2TCoords(
f32 x,
f32 y,
f32 z,
f32 nx,
f32 ny,
f32 nz,
SColor c,
f32 tu,
f32 tv,
f32 tu2,
f32 tv2)
133 :
S3DVertex(
x,
y,
z,
nx,
ny,
nz,
c, tu,tv),
TCoords2(tu2,tv2) {}
137 :
S3DVertex(
x,
y,
z,
nx,
ny,
nz,
c, tu,tv),
TCoords2(tu,tv) {}
153 return ((static_cast<S3DVertex>(*
this)==other) &&
160 return ((static_cast<S3DVertex>(*
this)!=other) ||
166 return ((static_cast<S3DVertex>(*
this) < other) ||
202 :
S3DVertex(
x,
y,
z,
nx,
ny,
nz,
c, tu,tv),
Tangent(tanx,tany,tanz),
Binormal(bx,
by,
bz) { }
225 return ((static_cast<S3DVertex>(*
this)==other) &&
232 return ((static_cast<S3DVertex>(*
this)!=other) ||
239 return ((static_cast<S3DVertex>(*
this) < other) ||
240 ((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
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)
S3DVertex2TCoords(S3DVertex &o)
constructor from S3DVertex
static E_VERTEX_TYPE getType()
S3DVertex2TCoords()
default constructor
bool operator<(const S3DVertex &other) const
Everything in the Irrlicht Engine can be found in this namespace.
static E_VERTEX_TYPE getType()
Get type of the class.
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.
static E_VERTEX_TYPE getType()
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.
GLint GLint GLint GLint GLint GLint y
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
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
GLint GLint GLint GLint GLint x
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)