Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Interface.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-2016 "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_INTERFACE_H_
21 #define OMNI_VISUAL_INTERFACE_H_
22 
23 #include <QOpenGLFunctions>
24 
25 namespace omni {
26  namespace visual {
27  /// Basic visual interface
28  class Interface {
29  public:
30  virtual ~Interface() {}
31 
32  /// Abstract method for visualing
33  virtual void draw() const = 0;
34 
35  /// Update geometry
36  inline virtual void update()
37  {}
38 
39  protected:
40  /// glVertex3f from QVector3D
41  static void vertex3(QVector3D const&);
42 
43  /// Draws a line
44  static void visualLine(QVector3D const& _from,
45  QVector3D const& _to);
46 
47  /// glColor4f from QColor
48  static void color(QColor _color,
49  float _alpha = 1.0);
50  };
51  }
52 }
53 
54 
55 #endif /* OMNI_VISUAL_INTERFACE_H_ */
static void vertex3(QVector3D const &)
glVertex3f from QVector3D
Definition: Interface.cpp:27
virtual void update()
Update geometry.
Definition: Interface.h:36
static void visualLine(QVector3D const &_from, QVector3D const &_to)
Draws a line.
Definition: Interface.cpp:32
Basic visual interface.
Definition: Interface.h:28
virtual ~Interface()
Definition: Interface.h:30
static void color(QColor _color, float _alpha=1.0)
glColor4f from QColor
Definition: Interface.cpp:40
virtual void draw() const =0
Abstract method for visualing.