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 "VisualizationObserver.h"
26 
27 #include <Eigen/Eigen>
28 
29 
30 namespace armarx
31 {
32  /**
33  * @brief The AdvancedVisualizationFactory class is the abstract decorator of the Decorator-Pattern and decorates the VisualizationFactoy in Simox
34  *
35  * The additional Functionality is that it can also generate the Visualization for a Manipulator
36  */
38  {
39 
40  public:
41  /**
42  * @brief getManipulatorPose
43  * @return the position of the manipulator in the gui
44  */
45  virtual Eigen::Matrix4f getManipulatorPose() = 0;
46  /**
47  * @brief getSelectedWaypoint
48  * @return the waypoint selected in the GUI
49  */
50  virtual int getSelectedWaypoint() = 0;
51  /**
52  * @brief setObserver adds a new observer to this subject, everytime the subjet changes the observer should be notified by calling its refresh method
53  * @param observer the observer to be added
54  */
56 
57  void removeObservers();
58 
59  protected:
60  std::weak_ptr<VisualizationObserver> observer;
61  };
62 }
63 
64 #endif
VisualizationObserver.h
armarx::VisualizationSubject::removeObservers
void removeObservers()
Definition: VisualizationSubject.cpp:12
armarx::VisualizationObserverPtr
std::shared_ptr< VisualizationObserver > VisualizationObserverPtr
Definition: VisualizationObserver.h:45
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:37
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::VisualizationSubject::getSelectedWaypoint
virtual int getSelectedWaypoint()=0
getSelectedWaypoint
armarx::VisualizationSubject::observer
std::weak_ptr< VisualizationObserver > observer
Definition: VisualizationSubject.h:60
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:7
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28