Omnidome
Fulldome Mapping Software Toolkit
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
include
omni
input
TestImage.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_INPUT_TESTIMAGE_H_
21
#define OMNI_INPUT_TESTIMAGE_H_
22
23
#include <QOpenGLShaderProgram>
24
#include <QOpenGLFramebufferObject>
25
#include <
omni/input/Framebuffer.h
>
26
#include <
omni/visual/ContextBoundPtr.h
>
27
28
namespace
omni {
29
namespace
input {
30
/**@brief Abstract class for test images that are generated with a shader
31
**/
32
class
TestImage
:
33
public
Framebuffer
{
34
public
:
35
TestImage
(
Interface
const
*_parent =
nullptr
);
36
virtual
~TestImage
() {}
37
38
/// Update framebuffer image
39
virtual
void
update
();
40
41
virtual
void
destroy
();
42
43
/// Return ruler position
44
QPointF
rulerPos
()
const
;
45
46
/// Set ruler position
47
void
setRulerPos
(QPointF
const
&);
48
49
/// Serialize to stream
50
virtual
void
toPropertyMap
(PropertyMap&)
const
;
51
52
/// Deserialize from stream
53
virtual
void
fromPropertyMap
(PropertyMap
const
&);
54
55
inline
virtual
categoryset_type
categories
()
const
{
56
return
categoryset_type
({
"Test images"
});
57
}
58
59
protected
:
60
/**@brief Virtual method to handle additional shader uniforms in derived classes
61
**/
62
virtual
void
shaderUniformHandler
();
63
64
ContextBoundPtr<QOpenGLShaderProgram>
shader_
;
65
66
private
:
67
/// String representing the fragment shader source
68
virtual
QString
fragmentShaderSource
()
const
= 0;
69
70
/// String representing the vertex shader source
71
virtual
QString
vertexShaderSource
()
const
= 0;
72
73
QPointF
rulerPos_
;
74
};
75
}
76
}
77
78
#endif
/* OMNI_INPUT_TESTIMAGE_H_ */
Framebuffer.h
omni::input::TestImage::rulerPos
QPointF rulerPos() const
Return ruler position.
Definition:
TestImage.cpp:49
omni::input::TestImage::~TestImage
virtual ~TestImage()
Definition:
TestImage.h:36
omni::input::TestImage::shaderUniformHandler
virtual void shaderUniformHandler()
Virtual method to handle additional shader uniforms in derived classes.
Definition:
TestImage.cpp:54
omni::input::TestImage::rulerPos_
QPointF rulerPos_
Definition:
TestImage.h:73
omni::input::TestImage::shader_
ContextBoundPtr< QOpenGLShaderProgram > shader_
Definition:
TestImage.h:64
omni::input::Interface::categoryset_type
std::set< QString > categoryset_type
Definition:
Interface.h:64
omni::input::TestImage::fromPropertyMap
virtual void fromPropertyMap(PropertyMap const &)
Deserialize from stream.
Definition:
TestImage.cpp:100
omni::input::TestImage::setRulerPos
void setRulerPos(QPointF const &)
Set ruler position.
Definition:
TestImage.cpp:44
omni::input::TestImage::vertexShaderSource
virtual QString vertexShaderSource() const =0
String representing the vertex shader source.
omni::input::TestImage::TestImage
TestImage(Interface const *_parent=nullptr)
Definition:
TestImage.cpp:32
omni::input::TestImage::fragmentShaderSource
virtual QString fragmentShaderSource() const =0
String representing the fragment shader source.
omni::input::Framebuffer
Input object that is renderer to a framebuffer.
Definition:
Framebuffer.h:30
omni::input::Interface
Generic input interface.
Definition:
Interface.h:53
ContextBoundPtr.h
omni::input::TestImage::toPropertyMap
virtual void toPropertyMap(PropertyMap &) const
Serialize to stream.
Definition:
TestImage.cpp:94
omni::input::TestImage::destroy
virtual void destroy()
Definition:
TestImage.cpp:38
omni::input::TestImage::update
virtual void update()
Update framebuffer image.
Definition:
TestImage.cpp:59
omni::input::TestImage::categories
virtual categoryset_type categories() const
Input can have a fixed set of categories.
Definition:
TestImage.h:55
omni::input::TestImage
Abstract class for test images that are generated with a shader.
Definition:
TestImage.h:32
Generated on Fri May 20 2016 13:38:19 for Omnidome by
1.8.6