4#include "surface_material.h"
5#include "obj_material.h"
18 std::string
name =
"default";
60 int add_image_file(
const std::string& file_name);
78#include <cgv/config/lib_end.h>
Stores properties of a surface material with support for texturing.
int metalness_index
index of image from which metalness should be mapped, -1 corresponds to no mapping
void set_image_file_name(int i, std::string image_file_name)
set the image file name of i-th image file
std::vector< std::string > image_file_names
vector of image file names
int propagation_slow_down_index
index of image from which diffuse_reflectance should be mapped, -1 corresponds to no mapping
std::string name
name of material
int transparency_index
index of image from which transparency should be mapped, -1 corresponds to no mapping
bool sRGBA_textures
whether textures are in sRGB format
virtual size_t get_nr_textures() const
virtual method to query number of textures
int roughness_index
index of image from which roughness should be mapped, -1 corresponds to no mapping
unsigned get_nr_image_files() const
return number of image files
int specular_index
index of image from which specular_reflectance should be mapped, -1 corresponds to no mapping
int ambient_index
index of image from which ambient_occlusion should be mapped, -1 corresponds to no mapping
std::string & ref_image_file_name(int i)
return reference to image file name of i-th image file
textured_surface_material()
construct using default values
int emission_index
index of image from which emission should be mapped, -1 corresponds to no mapping
int bump_index
index of image from which bumps should be mapped, -1 corresponds to no mapping
std::string get_image_file_name(int i) const
return the name of the i-th image file
int diffuse_index
index of image from which diffuse_reflectance should be mapped, -1 corresponds to no mapping
int normal_index
index of image from which normals should be mapped, -1 corresponds to no mapping
float bump_scale
scaling factor for bump map
this header is dependency free