Ignition Common

API Reference

4.4.0
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 <ignition/common/graphics/Export.hh>
25 
26 namespace ignition
27 {
28 namespace common
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 
63  public: bool operator==(const Pbr &_pbr) const;
64 
69  public: bool operator!=(const Pbr &_pbr) const;
70 
75  public: std::string AlbedoMap() const;
76 
79  public: void SetAlbedoMap(const std::string &_map);
80 
85  public: std::string NormalMap() const;
86 
91  public: void SetNormalMap(const std::string &_map,
93 
96  public: NormalMapSpace NormalMapType() const;
97 
102  public: std::string EnvironmentMap() const;
103 
106  public: void SetEnvironmentMap(const std::string &_map);
107 
112  public: std::string AmbientOcclusionMap() const;
113 
116  public: void SetAmbientOcclusionMap(const std::string &_map);
117 
122  public: std::string RoughnessMap() const;
123 
126  public: void SetRoughnessMap(const std::string &_map);
127 
132  public: std::string MetalnessMap() const;
133 
136  public: void SetMetalnessMap(const std::string &_map);
137 
142  public: std::string EmissiveMap() const;
143 
146  public: void SetEmissiveMap(const std::string &_map);
147 
152  public: std::string LightMap() const;
153 
157  public: void SetLightMap(const std::string &_map, unsigned int _uvSet = 0u);
158 
161  public: unsigned int LightMapTexCoordSet() const;
162 
165  public: double Metalness() const;
166 
169  public: void SetMetalness(double _value);
170 
173  public: double Roughness() const;
174 
177  public: void SetRoughness(double _value);
178 
183  public: std::string GlossinessMap() const;
184 
187  public: void SetGlossinessMap(const std::string &_map);
188 
191  public: double Glossiness() const;
192 
195  public: void SetGlossiness(double _value);
196 
201  public: std::string SpecularMap() const;
202 
205  public: void SetSpecularMap(const std::string &_map);
206 
209  public: PbrType Type() const;
210 
213  public: void SetType(PbrType _type);
214 
216  IGN_UTILS_IMPL_PTR(dataPtr)
217  };
218 }
219 }
220 #endif
NormalMapSpace
Space the normal map is defined in.
Definition: Pbr.hh:44
STL class.
This class contains Physically-Based-Rendering (PBR) workflow properties.
Definition: Pbr.hh:55
PbrType
Type of PBR workflow.
Definition: Pbr.hh:31
Metal/Roughness workflow.
Specular/Glossiness workflow.
Forward declarations for the common classes.