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