Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PeripheralSetup.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_PROJ_PERIPHERALSETUP_H_
21 #define OMNI_PROJ_PERIPHERALSETUP_H_
22 
23 #include "AngleSetup.h"
24 
25 namespace omni {
26  namespace proj {
27  /**@brief Setup in which projector rotates with yaw angle around center point
28  **/
29  class PeripheralSetup : public AngleSetup {
30  public:
32 
34 
35  /// Serialize to stream
36  void toPropertyMap(PropertyMap&) const;
37 
38  /// Deserialize from stream
39  void fromPropertyMap(PropertyMap const&);
40 
41  /// Setup projector with scene scale factor
42  void setup(Projector&);
43 
44  /// Delta yaw angle from rotating yaw angle
45  Angle deltaYaw() const;
46 
47  /// Delta yaw angle from rotating yaw angle
48  void setDeltaYaw(Angle);
49 
50  /// Return distance from center
51  qreal distanceCenter() const;
52 
53  /// Set distance to center
54  void setDistanceCenter(qreal);
55 
56  /// Return tower height (z position)
57  qreal towerHeight() const;
58 
59  /// Set tower height (z position of projector)
60  void setTowerHeight(qreal);
61 
62  /// Distance to centric line
63  qreal shift() const;
64 
65  /// Set shift (distance to centric line)
66  void setShift(qreal);
67 
68  /// Scale projector setup by factor
69  void scale(qreal);
70 
71  private:
72  Angle deltaYaw_ = 0.0;
73  qreal distanceCenter_ = 0.4;
74  qreal towerHeight_ = 0.2;
75  qreal shift_ = 0.0;
76  };
77  }
78 }
79 
80 #endif /* OMNI_PROJ_PERIPHERALSETUP_H_ */
A projector with a transformation matrix and setup.
Definition: Projector.h:32
void fromPropertyMap(PropertyMap const &)
Deserialize from stream.
Definition: PeripheralSetup.cpp:43
qreal shift_
Definition: PeripheralSetup.h:75
qreal distanceCenter() const
Return distance from center.
Definition: PeripheralSetup.cpp:79
PeripheralSetup()
Definition: PeripheralSetup.cpp:30
void setTowerHeight(qreal)
Set tower height (z position of projector)
Definition: PeripheralSetup.cpp:94
void setDeltaYaw(Angle)
Delta yaw angle from rotating yaw angle.
Definition: PeripheralSetup.cpp:74
qreal shift() const
Distance to centric line.
Definition: PeripheralSetup.cpp:99
void setup(Projector &)
Setup projector with scene scale factor.
Definition: PeripheralSetup.cpp:52
Basic projector setup with three euler angles and no positioning offsets.
Definition: AngleSetup.h:29
qreal distanceCenter_
Definition: PeripheralSetup.h:73
void setDistanceCenter(qreal)
Set distance to center.
Definition: PeripheralSetup.cpp:84
Angle deltaYaw() const
Delta yaw angle from rotating yaw angle.
Definition: PeripheralSetup.cpp:69
#define OMNI_REGISTER_CLASS(FACTORY, CLASS_NAME)
Definition: TypeIdInterface.h:43
qreal towerHeight_
Definition: PeripheralSetup.h:74
Setup in which projector rotates with yaw angle around center point.
Definition: PeripheralSetup.h:29
void scale(qreal)
Scale projector setup by factor.
Definition: PeripheralSetup.cpp:109
void toPropertyMap(PropertyMap &) const
Serialize to stream.
Definition: PeripheralSetup.cpp:34
void setShift(qreal)
Set shift (distance to centric line)
Definition: PeripheralSetup.cpp:104
qreal towerHeight() const
Return tower height (z position)
Definition: PeripheralSetup.cpp:89
Angle deltaYaw_
Definition: PeripheralSetup.h:72
The central factory class.
Definition: factory.hpp:38