BRE12
MaterialProperties.h
1 #pragma once
2 
3 #include <cstring>
4 
5 namespace BRE {
7 public:
8  MaterialProperties() = default;
9  MaterialProperties(const float baseColorR,
10  const float baseColorG,
11  const float baseColorB,
12  const float metalMask,
13  const float smoothness)
14  {
15  mBaseColor_MetalMask[0U] = baseColorR;
16  mBaseColor_MetalMask[1U] = baseColorG;
17  mBaseColor_MetalMask[2U] = baseColorB;
18  mBaseColor_MetalMask[3U] = metalMask;
19  mSmoothness = smoothness;
20  }
21 
22  ~MaterialProperties() = default;
23  MaterialProperties(const MaterialProperties&) = default;
25 
26  const MaterialProperties& operator=(const MaterialProperties& instance)
27  {
28  if (this == &instance) {
29  return *this;
30  }
31 
32  memcpy(mBaseColor_MetalMask, instance.mBaseColor_MetalMask, sizeof(mBaseColor_MetalMask));
33  mSmoothness = instance.mSmoothness;
34 
35  return *this;
36  }
37 
38 private:
39  float mBaseColor_MetalMask[4U]{ 1.0f, 1.0f, 1.0f, 0.0f };
40  float mSmoothness{ 1.0f };
41  float mPadding[3U];
42 };
43 }
44 
Definition: Camera.cpp:8
Definition: MaterialProperties.h:6