VisualizationSubject.h
Go to the documentation of this file.
1 
2 /* This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ArmarXGuiPlugins::RobotTrajectoryDesigner::Visualization
17 * @author Timo Birr
18 * @date 2018
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 #ifndef VisualizationSubject_H
23 #define VisualizationSubject_H
24 
25 #include <Eigen/Eigen>
26 
27 #include "VisualizationObserver.h"
28 
29 namespace armarx
30 {
31  /**
32  * @brief The AdvancedVisualizationFactory class is the abstract decorator of the Decorator-Pattern and decorates the VisualizationFactoy in Simox
33  *
34  * The additional Functionality is that it can also generate the Visualization for a Manipulator
35  */
37  {
38 
39  public:
40  /**
41  * @brief getManipulatorPose
42  * @return the position of the manipulator in the gui
43  */
44  virtual Eigen::Matrix4f getManipulatorPose() = 0;
45  /**
46  * @brief getSelectedWaypoint
47  * @return the waypoint selected in the GUI
48  */
49  virtual int getSelectedWaypoint() = 0;
50  /**
51  * @brief setObserver adds a new observer to this subject, everytime the subjet changes the observer should be notified by calling its refresh method
52  * @param observer the observer to be added
53  */
55 
56  void removeObservers();
57 
58  protected:
59  std::weak_ptr<VisualizationObserver> observer;
60  };
61 } // namespace armarx
62 
63 #endif
VisualizationObserver.h
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:650
armarx::VisualizationSubject::removeObservers
void removeObservers()
Definition: VisualizationSubject.cpp:14
armarx::VisualizationObserverPtr
std::shared_ptr< VisualizationObserver > VisualizationObserverPtr
Definition: VisualizationObserver.h:44
armarx::VisualizationSubject::getManipulatorPose
virtual Eigen::Matrix4f getManipulatorPose()=0
getManipulatorPose
armarx::VisualizationSubject
The AdvancedVisualizationFactory class is the abstract decorator of the Decorator-Pattern and decorat...
Definition: VisualizationSubject.h:36
armarx::VisualizationSubject::getSelectedWaypoint
virtual int getSelectedWaypoint()=0
getSelectedWaypoint
armarx::VisualizationSubject::observer
std::weak_ptr< VisualizationObserver > observer
Definition: VisualizationSubject.h:59
armarx::VisualizationSubject::setObserver
void setObserver(VisualizationObserverPtr observer)
setObserver adds a new observer to this subject, everytime the subjet changes the observer should be ...
Definition: VisualizationSubject.cpp:8
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27