diff options
Diffstat (limited to 'include/YAGE/vertex.hpp')
-rw-r--r-- | include/YAGE/vertex.hpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/YAGE/vertex.hpp b/include/YAGE/vertex.hpp index 1026253e..9201393b 100644 --- a/include/YAGE/vertex.hpp +++ b/include/YAGE/vertex.hpp @@ -11,7 +11,8 @@ #include <GL/glew.h> -namespace yage { +namespace yage +{ struct Position { float x; @@ -31,7 +32,9 @@ struct Color { Color() = default; Color(GLubyte r_, GLubyte g_, GLubyte b_, GLubyte a_) - : r(r_), g(g_), b(b_), a(a_) {} + : r(r_), g(g_), b(b_), a(a_) + { + } }; struct UV { @@ -50,27 +53,32 @@ struct Vertex { Vertex() = default; - Vertex(const Position& position_, const Color& color_, const UV& uv_) - : position(position_), color(color_), uv(uv_) {} + Vertex(const Position &position_, const Color &color_, const UV &uv_) + : position(position_), color(color_), uv(uv_) + { + } - void setPosition(float x, float y) { + void setPosition(float x, float y) + { position.x = x; position.y = y; } - void setColor(GLubyte r, GLubyte g, GLubyte b, GLubyte a) { + void setColor(GLubyte r, GLubyte g, GLubyte b, GLubyte a) + { color.r = r; color.g = g; color.b = b; color.a = a; } - void setUv(float u, float v) { + void setUv(float u, float v) + { uv.u = u; uv.v = v; } }; -} // yage +} // yage #endif |