Ignition Common

API Reference

3.6.1
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 #include <ignition/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 
171  public: double Metalness() const;
172 
175  public: void SetMetalness(double _value);
176 
179  public: double Roughness() const;
180 
183  public: void SetRoughness(double _value);
184 
189  public: std::string GlossinessMap() const;
190 
193  public: void SetGlossinessMap(const std::string &_map);
194 
197  public: double Glossiness() const;
198 
201  public: void SetGlossiness(double _value);
202 
207  public: std::string SpecularMap() const;
208 
211  public: void SetSpecularMap(const std::string &_map);
212 
215  public: PbrType Type() const;
216 
219  public: void SetType(PbrType _type);
220 
222  private: PbrPrivate *dataPtr = nullptr;
223  };
224 }
225 }
226 #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.