17 #ifndef _ORBITVIEWCONTROLLER_HH_
18 #define _ORBITVIEWCONTROLLER_HH_
22 #include <ignition/math/Vector3.hh>
46 const std::string &_name =
"OrbitViewController");
52 public:
virtual void Init();
56 const double _yaw = 0,
const double _pitch = 0);
59 public:
virtual void Update();
67 public:
static std::string GetTypeString();
71 public:
void SetDistance(
float _d);
82 public:
void HandleKeyReleaseEvent(
const std::string &_key);
85 public:
virtual void HandleKeyPressEvent(
const std::string &_key);
87 public:
double Pitch()
const;
89 public:
double Yaw()
const;
101 protected:
void Zoom(
float _amount);
106 protected:
double NormalizeYaw(
double _v);
111 protected:
double NormalizePitch(
double _v);
114 protected:
void UpdateRefVisual();
119 protected:
void Orbit(
double _dy,
double _dp);
134 protected: std::string
key;
float distance
Distance to the focal point.
Definition: OrbitViewController.hh:128
Generic description of a mouse event.
Definition: MouseEvent.hh:35
float pitch
Pitch value.
Definition: OrbitViewController.hh:125
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
Orbit view controller.
Definition: OrbitViewController.hh:38
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:112
ignition::math::Vector3d focalPoint
The focal point.
Definition: OrbitViewController.hh:141
float yaw
Yaw value.
Definition: OrbitViewController.hh:122
#define GZ_RENDERING_VISIBLE
Definition: system.hh:209
VisualPtr refVisual
A reference visual.
Definition: OrbitViewController.hh:131
bool init
A flag used to inidicate that the view controller has just been initialized.
Definition: OrbitViewController.hh:138
std::string key
Key that is currently pressed.
Definition: OrbitViewController.hh:134
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:92
Base class for view controllers.
Definition: ViewController.hh:34