5#ifndef S_3D_VERTEX_HPP_INCLUDED 
    6#define S_3D_VERTEX_HPP_INCLUDED 
    8#include <duckcpp/core/engine/vector3d.hpp> 
    9#include <duckcpp/core/engine/vector2d.hpp> 
   10#include <duckcpp/core/engine/SColor.hpp> 
   73    bool operator==(
const S3DVertex& other)
 const 
   79    bool operator!=(
const S3DVertex& other)
 const 
   85    bool operator<(
const S3DVertex& other)
 const 
   87        return ((
Pos < other.Pos) ||
 
   88                ((
Pos == other.Pos) && (
Normal < other.Normal)) ||
 
   89                ((
Pos == other.Pos) && (
Normal == other.Normal) && (
Color < other.Color)) ||
 
   90                ((
Pos == other.Pos) && (
Normal == other.Normal) && (
Color == other.Color) && (
TCoords < other.TCoords)));
 
 
  123        : 
S3DVertex(x,y,z, 0.0f, 0.0f, 0.0f, c, tu,tv), 
TCoords2(tu2,tv2) {}
 
 
  136    S3DVertex2TCoords(
dcpp::float32_kt x, 
dcpp::float32_kt y, 
dcpp::float32_kt z, 
dcpp::float32_kt nx, 
dcpp::float32_kt ny, 
dcpp::float32_kt nz, 
SColor c, 
dcpp::float32_kt tu, 
dcpp::float32_kt tv, 
dcpp::float32_kt tu2, 
dcpp::float32_kt tv2)
 
  137        : 
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), 
TCoords2(tu2,tv2) {}
 
 
  141        : 
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), 
TCoords2(tu,tv) {}
 
 
  172        return ((
static_cast<S3DVertex>(*
this) < other) ||
 
 
  209        : 
S3DVertex(x,y,z, nx,ny,nz, c, tu,tv), 
Tangent(tanx,tany,tanz), 
Binormal(bx,by,bz) { }
 
 
  251        return ((
static_cast<S3DVertex>(*
this) < other) ||
 
 
2d vector template class with lots of operators and methods.
Definition vector2d.hpp:22
 
vector2d< T > getInterpolated(const vector2d< T > &other, dcpp::float64_kt d) const
Creates an interpolated vector between this vector and another vector.
Definition vector2d.hpp:312
 
3d vector template class with lots of operators and methods.
Definition vector3d.hpp:32
 
vector3d< T > getInterpolated(const vector3d< T > &other, dcpp::float64_kt d) const
Creates an interpolated vector between this vector and another vector.
Definition vector3d.hpp:296
 
Vertex with two texture coordinates.
Definition S3DVertex.hpp:116
 
S3DVertex2TCoords(const S3DVertex &o)
constructor from S3DVertex
Definition S3DVertex.hpp:149
 
S3DVertex2TCoords(dcpp::float32_kt x, dcpp::float32_kt y, dcpp::float32_kt z, dcpp::float32_kt nx, dcpp::float32_kt ny, dcpp::float32_kt nz, SColor c, dcpp::float32_kt tu, dcpp::float32_kt tv)
constructor with the same texture coords and normal
Definition S3DVertex.hpp:140
 
S3DVertex2TCoords(dcpp::float32_kt x, dcpp::float32_kt y, dcpp::float32_kt z, SColor c, dcpp::float32_kt tu, dcpp::float32_kt tv, dcpp::float32_kt tu2, dcpp::float32_kt tv2)
constructor with two different texture coords, but no normal
Definition S3DVertex.hpp:122
 
S3DVertex2TCoords()
default constructor
Definition S3DVertex.hpp:119
 
S3DVertex2TCoords(const dcpp::nub::vector3df &pos, const dcpp::nub::vector3df &normal, const SColor &color, const dcpp::nub::vector2df &tcoords, const dcpp::nub::vector2df &tcoords2)
constructor with all values
Definition S3DVertex.hpp:131
 
S3DVertex2TCoords(const dcpp::nub::vector3df &pos, const dcpp::nub::vector3df &normal, SColor color, const dcpp::nub::vector2df &tcoords)
constructor with the same texture coords and normal
Definition S3DVertex.hpp:144
 
dcpp::nub::vector2df TCoords2
Second set of texture coordinates.
Definition S3DVertex.hpp:153
 
S3DVertex2TCoords(const dcpp::nub::vector3df &pos, SColor color, const dcpp::nub::vector2df &tcoords, const dcpp::nub::vector2df &tcoords2)
constructor with two different texture coords, but no normal
Definition S3DVertex.hpp:126
 
bool operator==(const S3DVertex2TCoords &other) const
Equality operator.
Definition S3DVertex.hpp:157
 
bool operator!=(const S3DVertex2TCoords &other) const
Inequality operator.
Definition S3DVertex.hpp:164
 
S3DVertex2TCoords(dcpp::float32_kt x, dcpp::float32_kt y, dcpp::float32_kt z, dcpp::float32_kt nx, dcpp::float32_kt ny, dcpp::float32_kt nz, SColor c, dcpp::float32_kt tu, dcpp::float32_kt tv, dcpp::float32_kt tu2, dcpp::float32_kt tv2)
constructor with all values
Definition S3DVertex.hpp:136
 
Vertex with a tangent and binormal vector.
Definition S3DVertex.hpp:199
 
S3DVertexTangents(const dcpp::nub::vector3df &pos, SColor c, const dcpp::nub::vector2df &tcoords)
constructor
Definition S3DVertex.hpp:212
 
S3DVertexTangents(const dcpp::nub::vector3df &pos, const dcpp::nub::vector3df &normal, SColor c, const dcpp::nub::vector2df &tcoords, const dcpp::nub::vector3df &tangent=dcpp::nub::vector3df(), const dcpp::nub::vector3df &binormal=dcpp::nub::vector3df())
constructor
Definition S3DVertex.hpp:217
 
S3DVertexTangents()
default constructor
Definition S3DVertex.hpp:202
 
dcpp::nub::vector3df Binormal
Binormal vector (tangent x normal)
Definition S3DVertex.hpp:232
 
S3DVertexTangents(const S3DVertex &o)
constructor from S3DVertex
Definition S3DVertex.hpp:225
 
S3DVertexTangents(dcpp::float32_kt x, dcpp::float32_kt y, dcpp::float32_kt z, dcpp::float32_kt nx=0.0f, dcpp::float32_kt ny=0.0f, dcpp::float32_kt nz=0.0f, SColor c=0xFFFFFFFF, dcpp::float32_kt tu=0.0f, dcpp::float32_kt tv=0.0f, dcpp::float32_kt tanx=0.0f, dcpp::float32_kt tany=0.0f, dcpp::float32_kt tanz=0.0f, dcpp::float32_kt bx=0.0f, dcpp::float32_kt by=0.0f, dcpp::float32_kt bz=0.0f)
constructor
Definition S3DVertex.hpp:205
 
dcpp::nub::vector3df Tangent
Tangent vector along the x-axis of the texture.
Definition S3DVertex.hpp:229
 
standard vertex used by the Duckcpp engine.
Definition S3DVertex.hpp:45
 
dcpp::nub::vector3df Normal
Normal vector.
Definition S3DVertex.hpp:64
 
dcpp::nub::vector2df TCoords
Texture coordinates.
Definition S3DVertex.hpp:70
 
S3DVertex(const dcpp::nub::vector3df &pos, const dcpp::nub::vector3df &normal, SColor color, const dcpp::nub::vector2df &tcoords)
constructor
Definition S3DVertex.hpp:55
 
dcpp::nub::vector3df Pos
Position.
Definition S3DVertex.hpp:61
 
S3DVertex(dcpp::float32_kt x, dcpp::float32_kt y, dcpp::float32_kt z, dcpp::float32_kt nx, dcpp::float32_kt ny, dcpp::float32_kt nz, SColor c, dcpp::float32_kt tu, dcpp::float32_kt tv)
constructor
Definition S3DVertex.hpp:51
 
static E_VERTEX_TYPE getType()
Get type of the class.
Definition S3DVertex.hpp:94
 
S3DVertex()
default constructor
Definition S3DVertex.hpp:48
 
SColor Color
Color.
Definition S3DVertex.hpp:67
 
Class representing a 32 bit ARGB color.
Definition SColor.hpp:317
 
SColor getInterpolated(const SColor &other, dcpp::float32_kt d) const
Interpolates the color with a dcpp::float32_kt value to another color.
Definition SColor.hpp:455
 
const T clamp(const T &value, const T &low, const T &high)
clamps a value between low and high
Definition irrMath.hpp:164
 
E_VERTEX_TYPE
Enumeration for all vertex types there are.
Definition S3DVertex.hpp:19
 
@ EVT_2TCOORDS
Vertex with two texture coordinates, dcpp::video::S3DVertex2TCoords.
Definition S3DVertex.hpp:25
 
@ EVT_TANGENTS
Vertex with a tangent and binormal vector, dcpp::video::S3DVertexTangents.
Definition S3DVertex.hpp:31
 
@ EVT_STANDARD
Standard vertex type used by the Duckcpp engine, dcpp::video::S3DVertex.
Definition S3DVertex.hpp:21
 
const char *const sBuiltInVertexTypeNames[]
Array holding the built in vertex type names.
Definition S3DVertex.hpp:35
 
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
 
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
 
float float32_kt
32 bit floating point variable.
Definition irrTypes.hpp:108