Gazebo Rendering

API Reference

3.7.2
gz/rendering/ogre2/Ogre2Camera.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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 GZ_RENDERING_OGRE2_OGRE2CAMERA_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2CAMERA_HH_
19 
23 
24 namespace Ogre
25 {
26  class Camera;
27 }
28 
29 namespace ignition
30 {
31  namespace rendering
32  {
33  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
34  //
35  // forward declaration
36  class Ogre2SelectionBuffer;
37 
39  class IGNITION_RENDERING_OGRE2_VISIBLE Ogre2Camera :
40  public BaseCamera<Ogre2Sensor>
41  {
43  protected: Ogre2Camera();
44 
46  public: virtual ~Ogre2Camera();
47 
48  // Documenation inherited.
49  public: virtual void SetHFOV(const math::Angle &_hfov) override;
50 
51  // Documenation inherited.
52  public: virtual double AspectRatio() const override;
53 
54  // Documenation inherited.
55  public: virtual void SetAspectRatio(const double _ratio) override;
56 
57  // Documenation inherited.
58  public: virtual unsigned int AntiAliasing() const override;
59 
60  // Documenation inherited.
61  public: virtual void SetAntiAliasing(const unsigned int _aa) override;
62 
63  // Documenation inherited.
64  public: virtual void SetFarClipPlane(const double _far) override;
65 
66  // Documenation inherited.
67  public: virtual void SetNearClipPlane(const double _near) override;
68 
69  public: virtual math::Color BackgroundColor() const;
70 
71  public: virtual void SetBackgroundColor(const math::Color &_color);
72 
73  // Documenation inherited.
74  public: virtual void Render() override;
75 
76  // Documenation inherited.
77  public: virtual RenderWindowPtr CreateRenderWindow() override;
78 
79  // Documenation inherited.
80  public: virtual math::Matrix4d ProjectionMatrix() const override;
81 
82  // Documenation inherited.
83  public: virtual math::Matrix4d ViewMatrix() const override;
84 
85  // Documentation inherited
86  public: virtual VisualPtr VisualAt(const gz::math::Vector2i
87  &_mousePos) override;
88 
89  // Documentation Inherited.
90  // \sa Camera::SetMaterial(const MaterialPtr &)
91  public: virtual void SetMaterial(
92  const MaterialPtr &_material) override;
93 
94  // Documentation inherited.
95  public: virtual unsigned int RenderTextureGLId() const override;
96 
97  // Documentation inherited.
98  public: virtual void Destroy() override;
99 
100  public: Ogre::Camera *OgreCamera() const;
101 
102  // Documenation inherited.
103  protected: virtual RenderTargetPtr RenderTarget() const override;
104 
105  // Documenation inherited.
106  protected: virtual void Init() override;
107 
109  protected: virtual void CreateRenderTexture();
110 
113  protected: virtual void SetSelectionBuffer();
114 
116  private: void CreateCamera();
117 
119  protected: Ogre::Camera *ogreCamera = nullptr;
120 
122  protected: Ogre2SelectionBuffer *selectionBuffer = nullptr;
123 
126 
129 
131  private: friend class Ogre2Scene;
132 
135  private: friend class Ogre2RayQuery;
136  };
137  }
138  }
139 }
140 #endif
Definition: gz/rendering/ogre/OgreCamera.hh:27
STL class.
math::Color backgroundColor
Color of background.
Definition: gz/rendering/ogre2/Ogre2Camera.hh:128
Ogre2RenderTargetPtr renderTexture
Pointer to render texture.
Definition: gz/rendering/ogre2/Ogre2Camera.hh:125
Generates a selection buffer object for a given camera. The selection buffer is used of entity select...
Definition: gz/rendering/ogre2/Ogre2SelectionBuffer.hh:47
A Ray Query class used for computing ray object intersections.
Definition: gz/rendering/ogre2/Ogre2RayQuery.hh:39
Ogre2.x implementation of the scene class.
Definition: gz/rendering/ogre2/Ogre2Scene.hh:41
Represents a render-target to which cameras can render images.
Definition: gz/rendering/RenderTarget.hh:37
Definition: gz/rendering/ogre/OgreCamera.hh:41
Ogre2.x implementation of the camera class.
Definition: gz/rendering/ogre2/Ogre2Camera.hh:39
Definition: gz/rendering/base/BaseCamera.hh:44