zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Logo.h
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2  * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3  *
4  * zenilib is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * zenilib is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
32 #ifndef ZENI_LOGO_H
33 #define ZENI_LOGO_H
34 
35 #include <Zeni/Color.h>
36 #include <Zeni/Coordinate.h>
37 
38 namespace Zeni {
39 
40  class Vertex_Buffer;
41 
42  class ZENI_REST_DLL Logo {
43  public:
44  Logo(const Point2f &upper_left, const float &height, const Color &logo_color, const Color &text_color);
45  ~Logo();
46 
47  Logo(const Logo &rhs);
48  Logo & operator=(const Logo &rhs);
49 
50  void render();
51 
52  private:
53  Point2f get_p00(const Point2f &upper_left, const float &height);
54  Point2f get_p10(const Point2f &upper_left, const float &height);
55  Point2f get_p20(const Point2f &upper_left, const float &height);
56  Point2f get_p01(const Point2f &upper_left, const float &height);
57  Point2f get_p11(const Point2f &upper_left, const float &height);
58  Point2f get_p21(const Point2f &upper_left, const float &height);
59  Point2f get_p02(const Point2f &upper_left, const float &height);
60  Point2f get_p12(const Point2f &upper_left, const float &height);
61  Point2f get_p22(const Point2f &upper_left, const float &height);
62  float get_thickness(const float &height);
63 
64  void create_all();
65 
66  void create_logo(const Point2f &upper_left, const float &height);
67 
68  void create_z(const Point2f &upper_left, const float &height);
69  void create_e(const Point2f &upper_left, const float &height);
70  void create_n(const Point2f &upper_left, const float &height);
71  void create_i(const Point2f &upper_left, const float &height);
72  void create_p(const Point2f &upper_left, const float &height);
73  void create_x(const Point2f &upper_left, const float &height);
74 
75  void create_thick_line(const Point2f &p0, const Point2f &p1, const float &thickness, const Color &color);
76  void create_circle(const Point2f &p, const float &radius, const Color &color, const size_t &segments, const size_t &begin = 0u, const size_t &end = size_t(-1));
77  void create_hollow_ellipse(const Point2f &p, const Point2f &inner_radius, const Point2f &outer_radius, const Color &color, const size_t &segments, const size_t &begin = 0u, const size_t &end = size_t(-1));
78 
79  Point2f m_upper_left;
80  float m_height;
81  Color m_logo_color;
82  Color m_text_color;
83 
84  Vertex_Buffer * m_vbo;
85  };
86 
87 }
88 
89 #endif
Logo.
Definition: Logo.h:42
GLuint color
Definition: glew.h:7185
static void render(const Vertex_Buffer_Macrorenderer &macrorenderer, std::vector< Vertex_Buffer::Vertex_Buffer_Range * > &descriptors)
EGLSurface EGLint EGLint EGLint EGLint height
Definition: eglext.h:293
ALuint u
Definition: alMain.h:58
GLfloat GLfloat p
Definition: glew.h:14938
A Vertex_Buffer that accepts Triangle and Quadrilaterals.
Definition: Vertex_Buffer.h:85
GLuint GLuint end
Definition: glew.h:1239
A 2D Point represented with floats.
Definition: Coordinate.h:98
Color.
Definition: Color.h:41