The small3d library
Material.hpp
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "Math.hpp"
13 
14 namespace small3d {
15 
23  class Material {
24 
25  public:
26 
27  float specularExponent = 0.0f;
28  Vec3 ambientColour = Vec3(0.5f);
29  Vec3 diffuseColour = Vec3(0.0f);
30  Vec3 specularColour = Vec3(0.0f);
31  Vec3 emissiveCoefficient = Vec3(0.0f);
36  float optDensIndexRef = 0.0f;
37  float alpha = 1.0f;
38 
43  Material();
44 
45  template <class Archive>
46  void serialize(Archive& archive) {
47  archive(specularExponent, ambientColour, diffuseColour, specularColour, emissiveCoefficient, optDensIndexRef, alpha);
48  }
49 
50  };
51 }
Math.hpp
Vectors, matrices and other math things.
small3d::Material::optDensIndexRef
float optDensIndexRef
Optical density / index of refraction.
Definition: Material.hpp:36
small3d
Definition: BinaryFile.hpp:15
small3d::Material::Material
Material()
Default constructor.
Definition: Material.cpp:13
small3d::Vec3
3 component float vector
Definition: Math.hpp:19
small3d::Material
A 3D model material.
Definition: Material.hpp:23