5#ifndef __S_3D_VERTEX_H_INCLUDED__
6#define __S_3D_VERTEX_H_INCLUDED__
82 return ((
Pos < other.
Pos) ||
116 :
S3DVertex(x,y,z, 0.0f, 0.0f, 0.0f, c, tu,tv),
TCoords2(tu2,tv2) {}
129 S3DVertex2TCoords(
f32 x,
f32 y,
f32 z,
f32 nx,
f32 ny,
f32 nz,
SColor c,
f32 tu,
f32 tv,
f32 tu2,
f32 tv2)
130 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv),
TCoords2(tu2,tv2) {}
134 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv),
TCoords2(tu,tv) {}
150 return ((
static_cast<S3DVertex>(*
this)==other) &&
157 return ((
static_cast<S3DVertex>(*
this)!=other) ||
163 return ((
static_cast<S3DVertex>(*
this) < other) ||
195 f32 tanx=0.0f,
f32 tany=0.0f,
f32 tanz=0.0f,
197 :
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv),
Tangent(tanx,tany,tanz),
Binormal(bx,by,bz) { }
202 :
S3DVertex(pos, core::vector3df(), c, tcoords) { }
220 return ((
static_cast<S3DVertex>(*
this)==other) &&
227 return ((
static_cast<S3DVertex>(*
this)!=other) ||
234 return ((
static_cast<S3DVertex>(*
this) < other) ||
Axis aligned bounding box in 3d dimensional space.
vector2d< T > getInterpolated(const vector2d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
vector3d< T > getInterpolated(const vector3d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
Class representing a 32 bit ARGB color.
SColor getInterpolated(const SColor &other, f32 d) const
Interpolates the color with a f32 value to another color.
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
E_VERTEX_TYPE
Enumeration for all vertex types there are.
@ EVT_2TCOORDS
Vertex with two texture coordinates, video::S3DVertex2TCoords.
@ EVT_TANGENTS
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
@ EVT_STANDARD
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
const char *const sBuiltInVertexTypeNames[]
Array holding the built in vertex type names.
u32 getVertexPitchFromType(E_VERTEX_TYPE vertexType)
Everything in the Irrlicht Engine can be found in this namespace.
float f32
32 bit floating point variable.
unsigned int u32
32 bit unsigned variable.
Vertex with two texture coordinates.
S3DVertex2TCoords getInterpolated(const S3DVertex2TCoords &other, f32 d)
bool operator!=(const S3DVertex2TCoords &other) const
Inequality operator.
bool operator<(const S3DVertex2TCoords &other) const
S3DVertex2TCoords()
default constructor
core::vector2d< f32 > TCoords2
Second set of texture coordinates.
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(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 S3DVertex2TCoords &other) const
Equality operator.
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
S3DVertex2TCoords(S3DVertex &o)
constructor from S3DVertex
E_VERTEX_TYPE getType() const
S3DVertex2TCoords(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)
constructor with the same texture coords and normal
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
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
standard vertex used by the Irrlicht engine.
core::vector2d< f32 > TCoords
Texture coordinates.
bool operator!=(const S3DVertex &other) const
S3DVertex()
default constructor
S3DVertex(const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)
constructor
core::vector3df Normal
Normal vector.
S3DVertex(f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
constructor
E_VERTEX_TYPE getType() const
bool operator<(const S3DVertex &other) const
core::vector3df Pos
Position.
bool operator==(const S3DVertex &other) const
S3DVertex getInterpolated(const S3DVertex &other, f32 d)
Vertex with a tangent and binormal vector.
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
E_VERTEX_TYPE getType() const
core::vector3df Binormal
Binormal vector (tangent x normal)
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
S3DVertexTangents(const core::vector3df &pos, SColor c, const core::vector2df &tcoords)
constructor
S3DVertexTangents()
default constructor
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 S3DVertexTangents &other) const
S3DVertexTangents getInterpolated(const S3DVertexTangents &other, f32 d)
bool operator<(const S3DVertexTangents &other) const
bool operator==(const S3DVertexTangents &other) const