arsa  2.7
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
irr::video::S3DVertexTangents Struct Reference

Vertex with a tangent and binormal vector. More...

#include <S3DVertex.h>

Inheritance diagram for irr::video::S3DVertexTangents:
irr::video::S3DVertex

Public Member Functions

 S3DVertexTangents ()
 default constructor More...
 
 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 More...
 
 S3DVertexTangents (const core::vector3df &pos, SColor c, const core::vector2df &tcoords)
 constructor More...
 
 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 More...
 
bool operator== (const S3DVertexTangents &other) const
 
bool operator!= (const S3DVertexTangents &other) const
 
bool operator< (const S3DVertexTangents &other) const
 
S3DVertexTangents getInterpolated (const S3DVertexTangents &other, f32 d)
 
- Public Member Functions inherited from irr::video::S3DVertex
 S3DVertex ()
 default constructor More...
 
 S3DVertex (f32 x, f32 y, f32 z, f32 nx, f32 ny, f32 nz, SColor c, f32 tu, f32 tv)
 constructor More...
 
 S3DVertex (const core::vector3df &pos, const core::vector3df &normal, SColor color, const core::vector2d< f32 > &tcoords)
 constructor More...
 
bool operator== (const S3DVertex &other) const
 
bool operator!= (const S3DVertex &other) const
 
bool operator< (const S3DVertex &other) const
 
S3DVertex getInterpolated (const S3DVertex &other, f32 d)
 

Static Public Member Functions

static E_VERTEX_TYPE getType ()
 
- Static Public Member Functions inherited from irr::video::S3DVertex
static E_VERTEX_TYPE getType ()
 Get type of the class. More...
 

Public Attributes

core::vector3df Tangent
 Tangent vector along the x-axis of the texture. More...
 
core::vector3df Binormal
 Binormal vector (tangent x normal) More...
 
- Public Attributes inherited from irr::video::S3DVertex
core::vector3df Pos
 Position. More...
 
core::vector3df Normal
 Normal vector. More...
 
SColor Color
 Color. More...
 
core::vector2d< f32TCoords
 Texture coordinates. More...
 

Detailed Description

Vertex with a tangent and binormal vector.

Usually used for tangent space normal mapping. Usually tangent and binormal get send to shaders as texture coordinate sets 1 and 2.

Definition at line 192 of file S3DVertex.h.

Constructor & Destructor Documentation

◆ S3DVertexTangents() [1/4]

irr::video::S3DVertexTangents::S3DVertexTangents ( )
inline

default constructor

Definition at line 195 of file S3DVertex.h.

195 : S3DVertex() { }
S3DVertex()
default constructor
Definition: S3DVertex.h:47

◆ S3DVertexTangents() [2/4]

irr::video::S3DVertexTangents::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 
)
inline

constructor

Definition at line 198 of file S3DVertex.h.

202  : S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), Tangent(tanx,tany,tanz), Binormal(bx,by,bz) { }
core::vector3df Binormal
Binormal vector (tangent x normal)
Definition: S3DVertex.h:221
GLbyte GLbyte bz
GLfixed ny
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition: S3DVertex.h:218
S3DVertex()
default constructor
Definition: S3DVertex.h:47
GLbyte nx
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
GLfixed GLfixed nz
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
const GLubyte * c
GLdouble GLdouble z
GLbyte by

◆ S3DVertexTangents() [3/4]

irr::video::S3DVertexTangents::S3DVertexTangents ( const core::vector3df pos,
SColor  c,
const core::vector2df tcoords 
)
inline

constructor

Definition at line 205 of file S3DVertex.h.

207  : S3DVertex(pos, core::vector3df(), c, tcoords) { }
vector3d< f32 > vector3df
Typedef for a f32 3d vector.
Definition: vector3d.h:461
S3DVertex()
default constructor
Definition: S3DVertex.h:47
const GLubyte * c

◆ S3DVertexTangents() [4/4]

irr::video::S3DVertexTangents::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() 
)
inline

constructor

Definition at line 210 of file S3DVertex.h.

