Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Rectangle.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-2015 "Omnidome" by cr8tr
2  * Dome Mapping Projection Software (http://omnido.me).
3  * Omnidome was created by Michael Winkelmann aka Wilston Oreo (@WilstonOreo)
4  *
5  * This file is part of Omnidome.
6  *
7  * Omnidome is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as
9  * published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Affero General Public License for more details.
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OMNI_VISUAL_RECTANGLE_H_
21 #define OMNI_VISUAL_RECTANGLE_H_
22 
23 #include <QRectF>
24 
25 namespace omni {
26  namespace visual {
27  /// Visualizer helper class for drawing a rectangle in an OpenGL context
28  struct Rectangle
29  {
30  /// Draw rectangle from border coordinates
31  static void draw(float _left = -0.5,
32  float _right = 0.5,
33  float _top = 0.5,
34  float _bottom = -0.5);
35 
36  static void draw(QSize const& _size);
37 
38  /// Draw rectangle from given QRectF
39  static void draw(QRectF const&);
40 
41  /// Draw rectangle from border coordinates, flipped on y axis version
42  static void drawFlipped(float _left = -0.5,
43  float _right = 0.5,
44  float _top = 0.5,
45  float _bottom = -0.5);
46 
47  /// Draw rectangle from given QRectF, flipped on y axis version
48  static void drawFlipped(QRectF const&);
49  };
50  }
51 }
52 
53 #endif /* OMNI_VISUAL_RECTANGLE_H_ */
static void drawFlipped(float _left=-0.5, float _right=0.5, float _top=0.5, float _bottom=-0.5)
Draw rectangle from border coordinates, flipped on y axis version.
Definition: Rectangle.cpp:68
static void draw(float _left=-0.5, float _right=0.5, float _top=0.5, float _bottom=-0.5)
Draw rectangle from border coordinates.
Definition: Rectangle.cpp:28
Visualizer helper class for drawing a rectangle in an OpenGL context.
Definition: Rectangle.h:28