Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef RVIZ_FIXED_ORIENTATION_ORTHO_VIEW_CONTROLLER_H
00031 #define RVIZ_FIXED_ORIENTATION_ORTHO_VIEW_CONTROLLER_H
00032
00033 #include "rviz/view_controller.h"
00034
00035 #include <OGRE/OgreQuaternion.h>
00036
00037 namespace ogre_tools
00038 {
00039 class Shape;
00040 class SceneNode;
00041 }
00042
00043 namespace rviz
00044 {
00045
00046 class FixedOrientationOrthoViewController : public ViewController
00047 {
00048 public:
00049 FixedOrientationOrthoViewController(VisualizationManager* manager, const std::string& name, Ogre::SceneNode* target_scene_node);
00050 virtual ~FixedOrientationOrthoViewController();
00051
00052 virtual void handleMouseEvent(ViewportMouseEvent& evt);
00053 virtual void fromString(const std::string& str);
00054 virtual std::string toString();
00055
00056 virtual void lookAt( const Ogre::Vector3& point_rel_world );
00057
00058 static std::string getClassNameStatic() { return "rviz::FixedOrientationOrthoViewController"; }
00059 virtual std::string getClassName() { return getClassNameStatic(); }
00060
00061 protected:
00062 virtual void onActivate();
00063 virtual void onDeactivate();
00064 virtual void onUpdate(float dt, float ros_dt);
00065 virtual void onTargetFrameChanged(const Ogre::Vector3& old_reference_position, const Ogre::Quaternion& old_reference_orientation);
00066
00068 void orientCamera();
00069
00070 void setPosition( const Ogre::Vector3& pos_rel_target );
00071 void move( float x, float y );
00072 void updateCamera();
00073
00074 float scale_;
00075 float angle_;
00076 };
00077
00078 }
00079
00080 #endif // RVIZ_VIEW_CONTROLLER_H