Raftel Engine
 
Loading...
Searching...
No Matches
material.hpp File Reference

Defines the Material class for handling surface properties and textures. More...

#include <glm/glm.hpp>
#include <memory>
#include <unordered_map>
#include <string>
#include <iostream>
#include <stdexcept>
#include <raftel/texture.hpp>

Go to the source code of this file.

Classes

class  Raftel::Material
 Represents a material with textures and physical properties. More...
 

Detailed Description

Defines the Material class for handling surface properties and textures.

Date
2025-03-10
Authors
Carlos Mazcuñán Blanes, Marc Folgado Balbás

The Material class represents the surface properties of an object. It allows defining textures (albedo, normal, roughness, metallic) and scalar properties such as shininess, roughness value, and metallic value.

Usage Example:

auto albedoTexture = std::make_shared<Raftel::Texture>("albedo.png");
Raftel::Material material(albedoTexture);
material.setRoughness(0.8f);
material.setMetallic(0.5f);
glm::vec3 color = material.getAlbedoColor();
Represents a material with textures and physical properties.
Definition material.hpp:43

Definition in file material.hpp.