cgv
Loading...
Searching...
No Matches
cgv::media::illum::surface_material Class Reference

simple class to hold the material properties of a phong material More...

#include <surface_material.h>

Inheritance diagram for cgv::media::illum::surface_material:
cgv::media::illum::textured_surface_material cgv::render::textured_material

Public Types

typedef color< float, RGB > color_type
 used color type
 

Public Member Functions

 surface_material (BrdfType _brdf_type=BrdfType(BT_STRAUSS_DIFFUSE+BT_STRAUSS), color_type _diffuse_reflectance=color_type(0.5f, 0.5f, 0.5f), float _roughness=0.5f, float _metalness=0.0f, float _ambient_occlusion=1.0f, color_type _emission=color_type(0, 0, 0), float _transparency=0.0f, const std::complex< float > &_propagation_slow_down=std::complex< float >(1.5f, 0.0f), float _roughness_anisotropy=0.0f, float _roughness_orientation=0.0f, color_type _specular_reflectance=color_type(1, 1, 1))
 construct default material
 
void set_brdf_type (BrdfType brdf_type)
 
BrdfType get_brdf_type () const
 
BrdfType & ref_brdf_type ()
 
void set_ambient_occlusion (float ambient_occlusion)
 
float get_ambient_occlusion () const
 
float & ref_ambient_occlusion ()
 
void set_diffuse_reflectance (color_type diffuse_reflectance)
 
color_type get_diffuse_reflectance () const
 
color_typeref_diffuse_reflectance ()
 
void set_specular_reflectance (color_type specular_reflectance)
 
color_type get_specular_reflectance () const
 
color_typeref_specular_reflectance ()
 
void set_emission (color_type emission)
 
color_type get_emission () const
 
color_typeref_emission ()
 
void set_transparency (float transparency)
 
float get_transparency () const
 
float & ref_transparency ()
 
void set_roughness (float roughness)
 
float get_roughness () const
 
float & ref_roughness ()
 
void set_metalness (float metalness)
 
float get_metalness () const
 
float & ref_metalness ()
 
void set_roughness_anisotropy (float roughness_anisotropy)
 
float get_roughness_anisotropy () const
 
float & ref_roughness_anisotropy ()
 
void set_roughness_orientation (float roughness_orientation)
 
float get_roughness_orientation () const
 
float & ref_roughness_orientation ()
 
void set_propagation_slow_down (std::complex< float > propagation_slow_down)
 
std::complex< float > get_propagation_slow_down () const
 
std::complex< float > & ref_propagation_slow_down ()
 

Protected Attributes

BrdfType brdf_type
 store brdf type, defaults to BT_COOK_TORRANCE
 
color_type diffuse_reflectance
 diffuse reflectance of surface, defaults to 0.5,0.5,0.5
 
float roughness
 surface roughness in the range [0,1] (1/2 trace of symmetric 2x2 matrix for anisotropic case where directional roughness is represented in the uv-coordinate system of texcoords), defaults to 0.5
 
float metalness
 metalness of surface
 
float ambient_occlusion
 scalar factor to down scale ambient light, defaults to 1
 
color_type emission
 emissive color component, defaults to 0,0,0
 
float transparency
 modulation for transparency, defaults to 0
 
std::complex< float > propagation_slow_down
 complex fraction of complex interior over real exterior index of refraction, defaults to 1.5,0
 
float roughness_anisotropy
 difference of roughness matrix eigenvalues in range [0,1] relative to roughness, i.e. lambda_1 - lambda_2 = roughness_anisotropy*roughness, defaults to 0
 
float roughness_orientation
 orientation of roughness in range [0,1], where 0 corresponds to u-direction and 0.5 to v direction, defaults to 0
 
color_type specular_reflectance
 specular color used to modulate specular reflection component, should be 1,1,1
 

Detailed Description

simple class to hold the material properties of a phong material

Definition at line 25 of file surface_material.h.

Member Typedef Documentation

◆ color_type

used color type

Definition at line 29 of file surface_material.h.

Constructor & Destructor Documentation

◆ surface_material()