215  : S3DVertex(pos, normal, c, tcoords), Tangent(tangent), Binormal(binormal) { }
core::vector3df Binormal
Binormal vector (tangent x normal)
Definition: S3DVertex.h:221
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition: S3DVertex.h:218
S3DVertex()
default constructor
Definition: S3DVertex.h:47
const GLubyte * c

Member Function Documentation

◆ getInterpolated()

S3DVertexTangents irr::video::S3DVertexTangents::getInterpolated ( const S3DVertexTangents other,
f32  d 
)
inline

Definition at line 249 of file S3DVertex.h.

250  {
251  d = core::clamp(d, 0.0f, 1.0f);
252  return S3DVertexTangents(Pos.getInterpolated(other.Pos, d),
253  Normal.getInterpolated(other.Normal, d),
254  Color.getInterpolated(other.Color, d),
255  TCoords.getInterpolated(other.TCoords, d),
256  Tangent.getInterpolated(other.Tangent, d),
257  Binormal.getInterpolated(other.Binormal, d));
258  }
core::vector3df Binormal
Binormal vector (tangent x normal)
Definition: S3DVertex.h:221
SColor getInterpolated(const SColor &other, f32 d) const
Interpolates the color with a f32 value to another color.
Definition: SColor.h:455
vector3d< T > getInterpolated(const vector3d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
Definition: vector3d.h:261
core::vector3df Pos
Position.
Definition: S3DVertex.h:59
vector2d< T > getInterpolated(const vector2d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
Definition: vector2d.h:316
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition: S3DVertex.h:218
GLfloat f
SColor Color
Color.
Definition: S3DVertex.h:65
S3DVertexTangents()
default constructor
Definition: S3DVertex.h:195
core::vector2d< f32 > TCoords
Texture coordinates.
Definition: S3DVertex.h:68
core::vector3df Normal
Normal vector.
Definition: S3DVertex.h:62
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
Definition: irrMath.h:167

◆ getType()

static E_VERTEX_TYPE irr::video::S3DVertexTangents::getType ( )
inlinestatic

Definition at line 244 of file S3DVertex.h.

245  {
246  return EVT_TANGENTS;
247  }
Vertex with a tangent and binormal vector, video::S3DVertexTangents.
Definition: S3DVertex.h:31

◆ operator!=()

bool irr::video::S3DVertexTangents::operator!= ( const S3DVertexTangents other) const
inline

Definition at line 230 of file S3DVertex.h.

231  {
232  return ((static_cast<S3DVertex>(*this)!=other) ||
233  (Tangent != other.Tangent) ||
234  (Binormal != other.Binormal));
235  }
core::vector3df Binormal
Binormal vector (tangent x normal)
Definition: S3DVertex.h:221
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition: S3DVertex.h:218

◆ operator<()

bool irr::video::S3DVertexTangents::operator< ( const S3DVertexTangents other) const
inline

Definition at line 237 of file S3DVertex.h.

238  {
239  return ((static_cast<S3DVertex>(*this) < other) ||
240  ((static_cast<S3DVertex>(*this) == other) && (Tangent < other.Tangent)) ||
241  ((static_cast<S3DVertex>(*this) == other) && (Tangent == other.Tangent) && (Binormal < other.Binormal)));
242  }
core::vector3df Binormal
Binormal vector (tangent x normal)
Definition: S3DVertex.h:221
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition: S3DVertex.h:218

◆ operator==()

bool irr::video::S3DVertexTangents::operator== ( const S3DVertexTangents other) const
inline

Definition at line 223 of file S3DVertex.h.

224  {
225  return ((static_cast<S3DVertex>(*this)==other) &&
226  (Tangent == other.Tangent) &&
227  (Binormal == other.Binormal));
228  }
core::vector3df Binormal
Binormal vector (tangent x normal)
Definition: S3DVertex.h:221
core::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition: S3DVertex.h:218

Member Data Documentation

◆ Binormal

core::vector3df irr::video::S3DVertexTangents::Binormal

Binormal vector (tangent x normal)

Definition at line 221 of file S3DVertex.h.

◆ Tangent

core::vector3df irr::video::S3DVertexTangents::Tangent

Tangent vector along the x-axis of the texture.

Definition at line 218 of file S3DVertex.h.


The documentation for this struct was generated from the following file: