Lugdunum  0.1.0
Material.inl
Go to the documentation of this file.
1 inline void Material::Material::setName(const std::string& name) {
2  _name = name;
3 }
4 
5 inline void Material::setBaseColorFactor(const Math::Vec4f& factor) {
6  _constants.baseColor = factor;
7 }
8 
9 inline void Material::setEmissiveFactor(const Math::Vec3f& factor) {
10  _constants.emissive = factor;
11 }
12 
13 inline void Material::setMetallicFactor(float factor) {
14  _constants.metallic = factor;
15 }
16 
17 inline void Material::setRoughnessFactor(float factor) {
18  _constants.roughness = factor;
19 }
20 
21 inline void Material::setBaseColorTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord) {
22  _baseColorTexture.texture = texture;
23  _baseColorTexture.texCoord = texCoord;
24 }
25 
26 inline void Material::setMetallicRoughnessTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord) {
27  _metallicRoughnessTexture.texture = texture;
28  _metallicRoughnessTexture.texCoord = texCoord;
29 }
30 
31 inline void Material::setNormalTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord, float scale) {
32  _normalTexture.texture = texture;
33  _normalTexture.texCoord = texCoord;
34  _constants.normalTextureScale = scale;
35 }
36 
37 inline void Material::setOcclusionTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord, float strength) {
38  _occlusionTexture.texture = texture;
39  _occlusionTexture.texCoord = texCoord;
40  _constants.occlusionTextureStrength = strength;
41 }
42 
43 inline void Material::setEmissiveTexture(Resource::SharedPtr<Render::Texture> texture, uint32_t texCoord) {
44  _emissiveTexture.texture = texture;
45  _emissiveTexture.texCoord = texCoord;
46 }
Matrix< 4, 4, T > scale(const Vector< 3, T > &factors)
Definition: Transform.inl:41
Dummy class for a shared pointer.
Definition: Resource.hpp:66