From f776df6076725d14679b31168e3ede53c966182e Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Tue, 31 Oct 2017 22:11:18 +0000 Subject: renaming base folder --- yage/base/vertex.h | 84 ------------------------------------------------------ 1 file changed, 84 deletions(-) delete mode 100644 yage/base/vertex.h (limited to 'yage/base/vertex.h') diff --git a/yage/base/vertex.h b/yage/base/vertex.h deleted file mode 100644 index 586e8190..00000000 --- a/yage/base/vertex.h +++ /dev/null @@ -1,84 +0,0 @@ -/* ---------------------------------------------------------------------------- - * vertex.h - * - * Copyright (c) 2017 Yann Herklotz Grave -- MIT License - * See file LICENSE for more details - * ---------------------------------------------------------------------------- - */ - -#ifndef VERTEX_H -#define VERTEX_H - -#include - -namespace yage -{ - -struct Position { - float x; - float y; - - Position() = default; - - Position(float x_, float y_) : x(x_), y(y_) {} -}; - -struct Color { - GLubyte r; - GLubyte g; - GLubyte b; - GLubyte a; - - Color() = default; - - Color(GLubyte r_, GLubyte g_, GLubyte b_, GLubyte a_) - : r(r_), g(g_), b(b_), a(a_) - { - } -}; - -struct UV { - float u; - float v; - - UV() = default; - - UV(float u_, float v_) : u(u_), v(v_) {} -}; - -struct Vertex { - Position position; - Color color; - UV uv; - - Vertex() = default; - - Vertex(const Position &position_, const Color &color_, const UV &uv_) - : position(position_), color(color_), uv(uv_) - { - } - - void setPosition(float x, float y) - { - position.x = x; - position.y = y; - } - - 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) - { - uv.u = u; - uv.v = v; - } -}; - -} // namespace yage - -#endif -- cgit