Gazebo Common

API Reference

4.7.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 IGNITION_COMMON_PBR_HH_
18 #define IGNITION_COMMON_PBR_HH_
19 
20 #include <string>
21 
22 #include <ignition/utils/ImplPtr.hh>
23 
24 #include <gz/common/config.hh>
25 #include <gz/common/graphics/Export.hh>
26 
27 namespace ignition
28 {
29 namespace common
30 {
32  enum class PbrType : int
33  {
35  NONE = 0,
36 
38  METAL = 1,
39 
41  SPECULAR = 2,
42  };
43 
45  enum class NormalMapSpace: int
46  {
48  TANGENT = 0,
49 
51  OBJECT = 1,
52  };
53 
56  class IGNITION_COMMON_GRAPHICS_VISIBLE Pbr
57  {
59  public: Pbr();
60 
64  public: bool operator==(const Pbr &_pbr) const;
65 
70  public: bool operator!=(const Pbr &_pbr) const;
71 
76  public: std::string AlbedoMap() const;
77 
80  public: void SetAlbedoMap(const std::string &_map);
81 
86  public: std::string NormalMap() const;
87 
92  public: void SetNormalMap(const std::string &_map,
94 
97  public: NormalMapSpace NormalMapType() const;
98 
103  public: std::string EnvironmentMap() const;
104 
107  public: void SetEnvironmentMap(const std::string &_map);
108 
113  public: std::string AmbientOcclusionMap() const;
114 
117  public: void SetAmbientOcclusionMap(const std::string &_map);
118 
123  public: std::string RoughnessMap() const;
124 
127  public: void SetRoughnessMap(const std::string &_map);
128 
133  public: std::string MetalnessMap() const;
134 
137  public: void SetMetalnessMap(const std::string &_map);
138 
143  public: std::string EmissiveMap() const;
144 
147  public: void SetEmissiveMap(const std::string &_map);
148 
153  public: std::string LightMap() const;
154 
158  public: void SetLightMap(const std::string &_map, unsigned int _uvSet = 0u);
159 
162  public: unsigned int LightMapTexCoordSet() const;
163 
166  public: double Metalness() const;
167 
170  public: void SetMetalness(double _value);
171 
174  public: double Roughness() const;
175 
178  public: void SetRoughness(double _value);
179 
184  public: std::string GlossinessMap() const;
185 
188  public: void SetGlossinessMap(const std::string &_map);
189 
192  public: double Glossiness() const;
193 
196  public: void SetGlossiness(double _value);
197 
202  public: std::string SpecularMap() const;
203 
206  public: void SetSpecularMap(const std::string &_map);
207 
210  public: PbrType Type() const;
211 
214  public: void SetType(PbrType _type);
215 
217  IGN_UTILS_IMPL_PTR(dataPtr)
218  };
219 }
220 }
221 #endif
PbrType
Type of PBR workflow.
Definition: gz/common/Pbr.hh:32
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:45
This class contains Physically-Based-Rendering (PBR) workflow properties.
Definition: gz/common/Pbr.hh:56