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_ORTHOVIEWCONTROLLER_HH_
18 #define _GAZEBO_ORTHOVIEWCONTROLLER_HH_
19 
20 #include <string>
21 
23 #include "gazebo/math/Vector2i.hh"
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: OrthoViewController(UserCameraPtr _camera);
43 
45  public: virtual ~OrthoViewController();
46 
48  public: virtual void Init();
49 
50  // Documentation inherited
51  public: virtual void Init(const math::Vector3 &_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 math::Vector2i &_point = math::Vector2i(0, 0));
67 
68  // Documentation inherited
69  public: virtual void Resize(const unsigned int _width,
70  const unsigned int _height);
71 
79  private: Ogre::Matrix4 BuildScaledOrthoMatrix(
80  const float _left, const float _right,
81  const float _bottom, const float _top,
82  const float _near, const float _far) const;
83 
84 
86  private: OrthoViewControllerPrivate *dataPtr;
87  };
89  }
90 }
91 #endif
Generic description of a mouse event.
Definition: MouseEvent.hh:35
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
Generic integer x, y vector.
Definition: Vector2i.hh:36
Orbit view controller.
Definition: OrbitViewController.hh:36
Orthographic view controller.
Definition: OrthoViewController.hh:38
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:91
Definition: OrthoViewControllerPrivate.hh:26
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66