9 #ifndef GlobeEngine_VBOVertex_h
10 #define GlobeEngine_VBOVertex_h
12 #include "OpenGL_Includes.h"
13 #include <vmmlib/vmmlib.hpp>
21 for (
int i=0;i<D;i++) {
31 friend std::ostream& operator<< (std::ostream &out, const VBOVertex< D, T> &vert) {
32 out <<
"("<< vert.data[0];
33 for (
int i=1;i<D;i++) {
34 out <<
", " << vert.data[i];
67 if(this->
data[0] != other.
x())
68 return this->
data[0] < other.
x();
69 return this->
data[1] < other.
y();
74 return this->
data[0] == other.
x() && this->
data[1] == other.
y();
77 T
u()
const {
return this->
data[0]; }
78 T
v()
const {
return this->
data[1]; }
79 T
x()
const {
return this->
data[0]; }
80 T
y()
const {
return this->
data[1]; }
82 void u(T _u){ this->
data[0] = _u; }
83 void x(T _x){ this->
data[0] = _x; }
84 void v(T _v){ this->
data[1] = _v; }
85 void y(T _y){ this->
data[1] = _y; }
125 void set(T _x, T _y, T _z){
131 T
x()
const {
return this->
data[0]; }
132 T
y()
const {
return this->
data[1]; }
133 T
z()
const {
return this->
data[2]; }
134 T
r()
const {
return this->
data[0]; }
135 T
g()
const {
return this->
data[1]; }
136 T
b()
const {
return this->
data[2]; }
151 if(this->
data[0] != other.
x())
152 return this->
data[0] < other.
x();
153 if(this->
data[1] != other.
y())
154 return this->
data[1] < other.
y();
155 return this->
data[2] < other.
z();
160 return this->
data[0] == other.
x() && this->
data[1] == other.
y() && this->
data[2] == other.
z();
165 this->
data[0] = other.x();
166 this->
data[1] = other.y();
167 this->
data[2] = other.z();
173 return (this->
data[0] - other.
x() <= 0.00001) && (this->
data[1] - other.
y() <= 0.00001) && (this->
data[2] - other.
z() <= 0.00001);
180 return (a.
x() - b.
x() <= 0.00001) && (a.
y() - b.
y() <= 0.00001) && (a.
z() - b.
z() <= 0.00001);
239 void set(T _x, T _y, T _z, T _w){
246 T
x()
const {
return this->
data[0]; }
247 T
y()
const {
return this->
data[1]; }
248 T
z()
const {
return this->
data[2]; }
249 T
w()
const {
return this->
data[3]; }
250 T
r()
const {
return this->
data[0]; }
251 T
g()
const {
return this->
data[1]; }
252 T
b()
const {
return this->
data[2]; }
253 T
a()
const {
return this->
data[3]; }
266 if(this->
data[0] != other.
x())
267 return this->
data[0] < other.
x();
268 if(this->
data[1] != other.
y())
269 return this->
data[1] < other.
y();
270 if(this->
data[2] != other.
z())
271 return this->
data[1] < other.
z();
272 return this->
data[3] < other.
w();
277 return this->
data[0] == other.
x() && this->
data[1] == other.
y() && this->
data[2] == other.
z()&& this->
data[3] == other.
w();
Vertex2< GLfloat > TexCoord2f
Definition: VBOVertex.h:112
VBOVertex4< GLboolean > Vertex4boolean
Definition: VBOVertex.h:292
T y() const
Definition: VBOVertex.h:247
void x(T _x)
Definition: VBOVertex.h:142
VBOVertex3< T > & operator=(const vmml::Vector3f &other) const
Definition: VBOVertex.h:164
VBOVertex4< GLushort > Color4us
Definition: VBOVertex.h:305
bool operator()(const VBOVertex3 &a, const VBOVertex3 &b)
Definition: VBOVertex.h:178
Vertex2< GLdouble > Vertex2d
Definition: VBOVertex.h:95
void v(T _v)
Definition: VBOVertex.h:84
T b() const
Definition: VBOVertex.h:136
T x() const
Definition: VBOVertex.h:79
Vertex2< GLushort > TexCoord2us
Definition: VBOVertex.h:109
void set(T _x, T _y, T _z)
Definition: VBOVertex.h:125
VBOVertex4< GLuint > VBOVertex4ui
Definition: VBOVertex.h:288
VBOVertex4< GLint > Color4i
Definition: VBOVertex.h:306
Vertex2< GLfloat > Vertex2f
Definition: VBOVertex.h:94
VBOVertex4< GLint > VBOVertex4i
Definition: VBOVertex.h:287
VBOVertex4< GLdouble > VBOVertex4d
Definition: VBOVertex.h:290
VBOVertex4< GLboolean > VBOVertex4boolean
Definition: VBOVertex.h:282
VBOVertex3< GLboolean > Vertex3boolean
Definition: VBOVertex.h:195
VBOVertex4< GLfloat > Color4f
Definition: VBOVertex.h:308
Vertex2< T > xy() const
Definition: VBOVertex.h:138
VBOVertex3< GLboolean > VBOVertex3boolean
Definition: VBOVertex.h:185
VBOVertex3< GLboolean > Color3boolean
Definition: VBOVertex.h:208
VBOVertex3< GLshort > VBOVertex3s
Definition: VBOVertex.h:188
Vertex2< T > yz() const
Definition: VBOVertex.h:140
void r(T _r)
Definition: VBOVertex.h:259
Vertex2< GLfloat > Color2f
Definition: VBOVertex.h:103
VBOVertex4< GLshort > Color4s
Definition: VBOVertex.h:304
VBOVertex3< GLint > Vertex3i
Definition: VBOVertex.h:200
VBOVertex3< GLdouble > VBOVertex3d
Definition: VBOVertex.h:193
Vertex2< GLshort > TexCoord2s
Definition: VBOVertex.h:108
Definition: VBOVertex.h:17
void y(T _y)
Definition: VBOVertex.h:143
VBOVertex4< GLbyte > Vertex4b
Definition: VBOVertex.h:293
VBOVertex3< GLboolean > TexCoord3boolean
Definition: VBOVertex.h:218
VBOVertex3< GLdouble > Vertex3d
Definition: VBOVertex.h:203
Vertex2< GLint > TexCoord2i
Definition: VBOVertex.h:110
VBOVertex3< GLbyte > TexCoord3b
Definition: VBOVertex.h:219
void x(T _x)
Definition: VBOVertex.h:255
VBOVertex4< GLbyte > VBOVertex4b
Definition: VBOVertex.h:283
VBOVertex4< GLuint > Color4ui
Definition: VBOVertex.h:307
VBOVertex3< GLubyte > Color3ub
Definition: VBOVertex.h:210
T y() const
Definition: VBOVertex.h:80
VBOVertex()
Definition: VBOVertex.h:20
void z(T _z)
Definition: VBOVertex.h:144
VBOVertex3< GLint > VBOVertex3i
Definition: VBOVertex.h:190
VBOVertex3< GLdouble > Vertexd
Definition: VBOVertex.h:206
Vertex2< GLubyte > Vertex2ub
Definition: VBOVertex.h:89
void g(T _g)
Definition: VBOVertex.h:260
VBOVertex4< GLshort > VBOVertex4s
Definition: VBOVertex.h:285
VBOVertex3()
Definition: VBOVertex.h:118
void b(T _b)
Definition: VBOVertex.h:147
void r(T _r)
Definition: VBOVertex.h:145
VBOVertex4< GLfloat > VBOVertex4f
Definition: VBOVertex.h:289
T g() const
Definition: VBOVertex.h:135
VBOVertex4()
Definition: VBOVertex.h:231
Vertex2< GLbyte > TexCoord2b
Definition: VBOVertex.h:106
VBOVertex4(T _x, T _y, T _z, T _w)
Definition: VBOVertex.h:232
VBOVertex3< GLushort > Vertex3us
Definition: VBOVertex.h:199
VBOVertex3< GLbyte > Color3b
Definition: VBOVertex.h:209
VBOVertex3< GLfloat > Vertexf
Definition: VBOVertex.h:205
T b() const
Definition: VBOVertex.h:252
VBOVertex3(T _x, T _y, T _z)
Definition: VBOVertex.h:119
Vertex2()
Definition: VBOVertex.h:54
VBOVertex3< GLbyte > Vertex3b
Definition: VBOVertex.h:196
VBOVertex3< GLubyte > VBOVertex3ub
Definition: VBOVertex.h:187
VBOVertex4< GLushort > Vertex4us
Definition: VBOVertex.h:296
Vertex2< GLuint > Color2ui
Definition: VBOVertex.h:102
void set(T _x, T _y, T _z, T _w)
Definition: VBOVertex.h:239
bool operator<(const VBOVertex4 &other) const
Definition: VBOVertex.h:265
T y() const
Definition: VBOVertex.h:132
VBOVertex4< GLfloat > Vertex4f
Definition: VBOVertex.h:299
VBOVertex3< GLfloat > Color3f
Definition: VBOVertex.h:215
void x(T _x)
Definition: VBOVertex.h:83
VBOVertex3< GLbyte > VBOVertex3b
Definition: VBOVertex.h:186
void b(T _b)
Definition: VBOVertex.h:261
T x() const
Definition: VBOVertex.h:246
VBOVertex3< GLint > TexCoord3i
Definition: VBOVertex.h:223
void y(T _y)
Definition: VBOVertex.h:256
VBOVertex3< GLshort > TexCoord3s
Definition: VBOVertex.h:221
VBOVertex4< GLdouble > Vertex4d
Definition: VBOVertex.h:300
T z() const
Definition: VBOVertex.h:133
VBOVertex3< GLshort > Vertex3s
Definition: VBOVertex.h:198
T getArray()
Definition: VBOVertex.h:27
void y(T _y)
Definition: VBOVertex.h:85
Vertex2< GLuint > TexCoord2ui
Definition: VBOVertex.h:111
VBOVertex4< GLubyte > VBOVertex4ub
Definition: VBOVertex.h:284
T x() const
Definition: VBOVertex.h:131
VBOVertex3< GLdouble > TexCoord3d
Definition: VBOVertex.h:226
bool isAlmostEqual(const VBOVertex3 &other) const
Definition: VBOVertex.h:172
VBOVertex3< GLushort > TexCoord3us
Definition: VBOVertex.h:222
T data[D]
Definition: VBOVertex.h:48
void w(T _w)
Definition: VBOVertex.h:258
VBOVertex3< GLint > Color3i
Definition: VBOVertex.h:213
Vertex2< T > xz() const
Definition: VBOVertex.h:139
T a() const
Definition: VBOVertex.h:253
Vertex2< GLubyte > Color2ub
Definition: VBOVertex.h:98
Vertex2< GLshort > Vertex2s
Definition: VBOVertex.h:90
Definition: VBOVertex.h:115
Vertex2< GLushort > Color2us
Definition: VBOVertex.h:100
Vertex2< GLint > Color2i
Definition: VBOVertex.h:101
VBOVertex4< GLushort > VBOVertex4us
Definition: VBOVertex.h:286
void a(T _a)
Definition: VBOVertex.h:262
void z(T _z)
Definition: VBOVertex.h:257
VBOVertex3< GLubyte > TexCoord3ub
Definition: VBOVertex.h:220
VBOVertex3< GLushort > VBOVertex3us
Definition: VBOVertex.h:189
bool operator<(const Vertex2 &other) const
Definition: VBOVertex.h:66
Vertex2(T _u, T _v)
Definition: VBOVertex.h:55
Definition: VBOVertex.h:176
Vertex2< GLdouble > Color2d
Definition: VBOVertex.h:104
VBOVertex3< GLfloat > Vertex3f
Definition: VBOVertex.h:202
VBOVertex3< GLushort > Color3us
Definition: VBOVertex.h:212
bool operator==(const VBOVertex4 &other) const
Definition: VBOVertex.h:276
VBOVertex3< GLfloat > TexCoord3f
Definition: VBOVertex.h:225
VBOVertex3< GLuint > VBOVertex3ui
Definition: VBOVertex.h:191
void g(T _g)
Definition: VBOVertex.h:146
Vertex2< GLuint > Vertex2ui
Definition: VBOVertex.h:93
VBOVertex3< GLfloat > VBOVertex3f
Definition: VBOVertex.h:192
VBOVertex4< GLubyte > Vertex4ub
Definition: VBOVertex.h:294
VBOVertex3< GLuint > TexCoord3ui
Definition: VBOVertex.h:224
Definition: AvalancheTrainingSimulationEngine.h:28
T w() const
Definition: VBOVertex.h:249
void set(T _u, T _v)
Definition: VBOVertex.h:60
Vertex2< GLdouble > TexCoord2d
Definition: VBOVertex.h:113
Vertex2< GLbyte > Vertex2b
Definition: VBOVertex.h:88
VBOVertex4< GLdouble > Color4d
Definition: VBOVertex.h:309
bool operator==(const Vertex2 &other) const
Definition: VBOVertex.h:73
Definition: VBOVertex.h:51
T r() const
Definition: VBOVertex.h:250
VBOVertex4< GLshort > Vertex4s
Definition: VBOVertex.h:295
T u() const
Definition: VBOVertex.h:77
VBOVertex3< GLubyte > Vertex3ub
Definition: VBOVertex.h:197
bool operator<(const VBOVertex3 &other) const
Definition: VBOVertex.h:150
VBOVertex3< GLdouble > Color3d
Definition: VBOVertex.h:216
Definition: VBOVertex.h:228
T v() const
Definition: VBOVertex.h:78
VBOVertex4< GLbyte > Color4b
Definition: VBOVertex.h:302
bool operator==(const VBOVertex3 &other) const
Definition: VBOVertex.h:159
Vertex2< GLint > Vertex2i
Definition: VBOVertex.h:92
T g() const
Definition: VBOVertex.h:251
~VBOVertex()
Definition: VBOVertex.h:25
VBOVertex4< GLint > Vertex4i
Definition: VBOVertex.h:297
Vertex2< GLshort > Color2s
Definition: VBOVertex.h:99
VBOVertex3< GLshort > Color3s
Definition: VBOVertex.h:211
VBOVertex3< GLuint > Color3ui
Definition: VBOVertex.h:214
Vertex2< GLbyte > Color2b
Definition: VBOVertex.h:97
void u(T _u)
Definition: VBOVertex.h:82
VBOVertex3< GLuint > Vertex3ui
Definition: VBOVertex.h:201
T z() const
Definition: VBOVertex.h:248
Vertex2< GLubyte > TexCoord2ub
Definition: VBOVertex.h:107
VBOVertex4< GLubyte > Color4ub
Definition: VBOVertex.h:303
VBOVertex4< GLuint > Vertex4ui
Definition: VBOVertex.h:298
T r() const
Definition: VBOVertex.h:134
Vertex2< GLushort > Vertex2us
Definition: VBOVertex.h:91