cgv::media::illum::surface_material::surface_material ( BrdfType  _brdf_type = BrdfType(BT_STRAUSS_DIFFUSE + BT_STRAUSS),
color_type  _diffuse_reflectance = color_type(0.5f, 0.5f, 0.5f),
float  _roughness = 0.5f,
float  _metalness = 0.0f,
float  _ambient_occlusion = 1.0f,
color_type  _emission = color_type(0,0,0),
float  _transparency = 0.0f,
const std::complex< float > &  _propagation_slow_down = std::complex<float>(1.5f,0.0f),
float  _roughness_anisotropy = 0.0f,
float  _roughness_orientation = 0.0f,
color_type  _specular_reflectance = color_type(1,1,1) 
)

construct default material

Definition at line 7 of file surface_material.cxx.

Member Function Documentation

◆ get_ambient_occlusion()

float cgv::media::illum::surface_material::get_ambient_occlusion ( ) const
inline

Definition at line 74 of file surface_material.h.

◆ get_brdf_type()

BrdfType cgv::media::illum::surface_material::get_brdf_type ( ) const
inline

Definition at line 70 of file surface_material.h.

◆ get_diffuse_reflectance()

color_type cgv::media::illum::surface_material::get_diffuse_reflectance ( ) const
inline

Definition at line 78 of file surface_material.h.

◆ get_emission()

color_type cgv::media::illum::surface_material::get_emission ( ) const
inline

Definition at line 86 of file surface_material.h.

◆ get_metalness()

float cgv::media::illum::surface_material::get_metalness ( ) const
inline

Definition at line 98 of file surface_material.h.

◆ get_propagation_slow_down()

std::complex< float > cgv::media::illum::surface_material::get_propagation_slow_down ( ) const
inline

Definition at line 110 of file surface_material.h.

◆ get_roughness()

float cgv::media::illum::surface_material::get_roughness ( ) const
inline

Definition at line 94 of file surface_material.h.

◆ get_roughness_anisotropy()

float cgv::media::illum::surface_material::get_roughness_anisotropy ( ) const
inline

Definition at line 102 of file surface_material.h.

◆ get_roughness_orientation()

float cgv::media::illum::surface_material::get_roughness_orientation ( ) const
inline

Definition at line 106 of file surface_material.h.

◆ get_specular_reflectance()

color_type cgv::media::illum::surface_material::get_specular_reflectance ( ) const
inline

Definition at line 82 of file surface_material.h.

◆ get_transparency()

float cgv::media::illum::surface_material::get_transparency ( ) const
inline

Definition at line 90 of file surface_material.h.

◆ ref_ambient_occlusion()

float & cgv::media::illum::surface_material::ref_ambient_occlusion ( )
inline

Definition at line 75 of file surface_material.h.

◆ ref_brdf_type()

BrdfType & cgv::media::illum::surface_material::ref_brdf_type ( )
inline

Definition at line 71 of file surface_material.h.

◆ ref_diffuse_reflectance()

color_type & cgv::media::illum::surface_material::ref_diffuse_reflectance ( )
inline

Definition at line 79 of file surface_material.h.

◆ ref_emission()

color_type & cgv::media::illum::surface_material::ref_emission ( )
inline

Definition at line 87 of file surface_material.h.

◆ ref_metalness()

float & cgv::media::illum::surface_material::ref_metalness ( )
inline

Definition at line 99 of file surface_material.h.

◆ ref_propagation_slow_down()

std::complex< float > & cgv::media::illum::surface_material::ref_propagation_slow_down ( )
inline

Definition at line 111 of file surface_material.h.

◆ ref_roughness()

float & cgv::media::illum::surface_material::ref_roughness ( )
inline

Definition at line 95 of file surface_material.h.

◆ ref_roughness_anisotropy()

float & cgv::media::illum::surface_material::ref_roughness_anisotropy ( )
inline

Definition at line 103 of file surface_material.h.

◆ ref_roughness_orientation()

float & cgv::media::illum::surface_material::ref_roughness_orientation ( )
inline

Definition at line 107 of file surface_material.h.

◆ ref_specular_reflectance()

color_type & cgv::media::illum::surface_material::ref_specular_reflectance ( )
inline

Definition at line 83 of file surface_material.h.

◆ ref_transparency()

float & cgv::media::illum::surface_material::ref_transparency ( )
inline

Definition at line 91 of file surface_material.h.

◆ set_ambient_occlusion()

