17 #ifndef GAZEBO_RENDERING_ORBITVIEWCONTROLLER_HH_
18 #define GAZEBO_RENDERING_ORBITVIEWCONTROLLER_HH_
22 #include <ignition/math/Vector3.hh>
46 const std::string &_name =
"OrbitViewController");
52 public:
virtual void Init();
60 public:
virtual void Init(
const ignition::math::Vector3d &_focalPoint,
61 const double _yaw = 0,
const double _pitch = 0);
64 public:
virtual void Update();
72 public:
static std::string GetTypeString();
76 public:
void SetDistance(
float _d);
86 public:
void SetFocalPoint(
const ignition::math::Vector3d &_fp);
95 public: ignition::math::Vector3d FocalPoint()
const;
98 public:
void HandleKeyReleaseEvent(
const std::string &_key);
101 public:
virtual void HandleKeyPressEvent(
const std::string &_key);
103 public:
double Pitch()
const;
105 public:
double Yaw()
const;
121 protected:
void TranslateLocal(
const ignition::math::Vector3d &_vec);
125 protected:
void TranslateGlobal(
const ignition::math::Vector3d &_vec);
129 protected:
void Zoom(
float _amount);
134 protected:
double NormalizeYaw(
double _v);
139 protected:
double NormalizePitch(
double _v);
142 protected:
void UpdateRefVisual();
147 protected:
void Orbit(
double _dy,
double _dp);
162 protected: std::string
key;
Generic description of a mouse event.
Definition: MouseEvent.hh:35
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:93
float distance
Distance to the focal point.
Definition: OrbitViewController.hh:156
VisualPtr refVisual
A reference visual.
Definition: OrbitViewController.hh:159
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
Orbit view controller.
Definition: OrbitViewController.hh:38
float yaw
Yaw value.
Definition: OrbitViewController.hh:150
ignition::math::Vector3d focalPoint
The focal point.
Definition: OrbitViewController.hh:169
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
float pitch
Pitch value.
Definition: OrbitViewController.hh:153
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:113
bool init
A flag used to inidicate that the view controller has just been initialized.
Definition: OrbitViewController.hh:166
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
std::string key
Key that is currently pressed.
Definition: OrbitViewController.hh:162
Base class for view controllers.
Definition: ViewController.hh:42