Gazebo Rendering

API Reference

9.0.0
Ogre2LensFlarePass.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_OGRE2_OGRE2LENSFLAREPASS_HH_
18#define GZ_RENDERING_OGRE2_OGRE2LENSFLAREPASS_HH_
19
20#include <memory>
21
22#include <gz/utils/ImplPtr.hh>
23
24#include "gz/math/Vector3.hh"
25
27#include "gz/rendering/ogre2/Export.hh"
29
30namespace gz
31{
32 namespace rendering
33 {
34 inline namespace GZ_RENDERING_VERSION_NAMESPACE {
35
37 class GZ_RENDERING_OGRE2_VISIBLE Ogre2LensFlarePass :
38 public BaseLensFlarePass<Ogre2RenderPass>
39 {
42
44 public: ~Ogre2LensFlarePass() override;
45
46 // Documentation inherited
47 public: void Init(ScenePtr _scene) override;
48
49 // Documentation inherited
50 public: void PreRender(const CameraPtr &_camera) override;
51
52 // Documentation inherited
53 public: void PostRender() override;
54
55 // Documentation inherited
56 public: void SetScale(double _scale) override;
57
58 // Documentation inherited
59 public: double Scale() const override;
60
61 // Documentation inherited
62 public: void SetColor(const math::Vector3d &_color) override;
63
64 // Documentation inherited
65 public: const math::Vector3d &Color() const override;
66
67 // Documentation inherited
68 public: void SetOcclusionSteps(uint32_t _occlusionSteps) override;
69
70 // Documentation inherited
71 public: uint32_t OcclusionSteps() const override;
72
73 // Documentation inherited
74 public: void WorkspaceAdded(
75 Ogre::CompositorWorkspace *_workspace) override;
76
77 // Documentation inherited
78 public: void WorkspaceRemoved(
79 Ogre::CompositorWorkspace *_workspace) override;
80
81 // Documentation inherited
82 public: virtual void Destroy() override;
83
91 private: double OcclusionScale(const math::Vector3d &_imgPos,
92 uint32_t _faceIdx);
93
96 GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
98
99 private: friend class Ogre2LensFlarePassWorkspaceListenerPrivate;
100 };
101 }
102 }
103}
104#endif