Carna  Version 3.0.1
Vertex.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 - 2015 Leonid Kostrykin
3  *
4  * Chair of Medical Engineering (mediTEC)
5  * RWTH Aachen University
6  * Pauwelsstr. 20
7  * 52074 Aachen
8  * Germany
9  *
10  */
11 
12 #ifndef VERTEX_H_6014714286
13 #define VERTEX_H_6014714286
14 
15 #include <Carna/Carna.h>
17 
22 namespace Carna
23 {
24 
25 namespace base
26 {
27 
28 
29 
30 // ----------------------------------------------------------------------------------
31 // VertexBase
32 // ----------------------------------------------------------------------------------
33 
108 struct CARNA_LIB VertexBase
109 {
114 
128  float x, y, z, w;
129 
133  VertexBase();
134 };
135 
136 
137 
138 // ----------------------------------------------------------------------------------
139 // VertexNormal
140 // ----------------------------------------------------------------------------------
141 
150 {
164  float nx, ny, nz, nw;
165 };
166 
167 
168 
169 // ----------------------------------------------------------------------------------
170 // VertexColor
171 // ----------------------------------------------------------------------------------
172 
181 {
194  float r, g, b, a;
195 };
196 
197 
198 
199 // ----------------------------------------------------------------------------------
200 // ColoredVertex
201 // ----------------------------------------------------------------------------------
202 
210  : public VertexBase
211  , public VertexColor
212 {
217 };
218 
219 
220 
221 } // namespace Carna :: base
222 
223 } // namespace Carna
224 
225 #endif // VERTEX_H_6014714286
float nz
Holds the normal vector z-component of this vertex.
Definition: Vertex.h:164
Defines vertex component for normal vectors. Usage is explained here.
Definition: Vertex.h:149
Defines Carna::base::VertexAttributes.
float a
Holds the alpha color component of this vertex.
Definition: Vertex.h:194
float nw
Holds the normal vector w-component of this vertex. This will be 0 usually.
Definition: Vertex.h:164
float g
Holds the green color component of this vertex.
Definition: Vertex.h:194
float nx
Holds the normal vector x-component of this vertex.
Definition: Vertex.h:164
Defines vertex component for colors. Usage is explained here.
Definition: Vertex.h:180
float z
Holds the positional z-component of this vertex.
Definition: Vertex.h:128
static const VertexAttributes attributes
Holds the declaration of the vertex format.
Definition: Vertex.h:216
Defines simple-most vertex that only consists of a positional attribute.
Definition: Vertex.h:108
float ny
Holds the normal vector y-component of this vertex.
Definition: Vertex.h:164
static const VertexAttributes attributes
Holds the declaration of the vertex format.
Definition: Vertex.h:113
float b
Holds the blue color component of this vertex.
Definition: Vertex.h:194
float r
Holds the red color component of this vertex.
Definition: Vertex.h:194
std::vector< VertexAttribute > VertexAttributes
Defines VertexAttribute vector.
Defines vertex that consists of the two attributes position and color.
Definition: Vertex.h:209