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;
Generic description of a mouse event.
Definition: MouseEvent.hh:35
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:92
float distance
Distance to the focal point.
Definition: OrbitViewController.hh:128
Forward declarations for the common classes.
Definition: Animation.hh:33
VisualPtr refVisual
A reference visual.
Definition: OrbitViewController.hh:131
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
Orbit view controller.
Definition: OrbitViewController.hh:38
float yaw
Yaw value.
Definition: OrbitViewController.hh:122
ignition::math::Vector3d focalPoint
The focal point.
Definition: OrbitViewController.hh:141
float pitch
Pitch value.
Definition: OrbitViewController.hh:125
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:112
bool init
A flag used to inidicate that the view controller has just been initialized.
Definition: OrbitViewController.hh:138
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:134
Base class for view controllers.
Definition: ViewController.hh:34