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
51  public: virtual void Init(const ignition::math::Vector3d &_focalPoint,
52  const double _yaw = 0, const double _pitch = 0);
53 
56  public: static std::string GetTypeString();
57 
60  public: virtual void HandleMouseEvent(const common::MouseEvent &_event);
61 
65  private: void Zoom(const float _amount,
66  const ignition::math::Vector2i &_point =
67  ignition::math::Vector2i(0, 0));
68 
69  // Documentation inherited
70  public: virtual void Resize(const unsigned int _width,
71  const unsigned int _height);
72 
80  private: Ogre::Matrix4 BuildScaledOrthoMatrix(
81  const float _left, const float _right,
82  const float _bottom, const float _top,
83  const float _near, const float _far) const;
84 
85 
87  private: OrthoViewControllerPrivate *dataPtr;
88  };
90  }
91 }
92 #endif
Generic description of a mouse event.
Definition: MouseEvent.hh:35
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:93
Forward declarations for the common classes.
Definition: Animation.hh:33
Orbit view controller.
Definition: OrbitViewController.hh:37
Orthographic view controller.
Definition: OrthoViewController.hh:38
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