Gazebo Rendering

API Reference

8.2.0
OgreLensFlarePass.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 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_OGRE_OGRELENSFLAREPASS_HH_
18 #define GZ_RENDERING_OGRE_OGRELENSFLAREPASS_HH_
19 
20 #include <memory>
21 
22 #include <gz/utils/ImplPtr.hh>
23 
24 #include "gz/math/Vector3.hh"
25 
27 #include "gz/rendering/ogre/Export.hh"
29 
30 namespace gz
31 {
32  namespace rendering
33  {
34  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
35 
37  class GZ_RENDERING_OGRE_VISIBLE OgreLensFlarePass :
38  public BaseLensFlarePass<OgreRenderPass>
39  {
41  public: OgreLensFlarePass();
42 
44  public: ~OgreLensFlarePass() override;
45 
46  // Documentation inherited
47  public: void Init(ScenePtr _scene) override;
48 
49  // Documentation inherited
50  public: void Destroy() override;
51 
52  // Documentation inherited
53  public: void CreateRenderPass() override;
54 
55  // Documentation inherited
56  public: void PreRender(const CameraPtr &_camera) override;
57 
58  // Documentation inherited
59  public: void PostRender() override;
60 
61  // Documentation inherited
62  public: void SetScale(double _scale) override;
63 
64  // Documentation inherited
65  public: double Scale() const override;
66 
67  // Documentation inherited
68  public: void SetColor(const math::Vector3d &_color) override;
69 
70  // Documentation inherited
71  public: const math::Vector3d &Color() const override;
72 
73  // Documentation inherited
74  public: void SetOcclusionSteps(uint32_t _occlusionSteps) override;
75 
76  // Documentation inherited
77  public: uint32_t OcclusionSteps() const override;
78 
86  private: double OcclusionScale(const math::Vector3d &_imgPos,
87  uint32_t _faceIdx);
88 
91  GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
93 
94  private: friend class OgreLensFlareCompositorListenerPrivate;
95  };
96  }
97  }
98 }
99 #endif