From 0b8a907d1f99b20cc789806ff70394a18cbea1d9 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sun, 13 Aug 2017 17:38:57 +0100 Subject: Updating docs --- vertex_8hpp_source.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vertex_8hpp_source.html') diff --git a/vertex_8hpp_source.html b/vertex_8hpp_source.html index 6a3021f1..e52debb7 100644 --- a/vertex_8hpp_source.html +++ b/vertex_8hpp_source.html @@ -68,11 +68,11 @@ $(function() {
vertex.hpp
-
1 /* ----------------------------------------------------------------------------
2  * vertex.hpp
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
5  * See file LICENSE for more details
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef VERTEX_HPP
10 #define VERTEX_HPP
11 
12 #include <GL/glew.h>
13 
14 namespace yage
15 {
16 
17 struct Position
18 {
19  float x;
20  float y;
21 
22  Position()
23  {}
24 
25  Position(float x_, float y_) :
26  x(x_), y(y_)
27  {}
28 };
29 
30 struct Color
31 {
32  GLubyte r;
33  GLubyte g;
34  GLubyte b;
35  GLubyte a;
36 
37  Color()
38  {}
39 
40  Color(GLubyte r_, GLubyte g_, GLubyte b_, GLubyte a_) :
41  r(r_), g(g_), b(b_), a(a_)
42  {}
43 };
44 
45 struct UV
46 {
47  float u;
48  float v;
49 
50  UV()
51  {}
52 
53  UV(float u_, float v_) :
54  u(u_), v(v_)
55  {}
56 };
57 
58 struct Vertex
59 {
60  Position position;
61  Color color;
62  UV uv;
63 
64  Vertex()
65  {}
66 
67  Vertex(const Position &position_, const Color &color_, const UV &uv_) :
68  position(position_), color(color_), uv(uv_)
69  {}
70 
71  void setPosition(float x, float y)
72  {
73  position.x = x;
74  position.y = y;
75  }
76 
77  void setColor(GLubyte r, GLubyte g, GLubyte b, GLubyte a)
78  {
79  color.r = r;
80  color.g = g;
81  color.b = b;
82  color.a = a;
83  }
84 
85  void setUv(float u, float v)
86  {
87  uv.u = u;
88  uv.v = v;
89  }
90 };
91 
92 } // yage
93 
94 #endif
Definition: camera2d.hpp:17
+
1 /* ----------------------------------------------------------------------------
2  * vertex.hpp
3  *
4  * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
5  * See file LICENSE for more details
6  * ----------------------------------------------------------------------------
7  */
8 
9 #ifndef VERTEX_HPP
10 #define VERTEX_HPP
11 
12 #include <GL/glew.h>
13 
14 namespace yage {
15 
16 struct Position {
17  float x;
18  float y;
19 
20  Position() {}
21 
22  Position(float x_, float y_) : x(x_), y(y_) {}
23 };
24 
25 struct Color {
26  GLubyte r;
27  GLubyte g;
28  GLubyte b;
29  GLubyte a;
30 
31  Color() {}
32 
33  Color(GLubyte r_, GLubyte g_, GLubyte b_, GLubyte a_)
34  : r(r_), g(g_), b(b_), a(a_) {}
35 };
36 
37 struct UV {
38  float u;
39  float v;
40 
41  UV() {}
42 
43  UV(float u_, float v_) : u(u_), v(v_) {}
44 };
45 
46 struct Vertex {
47  Position position;
48  Color color;
49  UV uv;
50 
51  Vertex() {}
52 
53  Vertex(const Position& position_, const Color& color_, const UV& uv_)
54  : position(position_), color(color_), uv(uv_) {}
55 
56  void setPosition(float x, float y) {
57  position.x = x;
58  position.y = y;
59  }
60 
61  void setColor(GLubyte r, GLubyte g, GLubyte b, GLubyte a) {
62  color.r = r;
63  color.g = g;
64  color.b = b;
65  color.a = a;
66  }
67 
68  void setUv(float u, float v) {
69  uv.u = u;
70  uv.v = v;
71  }
72 };
73 
74 } // yage
75 
76 #endif
Definition: camera2d.hpp:17
-- cgit