OrthoViewController.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef GAZEBO_RENDERING_ORTHOVIEWCONTROLLER_HH_
18 #define GAZEBO_RENDERING_ORTHOVIEWCONTROLLER_HH_
19 
20 #include <string>
21 #include <ignition/math/Vector2.hh>
22 
24 #include "gazebo/util/system.hh"
25 
26 namespace gazebo
27 {
28  namespace rendering
29  {
30  // Forward declare private data pointer.
31  class OrthoViewControllerPrivate;
32 
35 
39  {
42  public: explicit OrthoViewController(UserCameraPtr _camera);
43 
45  public: virtual ~OrthoViewController();
46 
48  public: virtual void Init();
49 
50  // Documentation inherited
52  public: virtual void Init(const math::Vector3 &_focalPoint,
53  const double _yaw = 0, const double _pitch = 0) GAZEBO_DEPRECATED(8.0);
54 
55  // Documentation inherited
56  public: virtual void Init(const ignition::math::Vector3d &_focalPoint,
57  const double _yaw = 0, const double _pitch = 0);
58 
61  public: static std::string GetTypeString();
62 
65  public: virtual void HandleMouseEvent(const common::MouseEvent &_event);
66 
70  private: void Zoom(const float _amount,
71  const ignition::math::Vector2i &_point =
72  ignition::math::Vector2i(0, 0));
73 
74  // Documentation inherited
75  public: virtual void Resize(const unsigned int _width,
76  const unsigned int _height);
77 
85  private: Ogre::Matrix4 BuildScaledOrthoMatrix(
86  const float _left, const float _right,
87  const float _bottom, const float _top,
88  const float _near, const float _far) const;
89 
90 
92  private: OrthoViewControllerPrivate *dataPtr;
93  };
95  }
96 }
97 #endif
Generic description of a mouse event.
Definition: MouseEvent.hh:35
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:93
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
Orbit view controller.
Definition: OrbitViewController.hh:38
Orthographic view controller.
Definition: OrthoViewController.hh:38
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:58