5#ifndef __S_3D_VERTEX_H_INCLUDED__
6#define __S_3D_VERTEX_H_INCLUDED__
34 EVT_2TCOORDS_TANGENTS,
35 EVT_SKIN_2TCOORDS_TANGENTS,
49 "skin2tcoordtangents",
80 bool operator==(
const S3DVertex& other)
const
86 bool operator!=(
const S3DVertex& other)
const
92 bool operator<(
const S3DVertex& other)
const
94 return ((
Pos < other.Pos) ||
95 ((
Pos == other.Pos) && (
Normal < other.Normal)) ||
96 ((
Pos == other.Pos) && (
Normal == other.Normal) && (
Color < other.Color)) ||
97 ((
Pos == other.Pos) && (
Normal == other.Normal) && (
Color == other.Color) && (
TCoords < other.TCoords)));
109 Normal.getInterpolated(other.Normal, d),
110 Color.getInterpolated(other.Color, d),
111 TCoords.getInterpolated(other.TCoords, d));
126 S3DVertex2TCoords(
f32 x,
f32 y,
f32 z,
SColor c,
f32 tu,
f32 tv,
f32 tu2,
f32 tv2,
f32 lx,
f32 ly,
f32 lz)
127 :
S3DVertex(x,y,z, 0.0f, 0.0f, 0.0f, c, tu,tv),
TCoords2(tu2,tv2),
Lightmap(lx, ly, lz) {}
130 :
S3DVertex(x, y, z, 0.0f, 0.0f, 0.0f, c, tu, tv),
TCoords2(tu2, tv2),
Lightmap(tu2, tu2, 0.0f) {}
147 S3DVertex2TCoords(
f32 x,
f32 y,
f32 z,
f32 nx,
f32 ny,
f32 nz,
SColor c,
f32 tu,
f32 tv,
f32 tu2,
f32 tv2,
f32 lx,
f32 ly,
f32 lz)
148 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv),
TCoords2(tu2,tv2),
Lightmap(lx, ly, lz) {}
150 S3DVertex2TCoords(
f32 x,
f32 y,
f32 z,
f32 nx,
f32 ny,
f32 nz,
SColor c,
f32 tu,
f32 tv,
f32 tu2,
f32 tv2)
151 :
S3DVertex(x, y, z, nx, ny, nz, c, tu, tv),
TCoords2(tu2, tv2),
Lightmap(tu2, tv2, 0.0f) {}
155 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv),
TCoords2(tu,tv),
Lightmap(tu, tv, 0.0f) {}
174 return ((
static_cast<S3DVertex>(*
this)==other) &&
182 return ((
static_cast<S3DVertex>(*
this)!=other) ||
189 return ((
static_cast<S3DVertex>(*
this) < other) ||
224 f32 tanx=0.0f,
f32 tany=0.0f,
f32 tanz=0.0f,
226 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv),
Tangent(tanx,tany,tanz),
Binormal(bx,by,bz)
263 return ((
static_cast<S3DVertex>(*
this)==other) &&
270 return ((
static_cast<S3DVertex>(*
this)!=other) ||
277 return ((
static_cast<S3DVertex>(*
this) < other) ||
291 Normal.getInterpolated(other.Normal, d),
292 Color.getInterpolated(other.Color, d),
293 TCoords.getInterpolated(other.TCoords, d),
294 Tangent.getInterpolated(other.Tangent, d),
295 Binormal.getInterpolated(other.Binormal, d));
322 SVec4(
float x,
float y)
329 SVec4(
float x,
float y,
float z)
336 SVec4(
float x,
float y,
float z,
float w)
344 bool operator==(
const SVec4& other)
const
346 return X == other.X && Y == other.Y && Z == other.Z && W == other.W;
377 return EVT_SKIN_TANGENTS;
405 return EVT_2TCOORDS_TANGENTS;
409struct S3DVertexSkin2TCoordsTangents :
public S3DVertex2TCoordsTangents
411 S3DVertexSkin2TCoordsTangents() : S3DVertex2TCoordsTangents()
421 return EVT_SKIN_2TCOORDS_TANGENTS;
435 case video::EVT_SKIN_TANGENTS:
437 case video::EVT_SKIN_2TCOORDS_TANGENTS:
439 case video::EVT_2TCOORDS_TANGENTS:
2d vector template class with lots of operators and methods.
Definition vector2d.h:22
vector2d< T > getInterpolated(const vector2d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
Definition vector2d.h:278
vector3d< T > getInterpolated(const vector3d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
Definition vector3d.h:247
Class representing a 32 bit ARGB color.
Definition SColor.h:285
SColor getInterpolated(const SColor &other, f32 d) const
Interpolates the color with a f32 value to another color.
Definition SColor.h:423
Basic classes such as vectors, planes, arrays, lists, and so on can be found in this namespace.
Definition aabbox3d.h:15
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition vector3d.h:445
vector2d< f32 > vector2df
Typedef for f32 2d vector.
Definition vector2d.h:323
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
Definition irrMath.h:166
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done ...
Definition EDriverFeatures.h:11
E_VERTEX_TYPE
Enumeration for all vertex types there are.
Definition S3DVertex.h:19
@ EVT_SKIN
Skylicht support hardware skinning.
Definition S3DVertex.h:32
@ EVT_UNKNOWN
Null.
Definition S3DVertex.h:37
@ EVT_2TCOORDS
Vertex with two texture coordinates, video::S3DVertex2TCoords.
Definition S3DVertex.h:25
@ EVT_TANGENTS
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition S3DVertex.h:29
@ EVT_STANDARD
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
Definition S3DVertex.h:21
const char *const sBuiltInVertexTypeNames[]
Array holding the built in vertex type names.
Definition S3DVertex.h:41
Everything in the Irrlicht Engine can be found in this namespace.
Definition Skylicht.h:33
float f32
32 bit floating point variable.
Definition irrTypes.h:104
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.h:58
Vertex with two texture coordinates.
Definition S3DVertex.h:121
bool operator!=(const S3DVertex2TCoords &other) const
Inequality operator.
Definition S3DVertex.h:180
S3DVertex2TCoords()
default constructor
Definition S3DVertex.h:123
core::vector2d< f32 > TCoords2
Second set of texture coordinates.
Definition S3DVertex.h:166
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
Definition S3DVertex.h:154
core::vector3df Lightmap
Lightmap uv.
Definition S3DVertex.h:169
S3DVertex2TCoords(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2, f32 lx, f32 ly, f32 lz)
constructor with all values
Definition S3DVertex.h:147
bool operator==(const S3DVertex2TCoords &other) const
Equality operator.
Definition S3DVertex.h:172
S3DVertex2TCoords(f32 x, f32 y, f32 z, SColor c, f32 tu, f32 tv, f32 tu2, f32 tv2, f32 lx, f32 ly, f32 lz)
constructor with two different texture coords, but no normal
Definition S3DVertex.h:126
S3DVertex2TCoords(const core::vector3df &pos, SColor color, const core::vector2d< f32 > &tcoords, const core::vector2d< f32 > &tcoords2, const core::vector3df &lm)
constructor with two different texture coords, but no normal
Definition S3DVertex.h:133
S3DVertex2TCoords(S3DVertex &o)
constructor from S3DVertex
Definition S3DVertex.h:163
S3DVertex2TCoords(const core::vector3df &pos, const core::vector3df &normal, const SColor &color, const core::vector2d< f32 > &tcoords, const core::vector2d< f32 > &tcoords2, const core::vector3df &lm)
constructor with all values
Definition S3DVertex.h:142
S3DVertex2TCoords(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)
constructor with the same texture coords and normal
Definition S3DVertex.h:158
Definition S3DVertex.h:382
core::vector2df VertexData
Definition S3DVertex.h:401
core::vector3df Binormal
Binormal vector (tangent x normal).
Definition S3DVertex.h:396
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition S3DVertex.h:393
standard vertex used by the Irrlicht engine.
Definition S3DVertex.h:55
core::vector2d< f32 > TCoords
Texture coordinates.
Definition S3DVertex.h:78
S3DVertex()
default constructor
Definition S3DVertex.h:57
S3DVertex(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)
constructor
Definition S3DVertex.h:64
core::vector3df Normal
Normal vector.
Definition S3DVertex.h:72
SColor Color
Color.
Definition S3DVertex.h:75
S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
constructor
Definition S3DVertex.h:60
core::vector3df Pos
Position.
Definition S3DVertex.h:69
Definition S3DVertex.h:410
Definition S3DVertex.h:351
Definition S3DVertex.h:366
Vertex with a tangent and binormal vector.
Definition S3DVertex.h:214
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
Definition S3DVertex.h:240
core::vector3df Binormal
Binormal vector (tangent x normal).
Definition S3DVertex.h:254
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition S3DVertex.h:251
S3DVertexTangents(const core::vector3df &pos, SColor c, const core::vector2df &tcoords)
constructor
Definition S3DVertex.h:232
S3DVertexTangents()
default constructor
Definition S3DVertex.h:216
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
Definition S3DVertex.h:222
core::vector2df VertexData
Definition S3DVertex.h:259
Definition S3DVertex.h:301