Gazebo Common

API Reference

3.17.0
gz/common/Pbr.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2020 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_COMMON_PBR_HH_
18 #define GZ_COMMON_PBR_HH_
19 
20 #include <string>
21 #include <gz/common/graphics/Export.hh>
22 
23 namespace ignition
24 {
25 namespace common
26 {
27  // Forward declarations.
28  class PbrPrivate;
29 
31  enum class PbrType : int
32  {
34  NONE = 0,
35 
37  METAL = 1,
38 
40  SPECULAR = 2,
41  };
42 
44  enum class NormalMapSpace: int
45  {
47  TANGENT = 0,
48 
50  OBJECT = 1,
51  };
52 
55  class IGNITION_COMMON_GRAPHICS_VISIBLE Pbr
56  {
58  public: Pbr();
59 
62  public: Pbr(const Pbr &_pbr);
63 
66  public: Pbr(Pbr &&_pbr) noexcept;
67 
69  public: ~Pbr();
70 
74  public: Pbr &operator=(const Pbr &_pbr);
75 
79  public: Pbr &operator=(Pbr &&_pbr);
80 
84  public: bool operator==(const Pbr &_pbr) const;
85 
90  public: bool operator!=(const Pbr &_pbr) const;
91 
96  public: std::string AlbedoMap() const;
97 
100  public: void SetAlbedoMap(const std::string &_map);
101 
106  public: std::string NormalMap() const;
107 
112  public: void SetNormalMap(const std::string &_map,
114 
117  public: NormalMapSpace NormalMapType() const;
118 
123  public: std::string EnvironmentMap() const;
124 
127  public: void SetEnvironmentMap(const std::string &_map);
128 
133  public: std::string AmbientOcclusionMap() const;
134 
137  public: void SetAmbientOcclusionMap(const std::string &_map);
138 
143  public: std::string RoughnessMap() const;
144 
147  public: void SetRoughnessMap(const std::string &_map);
148 
153  public: std::string MetalnessMap() const;
154 
157  public: void SetMetalnessMap(const std::string &_map);
158 
163  public: std::string EmissiveMap() const;
164 
167  public: void SetEmissiveMap(const std::string &_map);
168 
173  public: std::string LightMap() const;
174 
178  public: void SetLightMap(const std::string &_map, unsigned int _uvSet = 0u);
179 
182  public: unsigned int LightMapTexCoordSet() const;
183 
186  public: double Metalness() const;
187 
190  public: void SetMetalness(double _value);
191 
194  public: double Roughness() const;
195 
198  public: void SetRoughness(double _value);
199 
204  public: std::string GlossinessMap() const;
205 
208  public: void SetGlossinessMap(const std::string &_map);
209 
212  public: double Glossiness() const;
213 
216  public: void SetGlossiness(double _value);
217 
222  public: std::string SpecularMap() const;
223 
226  public: void SetSpecularMap(const std::string &_map);
227 
230  public: PbrType Type() const;
231 
234  public: void SetType(PbrType _type);
235 
237  private: PbrPrivate *dataPtr = nullptr;
238  };
239 }
240 }
241 #endif
PbrType
Type of PBR workflow.
Definition: gz/common/Pbr.hh:31
Forward declarations for the common classes.
STL class.
@ METAL
Metal/Roughness workflow.
@ SPECULAR
Specular/Glossiness workflow.
NormalMapSpace
Space the normal map is defined in.
Definition: gz/common/Pbr.hh:44
This class contains Physically-Based-Rendering (PBR) workflow properties.
Definition: gz/common/Pbr.hh:55