Gazebo Rendering

API Reference

6.6.3
gz/rendering/base/BaseRenderPass.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 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_BASE_BASERENDERPASS_HH_
18 #define GZ_RENDERING_BASE_BASERENDERPASS_HH_
19 
20 #include <string>
22 
23 namespace ignition
24 {
25  namespace rendering
26  {
27  inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
28  //
29  /* \class BaseRenderPass BaseRenderPass.hh \
30  * ignition/rendering/base/BaseRenderPass.hh
31  */
33  template <class T>
35  public virtual RenderPass,
36  public T
37  {
39  protected: BaseRenderPass();
40 
42  public: virtual ~BaseRenderPass();
43 
44  // Documentation inherited
45  public: virtual void SetEnabled(bool _enabled) override;
46 
47  // Documentation inherited
48  public: virtual bool IsEnabled() const override;
49 
51  protected: bool enabled = true;
52  };
53 
55  // BaseRenderPass
57  template <class T>
59  {
60  }
61 
63  template <class T>
65  {
66  }
67 
69  template <class T>
70  void BaseRenderPass<T>::SetEnabled(bool _enabled)
71  {
72  this->enabled = _enabled;
73  }
74 
76  template <class T>
78  {
79  return this->enabled;
80  }
81  }
82  }
83 }
84 #endif
BaseRenderPass()
Constructor.
Definition: gz/rendering/base/BaseRenderPass.hh:58
virtual void SetEnabled(bool _enabled) override
Set to enable or disable the render pass.
Definition: gz/rendering/base/BaseRenderPass.hh:70
virtual bool IsEnabled() const override
Get whether or not the render pass is enabled.
Definition: gz/rendering/base/BaseRenderPass.hh:77
virtual ~BaseRenderPass()
Destructor.
Definition: gz/rendering/base/BaseRenderPass.hh:64
bool enabled
Flag to indicate if render pass is enabled or not.
Definition: gz/rendering/base/BaseRenderPass.hh:51
A render pass can be added to a camera to affect how the scene is rendered. It can be used to add pos...
Definition: gz/rendering/RenderPass.hh:34
Base render pass that can be applied to a render target.
Definition: gz/rendering/base/BaseRenderPass.hh:34