VVISF & VVGL
VVGL_Geom.hpp
1 #ifndef VVGL_GLGeom_hpp
2 #define VVGL_GLGeom_hpp
3 
4 #include "VVGL_Defines.hpp"
5 
6 #include <iostream>
7 #include "VVGL_Base.hpp"
8 
9 #define BUFFER_OFFSET(i) ((uint8_t*)NULL + (i))
10 
11 
12 
13 
14 namespace VVGL
15 {
16 
17 
18 using namespace std;
19 
20 
21 
26 // basic geometry structs
27 struct Point {
28  double x = 0.;
29  double y = 0.;
30 
31  Point() {};
32  Point(const double & inX, const double & inY) { x=inX;y=inY; };
33 
34  inline bool isZero() const { return (this->x==0.0 && this->y==0.0); }
35 
36  inline bool operator==(const Point & n) const { return (n.x==this->x && n.y==this->y); }
37  inline bool operator!=(const Point & n) const { return !(*this==(n)); }
38  inline Point operator+(const Point & n) const { return { this->x + n.x, this->y + n.y }; }
39  inline Point operator-(const Point & n) const { return { this->x - n.x, this->y - n.y }; }
40  friend ostream & operator<<(ostream & os, const Point & n) { os<<"("<<n.x<<", "<<n.y<<")";return os; }
41 };
46 struct Size {
47  double width = 0.;
48  double height = 0.;
49 
50  Size() {};
51  Size(const double & inWidth, const double & inHeight) { width=inWidth;height=inHeight; };
52 
53  inline bool isZero() const { return (this->width==0.0 && this->height==0.0); }
54 
55  inline bool operator==(const Size & n) const { return (n.width==this->width && n.height==this->height); }
56  inline bool operator!=(const Size & n) const { return !(*this==(n)); }
57  inline Size operator+(const Size & n) const { return { this->width + n.width, this->height + n.height }; }
58  inline Size operator-(const Size & n) const { return { this->width - n.width, this->height - n.height }; }
59  friend ostream & operator<<(ostream & os, const Size & n) { os<<"("<<n.width<<"x"<<n.height<<")";return os; }
60 };
65 struct Rect {
66  Point origin = {0.,0.};
67  Size size = {0., 0.};
68 
69  Rect() {};
70  Rect(const double & inX, const double & inY, const double & inW, const double & inH) { origin={inX,inY}; size={inW,inH}; };
71 
73  inline double minX() const { return ((size.width>=0) ? (origin.x) : (origin.x+size.width)); }
75  inline double maxX() const { return ((size.width>=0) ? (origin.x+size.width) : (origin.x)); }
77  inline double minY() const { return ((size.height>=0) ? (origin.y) : (origin.y+size.height)); }
79  inline double maxY() const { return ((size.height>=0) ? (origin.y+size.height) : (origin.y)); }
81  inline double midX() const { return (origin.x+(size.width/2.0)); }
83  inline double midY() const { return (origin.y+(size.height/2.0)); }
85  inline Point topLeft() const { return { this->minX(), this->maxY() }; }
87  inline Point topRight() const { return { this->maxX(), this->maxY() }; }
89  inline Point botLeft() const { return { this->minX(), this->minY() }; }
91  inline Point botRight() const { return { this->maxX(), this->minY() }; }
93  inline Point center() const { return { this->midX(), this->midY() }; }
95  inline bool isZero() const { return (this->origin.isZero() && this->size.isZero()); }
96 
97  inline bool operator==(const Rect & n) const { return (this->origin.operator==(n.origin) && this->size.operator==(n.size)); }
98  inline bool operator!=(const Rect & n) const { return !(*this==(n)); }
99  friend ostream & operator<<(ostream & os, const Rect & n) { os<<"{"<<n.origin<<","<<n.size<<"}";return os; }
100 };
101 
102 
103 
104 
114 };
120 VVGL_EXPORT Rect ResizeRect(const Rect & fitThisRect, const Rect & inThisRect, const SizingMode & sizingMode);
121 
122 
123 
124 
129 struct VT {
130  //virtual void zero() = 0;
131 };
136 struct VT_XY : public VT {
137  float x = 0.;
138  float y = 0.;
139 
140  VT_XY() {}
141  VT_XY(const float & inX, const float & inY) : x(inX), y(inY) {}
142 
143  inline float & operator[] (const int index) { switch(index) { case 0: return x; case 1: default: return y; } }
144  inline bool operator== (const VT_XY & n) const { return (this->x==n.x && this->y==n.y); }
145  inline bool operator!= (const VT_XY & n) const { return !(*this==n); }
146  friend ostream & operator<<(ostream & os, const VT_XY & n) { os<<"{"<<n.x<<","<<n.y<<"}";return os; }
147 
148  inline void zero() { x=0.; y=0; }
149  inline int numComponents() const { return 2; }
150 };
155 struct VT_XYZ : public VT {
156  float x = 0.;
157  float y = 0.;
158  float z = 0.;
159 
160  VT_XYZ() {}
161  VT_XYZ(const float & inX, const float & inY, const float & inZ) : x(inX), y(inY), z(inZ) {}
162 
163  inline float & operator[] (const int index) { switch(index) { case 0: return x; case 1: return y; case 2: default: return z; } }
164  inline bool operator== (const VT_XYZ & n) const { return (this->x==n.x && this->y==n.y && this->z==n.z); }
165  inline bool operator!= (const VT_XYZ & n) const { return !(*this==n); }
166  friend ostream & operator<<(ostream & os, const VT_XYZ & n) { os<<"{"<<n.x<<","<<n.y<<","<<n.z<<"}";return os; }
167 
168  inline void zero() { x=0.; y=0; z=0; }
169  inline int numComponents() const { return 3; }
170 };
175 struct VT_ST : public VT {
176  float s = 0.;
177  float t = 0.;
178 
179  VT_ST() {}
180  VT_ST(const float & inS, const float & inT) : s(inS), t(inT) {}
181 
182  inline float & operator[] (const int index) { switch(index) { case 0: return s; case 1: default: return t; } }
183  inline bool operator== (const VT_ST & n) const { return (this->s==n.s && this->t==n.t); }
184  inline bool operator!= (const VT_ST & n) const { return !(*this==n); }
185  friend ostream & operator<<(ostream & os, const VT_ST & n) { os<<"{"<<n.s<<","<<n.t<<"}";return os; }
186 
187  inline void zero() { s=0.; t=0; }
188  inline int numComponents() const { return 2; }
189 };
194 struct VT_RGBA : public VT {
195  float r = 0.0;
196  float g = 0.0;
197  float b = 0.0;
198  float a = 0.0;
199 
200  VT_RGBA() {}
201  VT_RGBA(const float & inR, const float & inG, const float & inB, const float & inA) : r(inR), g(inG), b(inB), a(inA) {}
202 
203  inline float & operator[] (const int index) { switch(index) { case 0: return r; case 1: return g; case 2: return b; case 3: default: return a; } }
204  inline void operator= (const GLColor & n) { r=n.r; g=n.g; b=n.b; a=n.a; };
205  inline bool operator== (const VT_RGBA & n) const { return (this->r==n.r && this->g==n.g && this->b==n.b && this->a==n.a); };
206  inline bool operator!= (const VT_RGBA & n) const { return !(*this==n); };
207  friend ostream & operator<<(ostream & os, const VT_RGBA & n) { os<<"{"<<n.r<<","<<n.g<<","<<n.b<<","<<n.a<<"}";return os; }
208 
209  inline void zero() { r=0.; g=0; b=0; a=0; }
210  inline int numComponents() const { return 4; }
211 };
212 
213 
214 
215 
217 
221 struct Vertex {
223  //virtual void zero() = 0;
224 };
225 // these structs define different commonly-used kinds of vertices using the above data types. the ordering and alignment of the members in these structs should correspond directly to how the memory is used in GL (likewise, it is expected that the members of all these structs are compatible with GL).
230 struct VertXY : public Vertex {
233 
234  inline bool operator== (const VertXY & n) const { return (this->geo==n.geo); }
235  inline bool operator!= (const VertXY & n) const { return !(*this==n); }
236 
238  inline int geoOffset() const { return 0; }
239 
240  inline void zero() { geo.zero(); }
241 };
246 struct VertXYST : public Vertex {
251 
252  inline bool operator== (const VertXYST & n) const { return (this->geo==n.geo && this->tex==n.tex); }
253  inline bool operator!= (const VertXYST & n) const { return !(*this==n); }
254 
256  inline int geoOffset() const { return 0; }
258  inline int texOffset() const { return sizeof(geo); }
259 
260  inline void zero() { geo.zero(); tex.zero(); }
261 };
266 struct VertXYRGBA : public Vertex {
271 
272  inline bool operator== (const VertXYRGBA & n) const { return (this->geo==n.geo && this->color==n.color); }
273  inline bool operator!= (const VertXYRGBA & n) const { return !(*this==n); }
274 
276  inline int geoOffset() const { return 0; }
278  inline int colorOffset() const { return sizeof(geo); }
279 
280  inline void zero() { geo.zero(); color.zero(); }
281 };
286 struct VertXYSTRGBA : public Vertex {
293 
294  inline bool operator== (const VertXYSTRGBA & n) const { return (this->geo==n.geo && this->tex==n.tex && this->color==n.color); }
295  inline bool operator!= (const VertXYSTRGBA & n) const { return !(*this==n); }
296 
298  inline int geoOffset() const { return 0; }
300  inline int texOffset() const { return sizeof(geo); }
302  inline int colorOffset() const { return (sizeof(geo) + sizeof(tex)); }
303 
304  inline void zero() { geo.zero(); tex.zero(); color.zero(); }
305 };
306 
307 
312 struct VertXYZ : public Vertex {
315 
316  inline bool operator== (const VertXYZ & n) const { return (this->geo==n.geo); }
317  inline bool operator!= (const VertXYZ & n) const { return !(*this==n); }
318 
320  inline int geoOffset() const { return 0; }
321 
322  inline void zero() { geo.zero(); }
323 };
328 struct VertXYZST : public Vertex {
333 
334  inline bool operator== (const VertXYZST & n) const { return (this->geo==n.geo && this->tex==n.tex); }
335  inline bool operator!= (const VertXYZST & n) const { return !(*this==n); }
336 
338  inline int geoOffset() const { return 0; }
340  inline int texOffset() const { return sizeof(geo); }
341 
342  inline void zero() { geo.zero(); tex.zero(); }
343 };
348 struct VertXYZRGBA : public Vertex {
353 
354  inline bool operator== (const VertXYZRGBA & n) const { return (this->geo==n.geo && this->color==n.color); }
355  inline bool operator!= (const VertXYZRGBA & n) const { return !(*this==n); }
356 
358  inline int geoOffset() const { return 0; }
360  inline int colorOffset() const { return sizeof(geo); }
361 
362  inline void zero() { geo.zero(); color.zero(); }
363 };
368 struct VertXYZSTRGBA : public Vertex {
375 
376  inline bool operator== (const VertXYZSTRGBA & n) const { return (this->geo==n.geo && this->tex==n.tex && this->color==n.color); }
377  inline bool operator!= (const VertXYZSTRGBA & n) const { return !(*this==n); }
378 
380  inline int geoOffset() const { return 0; }
382  inline int texOffset() const { return sizeof(geo); }
384  inline int colorOffset() const { return (sizeof(geo) + sizeof(tex)); }
385 
386  inline void zero() { geo.zero(); tex.zero(); color.zero(); }
387 };
392 struct VertRGBA : public Vertex {
395 
396  inline bool operator== (const VertRGBA & n) const { return (this->color==n.color); }
397  inline bool operator!= (const VertRGBA & n) const { return !(*this==n); }
398 
400  inline int colorOffset() const { return 0; }
401 
402  inline void zero() { color.zero(); }
403 };
404 
405 
406 
407 
412 template <typename QuadType>
413 struct Quad {
415  QuadType bl;
417  QuadType br;
419  QuadType tl;
421  QuadType tr;
422 
423  // make sure that the template type derives from VVGL::Vertex
424  static_assert(std::is_base_of<VVGL::Vertex,QuadType>::value, "QuadType must inherit from VVGL::Vertex");
425 
426  Quad() {}
427  Quad(const QuadType & inBL, const QuadType & inBR, const QuadType & inTL, const QuadType & inTR) : bl(inBL), br(inBR), tl(inTL), tr(inTR) {}
428 
429  inline QuadType & operator[] (const int index) { switch(index) { case 0: return br; case 1: return br; case 2: return tl; case 3: default: return tr; } }
430  inline bool operator==(const Quad & n) const { return (this->bl==n.bl && this->br==n.br && this->tl==n.tl && this->tr==n.tr); }
431  inline bool operator!=(const Quad & n) const { return !(*this==n); }
432 
434  inline int stride() const { return sizeof(bl); }
436  inline int geoOffset() const { return bl.geoOffset(); }
438  inline int texOffset() const { return bl.texOffset(); }
440  inline int colorOffset() const { return bl.colorOffset(); }
441 
443  inline void populateGeo(Rect & inRect) {
444  const Rect tmpRect = inRect;
445  populateGeo(tmpRect);
446  }
448  inline void populateGeo(const Rect & inRect) {
449  bl.geo.x = inRect.minX();
450  bl.geo.y = inRect.minY();
451 
452  br.geo.x = inRect.maxX();
453  br.geo.y = inRect.minY();
454 
455  tl.geo.x = inRect.minX();
456  tl.geo.y = inRect.maxY();
457 
458  tr.geo.x = inRect.maxX();
459  tr.geo.y = inRect.maxY();
460  }
462  inline void populateTex(Rect & inRect, const bool & inFlip) {
463  const Rect tmpRect = inRect;
464  populateTex(tmpRect, inFlip);
465  }
467  inline void populateTex(const Rect & inRect, const bool & inFlip) {
468  if (!inFlip) {
469  bl.tex.s = inRect.minX();
470  bl.tex.t = inRect.minY();
471 
472  br.tex.s = inRect.maxX();
473  br.tex.t = inRect.minY();
474 
475  tl.tex.s = inRect.minX();
476  tl.tex.t = inRect.maxY();
477 
478  tr.tex.s = inRect.maxX();
479  tr.tex.t = inRect.maxY();
480  }
481  else {
482  bl.tex.s = inRect.minX();
483  bl.tex.t = inRect.maxY();
484 
485  br.tex.s = inRect.maxX();
486  br.tex.t = inRect.maxY();
487 
488  tl.tex.s = inRect.minX();
489  tl.tex.t = inRect.minY();
490 
491  tr.tex.s = inRect.maxX();
492  tr.tex.t = inRect.minY();
493  }
494  }
496  inline void populateColor(VT_RGBA & inColor) {
497  const VT_RGBA tmpColor = inColor;
498  populateColor(tmpColor);
499  }
501  inline void populateColor(const VT_RGBA & inColor) {
502  VT_RGBA tmpColor = inColor;
503  for (int i=0; i<4; ++i) {
504  bl.color[i] = tmpColor[i];
505  br.color[i] = tmpColor[i];
506  tl.color[i] = tmpColor[i];
507  tr.color[i] = tmpColor[i];
508  }
509  }
510 };
511 
512 
513 
514 
515 }
516 
517 
518 #endif /* VVGL_GLGeom_hpp */
VT_RGBA color
The RGBA color data for this vertex.
Definition: VVGL_Geom.hpp:374
int colorOffset() const
Returns the offset of the color data within the vertex.
Definition: VVGL_Geom.hpp:384
double midX() const
Returns the middle X coordinate of the rect.
Definition: VVGL_Geom.hpp:81
This struct describes an RGBA color.
Definition: VVGL_Base.hpp:116
QuadType br
The bottom-right vertex.
Definition: VVGL_Geom.hpp:417
the content is copied directly to the desired area- it is not made any larger or smaller ...
Definition: VVGL_Geom.hpp:113
VT_XYZ geo
The geometry data for this vertex.
Definition: VVGL_Geom.hpp:330
VT_XYZ geo
The geometry data for this vertex.
Definition: VVGL_Geom.hpp:314
the content is scaled to fit perfectly within the desired area- some stretching or squashing may occu...
Definition: VVGL_Geom.hpp:112
int texOffset() const
Returns the offset of the texture data within the vertex.
Definition: VVGL_Geom.hpp:300
VT_ST tex
The texture coordinate data for this vertex.
Definition: VVGL_Geom.hpp:332
Definition: GLBuffer.hpp:13
Abstract base struct for vertex types (VT == "vertex type")
Definition: VVGL_Geom.hpp:129
void populateTex(Rect &inRect, const bool &inFlip)
Populates the quad&#39;s texture coordinate data with the passed rect&#39;s geometry.
Definition: VVGL_Geom.hpp:462
Describes a vertex that contains x/y geometry data and s/t texture coordinate data and RGBA color dat...
Definition: VVGL_Geom.hpp:286
int colorOffset() const
Returns the offset of the color data within the vertex.
Definition: VVGL_Geom.hpp:302
int geoOffset() const
Returns the offset of the geometry data within the vertex.
Definition: VVGL_Geom.hpp:256
SizingMode
Definition: VVGL_Geom.hpp:109
double minY() const
Returns the min Y coordinate of the rect.
Definition: VVGL_Geom.hpp:77
VT_XYZ geo
The geometry data for this vertex.
Definition: VVGL_Geom.hpp:350
VT_XY geo
The geometry data for this vertex.
Definition: VVGL_Geom.hpp:232
void populateGeo(const Rect &inRect)
Populates the quad&#39;s geometry with the passed rect&#39;s geometry.
Definition: VVGL_Geom.hpp:448
VT_XY geo
The geometry data for this vertex.
Definition: VVGL_Geom.hpp:268
VT_RGBA color
The RGBA color data for this vertex.
Definition: VVGL_Geom.hpp:270
int geoOffset() const
Returns the offset of the geometry data within the vertex.
Definition: VVGL_Geom.hpp:380
Abstract base struct for a vertex that has one or kinds of data stored in one or more vertex types...
Definition: VVGL_Geom.hpp:221
double midY() const
Returns the middle Y coordinate of the rect.
Definition: VVGL_Geom.hpp:83
VT_XY geo
The geometry data for this vertex.
Definition: VVGL_Geom.hpp:288
STL namespace.
Describes a vertex that only contains x/y geometry data. Derived from Vertex.
Definition: VVGL_Geom.hpp:230
Describes a vertex that contains x/y/z geometry data and s/t texture coordinate data and RGBA color d...
Definition: VVGL_Geom.hpp:368
float r
The red component.
Definition: VVGL_Base.hpp:118
float a
The alpha component.
Definition: VVGL_Base.hpp:124
Basic struct for 2D size.
Definition: VVGL_Geom.hpp:46
Describes a vertex that contains x/y/z geometry data and s/t texture coordinate data. Derived from Vertex.
Definition: VVGL_Geom.hpp:328
VT_XY geo
The geometry data for this vertex.
Definition: VVGL_Geom.hpp:248
VT_RGBA color
The RGBA color data for this vertex.
Definition: VVGL_Geom.hpp:394
VT_ST tex
The texture coordinate data for this vertex.
Definition: VVGL_Geom.hpp:372
VT_ST tex
The texture coordinate data for this vertex.
Definition: VVGL_Geom.hpp:290
int geoOffset() const
Returns the offset of the geometry data within the quad.
Definition: VVGL_Geom.hpp:436
QuadType tr
The top-right vertex.
Definition: VVGL_Geom.hpp:421
Point topLeft() const
Returns a Point describing the top-left corner of the rect.
Definition: VVGL_Geom.hpp:85
This vertex type describes a two-dimensional point. Derives from VT. Concrete subclasses of Vertex us...
Definition: VVGL_Geom.hpp:136
Point center() const
Returns a Point describing the center of the rect.
Definition: VVGL_Geom.hpp:93
Describes a vertex that contains x/y geometry data and s/t texture coordinate data. Derived from Vertex.
Definition: VVGL_Geom.hpp:246
int geoOffset() const
Returns the offset of the geometry data within the vertex.
Definition: VVGL_Geom.hpp:358
int geoOffset() const
Returns the offset of the geometry data within the vertex.
Definition: VVGL_Geom.hpp:338
int colorOffset() const
Returns the offset of the color data within the vertex.
Definition: VVGL_Geom.hpp:278
the content is made as large as possible, proportionally, without cutting itself off or going outside...
Definition: VVGL_Geom.hpp:110
This vertex type describes RGBA color data. Derives from VT. Concrete subclasses of Vertex use one or...
Definition: VVGL_Geom.hpp:194
double maxX() const
Returns the max X coordinate of the rect.
Definition: VVGL_Geom.hpp:75
Describes a vertex that contains RGBA color data. Derived from Vertex.
Definition: VVGL_Geom.hpp:392
Point topRight() const
Returns a Point describing the top-right corner of the rect.
Definition: VVGL_Geom.hpp:87
float g
The green component.
Definition: VVGL_Base.hpp:120
This vertex type describes a three-dimensional point. Derives from VT. Concrete subclasses of Vertex ...
Definition: VVGL_Geom.hpp:155
int geoOffset() const
Returns the offset of the geometry data within the vertex.
Definition: VVGL_Geom.hpp:298
double maxY() const
Returns the max Y coordinate of the rect.
Definition: VVGL_Geom.hpp:79
int colorOffset() const
Returns the offset of the color data within the vertex.
Definition: VVGL_Geom.hpp:360
int geoOffset() const
Returns the offset of the geometry data within the vertex.
Definition: VVGL_Geom.hpp:276
void populateColor(const VT_RGBA &inColor)
Populates the quad&#39;s RGBA color data with the passed color.
Definition: VVGL_Geom.hpp:501
int colorOffset() const
Returns the offset of the color data within the vertex.
Definition: VVGL_Geom.hpp:400
Basic struct for a rectangle using VVGL::Point and VVGL::Size.
Definition: VVGL_Geom.hpp:65
Describes a vertex that contains x/y geometry data and RGBA color data. Derived from Vertex...
Definition: VVGL_Geom.hpp:266
This vertex type describes a two-dimensional texture location. Derives from VT. Concrete subclasses o...
Definition: VVGL_Geom.hpp:175
bool isZero() const
Sets all the values of the rect to 0.
Definition: VVGL_Geom.hpp:95
void populateTex(const Rect &inRect, const bool &inFlip)
Populates the quad&#39;s texture coordinate data with the passed rect&#39;s geometry.
Definition: VVGL_Geom.hpp:467
int texOffset() const
Returns the offset of the texture coordinate data within the quad.
Definition: VVGL_Geom.hpp:438
VT_RGBA color
The RGBA color data for this vertex.
Definition: VVGL_Geom.hpp:352
int texOffset() const
Returns the offset of the texture data within the vertex.
Definition: VVGL_Geom.hpp:258
Describes a vertex that contains x/y/z geometry data and RGBA color data. Derived from Vertex...
Definition: VVGL_Geom.hpp:348
void populateGeo(Rect &inRect)
Populates the quad&#39;s geometry with the passed rect&#39;s geometry.
Definition: VVGL_Geom.hpp:443
This struct defines a quad- it&#39;s a simple template which is expected to be passed one of the structs ...
Definition: VVGL_Geom.hpp:413
Point botRight() const
Returns a Point describing the bottom-right corner of the rect.
Definition: VVGL_Geom.hpp:91
VT_RGBA color
The RGBA color data for this vertex.
Definition: VVGL_Geom.hpp:292
double minX() const
Returns the min X coordinate of the rect.
Definition: VVGL_Geom.hpp:73
int texOffset() const
Returns the offset of the texture data within the vertex.
Definition: VVGL_Geom.hpp:340
VT_XYZ geo
The geometry data for this vertex.
Definition: VVGL_Geom.hpp:370
QuadType tl
The top-left vertex.
Definition: VVGL_Geom.hpp:419
int geoOffset() const
Returns the offset of the geometry data within the vertex.
Definition: VVGL_Geom.hpp:238
Rect ResizeRect(const Rect &fitThisRect, const Rect &inThisRect, const SizingMode &sizingMode)
Proportional resizing of Rects This method resizes one rect to fit in another using the provided sizi...
void populateColor(VT_RGBA &inColor)
Populates the quad&#39;s RGBA color data with the passed color.
Definition: VVGL_Geom.hpp:496
Point botLeft() const
Returns a Point describing the bottom-left corner of the rect.
Definition: VVGL_Geom.hpp:89
int stride() const
Returns the size of a single vertex in bytes/the stride between vertices. If you know the stride of a...
Definition: VVGL_Geom.hpp:434
Basic struct for 2D point.
Definition: VVGL_Geom.hpp:27
QuadType bl
The bottom-left vertex.
Definition: VVGL_Geom.hpp:415
int texOffset() const
Returns the offset of the texture data within the vertex.
Definition: VVGL_Geom.hpp:382
int geoOffset() const
Returns the offset of the geometry data within the vertex.
Definition: VVGL_Geom.hpp:320
the content is made as large as possible, proportionally, to fill the desired area- some of the conte...
Definition: VVGL_Geom.hpp:111
VT_ST tex
The texture coordinate data for this vertex.
Definition: VVGL_Geom.hpp:250
Describes a vertex that contains x/y/z geometry data. Derived from Vertex.
Definition: VVGL_Geom.hpp:312
int colorOffset() const
Returns the offset of the RGBA color data within the quad.
Definition: VVGL_Geom.hpp:440
float b
The blue component.
Definition: VVGL_Base.hpp:122