Gazebo Rendering

API Reference

9.0.0~pre2
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
25namespace 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>
76
78 template <class T>
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 (void)(_resolution);
131 GZ_ASSERT(math::isPowerOfTwo(_resolution[0]),
132 "Resolution must be power of 2");
133 GZ_ASSERT(math::isPowerOfTwo(_resolution[1]),
134 "Resolution must be power of 2");
135 GZ_ASSERT(math::isPowerOfTwo(_resolution[2]),
136 "Resolution must be power of 2");
137 }
138
140 template <class T>
142 {
143 static const uint32_t tmp[3] = { 1u, 1u, 1u };
144 return tmp;
145 }
146
148 template <class T>
150 const uint32_t _octants[3])
151 {
152 (void)(_octants);
153 GZ_ASSERT(_octants[0] > 0u, "Subdivision must be greater than 0");
154 GZ_ASSERT(_octants[1] > 0u, "Subdivision must be greater than 0");
155 GZ_ASSERT(_octants[2] > 0u, "Subdivision must be greater than 0");
156 }
157
159 template <class T>
161 {
162 static const uint32_t tmp[3] = { 1u, 1u, 1u };
163 return tmp;
164 }
165 }
166 }
167}
168#endif