6 #ifndef VERTEX_H_6014714286 7 #define VERTEX_H_6014714286 9 #include <Carna/Carna.h> 62 template<
typename VectorType >
67 template<
typename VectorType >
103 float nx, ny,
nz, nw;
113 template<
typename VectorType >
114 void setNormal(
const VectorType& normal );
118 template<
typename VectorType >
163 template<
typename VectorType >
164 void setColor(
const VectorType& color );
168 template<
typename VectorType >
190 #define VERTEX_NULL_COMPONENT( name ) \ 191 template< typename VectorType > \ 192 void set ## name( const VectorType& ) \ 360 #endif // VERTEX_H_6014714286 static const VertexAttributes attributes
Holds the declaration of the vertex format.
float z
Holds the positional z-component of this vertex.
float nz
Holds the normal vector z-component of this vertex.
void setColor(const VectorType &color)
Defines vertex component for position vectors. Usage is explained here.
Defines vertex that consists of the two attributes position and color.
Defines vertex component for normal vectors. Usage is explained here.
void setPosition(const VectorType &position)
Defines Carna::base::VertexAttributes.
#define VERTEX_NULL_COMPONENT(name)
Adds null implementation for setter corresponding the the given vertex component. ...
float w
Holds the positional w-component of this vertex. This will be 1 usually.
static const VertexAttributes attributes
Holds the declaration of the vertex format.
float x
Holds the positional x-component of this vertex.
Defines vertex component for colors. Usage is explained here.
void setNormal(const VectorType &normal)
Represents a color. Objects from this class are copyable and assignable.
float r
Holds the red color component of this vertex.
Defines vertex that consists of the two attributes position and normal vector.
static const VertexAttributes attributes
Holds the declaration of the vertex format.
std::vector< VertexAttribute > VertexAttributes
Defines VertexAttribute vector.
Defines simple-most vertex that only consists of a positional attribute.
float y
Holds the positional y-component of this vertex.