StevEngine
StevEngine is a customizable C++ game engine.
Loading...
Searching...
No Matches
StevEngine::Visuals::Material Class Reference

Material properties for rendering. More...

#include <visuals/Material.hpp>

Public Member Functions

 Material (Utilities::Color color=Utilities::Color(), Utilities::Vector3 ambient=Utilities::Vector3(1.0), Utilities::Vector3 diffuse=Utilities::Vector3(1.0), Utilities::Vector3 specular=Utilities::Vector3(1.0), float shininess=32.0, const Visuals::Texture &albedoData=Visuals::Texture::empty, const Visuals::Texture &normalData=Visuals::Texture::empty)
 Create material with properties.
 
 Material (const Material &other)
 Copy constructor.
 
const Visuals::TextureGetAlbedo () const
 Get albedo/color texture.
 
void SetAlbedo (const Texture &textureData)
 Set albedo/color texture.
 
void FreeAlbedo ()
 Free albedo texture resources.
 
const Visuals::TextureGetNormal () const
 Get normal map texture.
 
void SetNormal (const Texture &normalData)
 Set normal map texture.
 
void FreeNormal ()
 Free normal map resources.
 

Public Attributes

Utilities::Color color
 Base color tint.
 
Utilities::Vector3 ambient
 Ambient light reflection coefficient.
 
Utilities::Vector3 diffuse
 Diffuse light reflection coefficient.
 
Utilities::Vector3 specular
 Specular light reflection coefficient.
 
float shininess
 Specular highlight size/sharpness.
 

Detailed Description

Material properties for rendering.

Defines surface properties including color, textures, and light interaction. Controls how objects appear when rendered.

Constructor & Destructor Documentation

◆ Material() [1/2]

StevEngine::Visuals::Material::Material ( Utilities::Color color = Utilities::Color(),
Utilities::Vector3 ambient = Utilities::Vector3(1.0),
Utilities::Vector3 diffuse = Utilities::Vector3(1.0),
Utilities::Vector3 specular = Utilities::Vector3(1.0),
float shininess = 32.0,
const Visuals::Texture & albedoData = Visuals::Texture::empty,
const Visuals::Texture & normalData = Visuals::Texture::empty )

Create material with properties.

Parameters
colorBase color tint
ambientAmbient light reflection
diffuseDiffuse light reflection
specularSpecular light reflection
shininessSpecular highlight size
albedoDataAlbedo/color texture
normalDataNormal map texture

◆ Material() [2/2]

StevEngine::Visuals::Material::Material ( const Material & other)

Copy constructor.

Parameters
otherMaterial to copy

Member Function Documentation

◆ GetAlbedo()

const Visuals::Texture & StevEngine::Visuals::Material::GetAlbedo ( ) const
inline

Get albedo/color texture.

Returns
Reference to albedo texture

◆ GetNormal()

const Visuals::Texture & StevEngine::Visuals::Material::GetNormal ( ) const
inline

Get normal map texture.

Returns
Reference to normal map

◆ SetAlbedo()

void StevEngine::Visuals::Material::SetAlbedo ( const Texture & textureData)

Set albedo/color texture.

Parameters
textureDataNew albedo texture

◆ SetNormal()

void StevEngine::Visuals::Material::SetNormal ( const Texture & normalData)

Set normal map texture.

Parameters
normalDataNew normal map

The documentation for this class was generated from the following files: