Gazebo Rendering

API Reference

8.2.0
BaseGlobalIlluminationVct.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_BASE_BASEGLOBALILLUMINATIONVCT_HH_
18 #define GZ_RENDERING_BASE_BASEGLOBALILLUMINATIONVCT_HH_
19 
21 
22 #include "gz/common/Util.hh"
23 #include "gz/math/Helpers.hh"
24 
25 namespace gz
26 {
27  namespace rendering
28  {
29  inline namespace GZ_RENDERING_VERSION_NAMESPACE {
30  template <class T>
32  public virtual GlobalIlluminationVct,
33  public virtual T
34  {
36 
37  public: virtual ~BaseGlobalIlluminationVct();
38 
39  // Documentation inherited.
40  public: virtual void SetHighQuality(bool _highQuality) override;
41 
42  // Documentation inherited.
43  public: virtual bool HighQuality() const override;
44 
45  // Documentation inherited.
46  public: virtual void SetAnisotropic(bool _anisotropic) override;
47 
48  // Documentation inherited.
49  public: virtual bool Anisotropic() const override;
50 
51  // Documentation inherited.
52  public: virtual void SetConserveMemory(bool _conserveMemory) override;
53 
54  // Documentation inherited.
55  public: virtual bool ConserveMemory() const override;
56 
57  // Documentation inherited.
58  public: virtual void SetResolution(const uint32_t _resolution[3])
59  override;
60 
61  // Documentation inherited.
62  public: virtual const uint32_t* Resolution() const override;
63 
64  // Documentation inherited.
65  public: virtual void SetOctantCount(const uint32_t _octants[3]) override;
66 
67  // Documentation inherited.
68  public: virtual const uint32_t* OctantCount() const override;
69  };
70 
72  template <class T>
74  {
75  }
76 
78  template <class T>
80  {
81  }
82 
84  template <class T>
86  bool /*_highQuality*/) // NOLINT
87  {
88  }
89 
91  template <class T>
93  {
94  return false;
95  }
96 
98  template <class T>
100  bool /*_anisotropic*/) // NOLINT
101  {
102  }
103 
105  template <class T>
107  {
108  return true;
109  }
110 
112  template <class T>
114  bool /*_conserveMemory*/)
115  {
116  }
117 
119  template <class T>
121  {
122  return false;
123  }
124 
126  template <class T>
128  const uint32_t _resolution[3])
129  {
130  GZ_ASSERT(math::isPowerOfTwo(_resolution[0]),
131  "Resolution must be power of 2");
132  GZ_ASSERT(math::isPowerOfTwo(_resolution[1]),
133  "Resolution must be power of 2");
134  GZ_ASSERT(math::isPowerOfTwo(_resolution[2]),
135  "Resolution must be power of 2");
136  }
137 
139  template <class T>
141  {
142  static const uint32_t tmp[3] = { 1u, 1u, 1u };
143  return tmp;
144  }
145 
147  template <class T>
149  const uint32_t _octants[3])
150  {
151  GZ_ASSERT(_octants[0] > 0u, "Subdivision must be greater than 0");
152  GZ_ASSERT(_octants[1] > 0u, "Subdivision must be greater than 0");
153  GZ_ASSERT(_octants[2] > 0u, "Subdivision must be greater than 0");
154  }
155 
157  template <class T>
159  {
160  static const uint32_t tmp[3] = { 1u, 1u, 1u };
161  return tmp;
162  }
163  }
164  }
165 }
166 #endif