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

standard vertex used by the Irrlicht engine. More...

#include <S3DVertex.h>

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

Public Member Functions

 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 ()
 Get type of the class. More...
 

Public Attributes

core::vector3df Pos
 Position. More...
 
core::vector3df Normal
 Normal vector. More...
 
SColor Color
 Color. More...
 
core::vector2d< f32TCoords
 Texture coordinates. More...
 

Detailed Description

standard vertex used by the Irrlicht engine.

Definition at line 44 of file S3DVertex.h.

Constructor & Destructor Documentation

◆ S3DVertex() [1/3]

irr::video::S3DVertex::S3DVertex ( )
inline

default constructor

Definition at line 47 of file S3DVertex.h.

47 {}

◆ S3DVertex() [2/3]

irr::video::S3DVertex::S3DVertex ( f32  x,
f32  y,
f32  z,
f32  nx,
f32  ny,
f32  nz,
SColor  c,
f32  tu,
f32  tv 
)
inline

constructor

Definition at line 50 of file S3DVertex.h.

51  : Pos(x,y,z), Normal(nx,ny,nz), Color(c), TCoords(tu,tv) {}
core::vector3df Pos
Position.
Definition: S3DVertex.h:59
GLfixed ny
GLbyte nx
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
SColor Color
Color.
Definition: S3DVertex.h:65
GLfixed GLfixed nz
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
core::vector2d< f32 > TCoords
Texture coordinates.
Definition: S3DVertex.h:68
core::vector3df Normal
Normal vector.
Definition: S3DVertex.h:62
const GLubyte * c
GLdouble GLdouble z

◆ S3DVertex() [3/3]

irr::video::S3DVertex::S3DVertex ( const core::vector3df pos,
const core::vector3df normal,
SColor  color,
const core::vector2d< f32 > &  tcoords 
)
inline

constructor

Definition at line 54 of file S3DVertex.h.

56  : Pos(pos), Normal(normal), Color(color), TCoords(tcoords) {}
core::vector3df Pos
Position.
Definition: S3DVertex.h:59
SColor Color
Color.
Definition: S3DVertex.h:65
GLuint color
core::vector2d< f32 > TCoords
Texture coordinates.
Definition: S3DVertex.h:68
core::vector3df Normal
Normal vector.
Definition: S3DVertex.h:62

Member Function Documentation

◆ getInterpolated()

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

Definition at line 97 of file S3DVertex.h.

98  {
99  d = core::clamp(d, 0.0f, 1.0f);
100  return S3DVertex(Pos.getInterpolated(other.Pos, d),
101  Normal.getInterpolated(other.Normal, d),
102  Color.getInterpolated(other.Color, d),
103  TCoords.getInterpolated(other.TCoords, d));
104  }
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
S3DVertex()
default constructor
Definition: S3DVertex.h:47
GLfloat f
SColor Color
Color.
Definition: S3DVertex.h:65
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::S3DVertex::getType ( )
inlinestatic

Get type of the class.

Definition at line 91 of file S3DVertex.h.

92  {
93  return EVT_STANDARD;
94  }
Standard vertex type used by the Irrlicht engine, video::S3DVertex.
Definition: S3DVertex.h:21

◆ operator!=()

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

Definition at line 76 of file S3DVertex.h.

77  {
78  return ((Pos != other.Pos) || (Normal != other.Normal) ||
79  (Color != other.Color) || (TCoords != other.TCoords));
80  }
core::vector3df Pos
Position.
Definition: S3DVertex.h:59
SColor Color
Color.
Definition: S3DVertex.h:65
core::vector2d< f32 > TCoords
Texture coordinates.
Definition: S3DVertex.h:68
core::vector3df Normal
Normal vector.
Definition: S3DVertex.h:62

◆ operator<()

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

Definition at line 82 of file S3DVertex.h.

83  {
84  return ((Pos < other.Pos) ||
85  ((Pos == other.Pos) && (Normal < other.Normal)) ||
86  ((Pos == other.Pos) && (Normal == other.Normal) && (Color < other.Color)) ||
87  ((Pos == other.Pos) && (Normal == other.Normal) && (Color == other.Color) && (TCoords < other.TCoords)));
88  }
core::vector3df Pos
Position.
Definition: S3DVertex.h:59
SColor Color
Color.
Definition: S3DVertex.h:65
core::vector2d< f32 > TCoords
Texture coordinates.
Definition: S3DVertex.h:68
core::vector3df Normal
Normal vector.
Definition: S3DVertex.h:62

◆ operator==()

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

Definition at line 70 of file S3DVertex.h.

71  {
72  return ((Pos == other.Pos) && (Normal == other.Normal) &&
73  (Color == other.Color) && (TCoords == other.TCoords));
74  }
core::vector3df Pos
Position.
Definition: S3DVertex.h:59
SColor Color
Color.
Definition: S3DVertex.h:65
core::vector2d< f32 > TCoords
Texture coordinates.
Definition: S3DVertex.h:68
core::vector3df Normal
Normal vector.
Definition: S3DVertex.h:62

Member Data Documentation

◆ Color

SColor irr::video::S3DVertex::Color

Color.

Definition at line 65 of file S3DVertex.h.

◆ Normal

core::vector3df irr::video::S3DVertex::Normal

Normal vector.

Definition at line 62 of file S3DVertex.h.

◆ Pos

core::vector3df irr::video::S3DVertex::Pos

Position.

Definition at line 59 of file S3DVertex.h.

◆ TCoords

core::vector2d<f32> irr::video::S3DVertex::TCoords

Texture coordinates.

Definition at line 68 of file S3DVertex.h.


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