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
visual
Plane.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
#ifndef OMNI_VISUAL_PLANE_H_
20
#define OMNI_VISUAL_PLANE_H_
21
22
#include <functional>
23
#include <
omni/visual/VertexVBO.h
>
24
#include <
omni/visual/Interface.h
>
25
#include <
omni/visual/ContextBoundPtr.h
>
26
27
namespace
omni {
28
namespace
visual {
29
/**@brief A plane with n x m grid points
30
@detail Vertex data is not stored on host, it is copied to GPU directly.
31
Plane has dimensions [-0.5,-0.5] - [0.5,0.5]
32
**/
33
class
Plane
:
public
visual::Interface
{
34
public
:
35
typedef
std::function<void (QVector2D&, size_t, size_t)>
36
texcoord_transform_functor_type
;
37
38
Plane
();
39
~Plane
();
40
41
/// Draw plane
42
void
draw
()
const
;
43
44
/// Update mesh with texcoord transformation
45
void
update
(
texcoord_transform_functor_type
_f);
46
47
/// Update mesh (without transforming texture coordinates)
48
void
update
();
49
50
/// Return number of horizontal subdivisions
51
size_t
horizontal
()
const
;
52
53
/// Set horizontal subdivisions (does not regenerate the mesh)
54
void
setHorizontal
(
size_t
_horizontal);
55
56
/// Return number of vertical subdivisions
57
size_t
vertical
()
const
;
58
59
/// Set vertical subdivisions (does not regenerate the mesh)
60
void
setVertical
(
size_t
_vertical);
61
62
/// Set horizontal and vertical subdivisions (does not regenerate the
63
// mesh)
64
void
resize
(
size_t
_horizontal,
65
size_t
_vertical);
66
67
private
:
68
size_t
horizontal_
= 10;
69
size_t
vertical_
= 10;
70
ContextBoundPtr<VertexVBO>
vbo_
;
71
};
72
}
73
}
74
75
#endif
/* OMNI_VISUAL_PLANE_H_ */
omni::visual::Plane::horizontal
size_t horizontal() const
Return number of horizontal subdivisions.
Definition:
Plane.cpp:76
omni::visual::Plane
A plane with n x m grid points Vertex data is not stored on host, it is copied to GPU directly...
Definition:
Plane.h:33
omni::visual::Plane::vbo_
ContextBoundPtr< VertexVBO > vbo_
Definition:
Plane.h:70
omni::visual::Plane::update
void update()
Update mesh (without transforming texture coordinates)
Definition:
Plane.cpp:72
VertexVBO.h
omni::visual::Plane::horizontal_
size_t horizontal_
Definition:
Plane.h:68
omni::visual::Interface
Basic visual interface.
Definition:
Interface.h:28
omni::visual::Plane::vertical_
size_t vertical_
Definition:
Plane.h:69
omni::visual::Plane::Plane
Plane()
Definition:
Plane.cpp:24
omni::visual::Plane::resize
void resize(size_t _horizontal, size_t _vertical)
Set horizontal and vertical subdivisions (does not regenerate the.
Definition:
Plane.cpp:98
omni::visual::Plane::texcoord_transform_functor_type
std::function< void(QVector2D &, size_t, size_t)> texcoord_transform_functor_type
Definition:
Plane.h:36
omni::visual::Plane::vertical
size_t vertical() const
Return number of vertical subdivisions.
Definition:
Plane.cpp:87
ContextBoundPtr.h
Interface.h
omni::visual::Plane::setVertical
void setVertical(size_t _vertical)
Set vertical subdivisions (does not regenerate the mesh)
Definition:
Plane.cpp:91
omni::visual::Plane::setHorizontal
void setHorizontal(size_t _horizontal)
Set horizontal subdivisions (does not regenerate the mesh)
Definition:
Plane.cpp:80
omni::visual::Plane::draw
void draw() const
Draw plane.
Definition:
Plane.cpp:29
omni::visual::Plane::~Plane
~Plane()
Definition:
Plane.cpp:27
omni::visual::ContextBoundPtr
A pointer template which is free'd together with its context Holds an internal object which is respo...
Definition:
ContextBoundPtr.h:32
Generated on Fri May 20 2016 13:38:19 for Omnidome by
1.8.6