The small3d library
Tiny C++ 3D game development library for Win/MacOS/Linux/FreeBSD
Loading...
Searching...
No Matches
Material.hpp
Go to the documentation of this file.
1
10#pragma once
11
12#include "Math.hpp"
13
14namespace 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}
Vectors, matrices and other math things.
A 3D model material.
Definition Material.hpp:23
float optDensIndexRef
Optical density / index of refraction.
Definition Material.hpp:36
Material()
Default constructor.
Definition Material.cpp:13
Definition BinaryFile.hpp:15
3 component float vector
Definition Math.hpp:21