void cgv::media::illum::surface_material::set_ambient_occlusion ( float  ambient_occlusion)
inline

Definition at line 73 of file surface_material.h.

◆ set_brdf_type()

void cgv::media::illum::surface_material::set_brdf_type ( BrdfType  brdf_type)
inline

Definition at line 69 of file surface_material.h.

◆ set_diffuse_reflectance()

void cgv::media::illum::surface_material::set_diffuse_reflectance ( color_type  diffuse_reflectance)
inline

Definition at line 77 of file surface_material.h.

◆ set_emission()

void cgv::media::illum::surface_material::set_emission ( color_type  emission)
inline

Definition at line 85 of file surface_material.h.

◆ set_metalness()

void cgv::media::illum::surface_material::set_metalness ( float  metalness)
inline

Definition at line 97 of file surface_material.h.

◆ set_propagation_slow_down()

void cgv::media::illum::surface_material::set_propagation_slow_down ( std::complex< float >  propagation_slow_down)
inline

Definition at line 109 of file surface_material.h.

◆ set_roughness()

void cgv::media::illum::surface_material::set_roughness ( float  roughness)
inline

Definition at line 93 of file surface_material.h.

◆ set_roughness_anisotropy()

void cgv::media::illum::surface_material::set_roughness_anisotropy ( float  roughness_anisotropy)
inline

Definition at line 101 of file surface_material.h.

◆ set_roughness_orientation()

void cgv::media::illum::surface_material::set_roughness_orientation ( float  roughness_orientation)
inline

Definition at line 105 of file surface_material.h.

◆ set_specular_reflectance()

void cgv::media::illum::surface_material::set_specular_reflectance ( color_type  specular_reflectance)
inline

Definition at line 81 of file surface_material.h.

◆ set_transparency()

void cgv::media::illum::surface_material::set_transparency ( float  transparency)
inline

Definition at line 89 of file surface_material.h.

Member Data Documentation

◆ ambient_occlusion

float cgv::media::illum::surface_material::ambient_occlusion
protected

scalar factor to down scale ambient light, defaults to 1

Definition at line 40 of file surface_material.h.

◆ brdf_type

BrdfType cgv::media::illum::surface_material::brdf_type
protected

store brdf type, defaults to BT_COOK_TORRANCE

Definition at line 32 of file surface_material.h.

◆ diffuse_reflectance

color_type cgv::media::illum::surface_material::diffuse_reflectance
protected

diffuse reflectance of surface, defaults to 0.5,0.5,0.5

Definition at line 34 of file surface_material.h.

◆ emission

color_type cgv::media::illum::surface_material::emission
protected

emissive color component, defaults to 0,0,0

Definition at line 42 of file surface_material.h.

◆ metalness

float cgv::media::illum::surface_material::metalness
protected

metalness of surface

Definition at line 38 of file surface_material.h.

◆ propagation_slow_down

std::complex<float> cgv::media::illum::surface_material::propagation_slow_down
protected

complex fraction of complex interior over real exterior index of refraction, defaults to 1.5,0

Definition at line 46 of file surface_material.h.

◆ roughness

float cgv::media::illum::surface_material::roughness
protected

surface roughness in the range [0,1] (1/2 trace of symmetric 2x2 matrix for anisotropic case where directional roughness is represented in the uv-coordinate system of texcoords), defaults to 0.5

Definition at line 36 of file surface_material.h.

◆ roughness_anisotropy

float cgv::media::illum::surface_material::roughness_anisotropy
protected

difference of roughness matrix eigenvalues in range [0,1] relative to roughness, i.e. lambda_1 - lambda_2 = roughness_anisotropy*roughness, defaults to 0

Definition at line 48 of file surface_material.h.

◆ roughness_orientation

float cgv::media::illum::surface_material::roughness_orientation
protected

orientation of roughness in range [0,1], where 0 corresponds to u-direction and 0.5 to v direction, defaults to 0

Definition at line 50 of file surface_material.h.

◆ specular_reflectance

color_type cgv::media::illum::surface_material::specular_reflectance
protected

specular color used to modulate specular reflection component, should be 1,1,1

Definition at line 52 of file surface_material.h.

◆ transparency

float cgv::media::illum::surface_material::transparency
protected

modulation for transparency, defaults to 0

Definition at line 44 of file surface_material.h.


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