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

>extension of a phong material with support for texture mapped color channels More...

#include <obj_material.h>

Inheritance diagram for cgv::media::illum::obj_material:
cgv::media::illum::phong_material

Public Types

enum  TextureType {
  TT_AMBIENT_TEXTURE = 1 , TT_DIFFUSE_TEXTURE = 2 , TT_OPACITY_TEXTURE = 4 , TT_SPECULAR_TEXTURE = 8 ,
  TT_EMISSION_TEXTURE = 16 , TT_BUMP_TEXTURE = 32 , TT_ALL_TEXTURES = 63
}
 > different types of textures More...
 
- Public Types inherited from cgv::media::illum::phong_material
typedef color< float, RGB, OPACITY > color_type
 >used color type
 

Public Member Functions

 obj_material ()
 define default material
 
void set_opacity (float o)
 set opacity value
 
float get_opacity () const
 return opacity value
 
float & ref_opacity ()
 return reference to opacity value
 
void set_name (std::string o)
 set name value
 
const std::string & get_name () const
 return name value
 
std::string & ref_name ()
 return reference to name value
 
virtual void set_ambient_texture_name (std::string o)
 set ambient_texture_name value
 
const std::string & get_ambient_texture_name () const
 return ambient_texture_name value
 
std::string & ref_ambient_texture_name ()
 return reference to ambient_texture_name value
 
virtual void set_diffuse_texture_name (std::string o)
 set diffuse_texture_name value
 
const std::string & get_diffuse_texture_name () const
 return diffuse_texture_name value
 
std::string & ref_diffuse_texture_name ()
 return reference to diffuse_texture_name value
 
virtual void set_opacity_texture_name (std::string o)
 set opacity_texture_name value
 
const std::string & get_opacity_texture_name () const
 return opacity_texture_name value
 
std::string & ref_opacity_texture_name ()
 return reference to opacity_texture_name value
 
virtual void set_specular_texture_name (std::string o)
 set specular_texture_name value
 
const std::string & get_specular_texture_name () const
 return specular_texture_name value
 
std::string & ref_specular_texture_name ()
 return reference to specular_texture_name value
 
virtual void set_emission_texture_name (std::string o)
 set emission_texture_name value
 
const std::string & get_emission_texture_name () const
 return emission_texture_name value
 
std::string & ref_emission_texture_name ()
 return reference to emission_texture_name value
 
virtual void set_bump_texture_name (std::string b)
 set bump_texture_name value
 
const std::string & get_bump_texture_name () const
 return bump_texture_name value
 
std::string & ref_bump_texture_name ()
 return reference to bump_texture_name value
 
void set_bump_scale (float bs)
 set scale of bumps
 
float get_bump_scale () const
 return bump scale
 
float & ref_bump_scale ()
 return reference to bump scale
 
- Public Member Functions inherited from cgv::media::illum::phong_material
 phong_material ()
 construct default material
 
void set_ambient (const color_type &c)
 
void set_diffuse (const color_type &c)
 
void set_specular (const color_type &c)
 
void set_emission (const color_type &c)
 
void set_shininess (float s)
 
const color_typeget_ambient () const
 
const color_typeget_diffuse () const
 
const color_typeget_specular () const
 
const color_typeget_emission () const
 
float get_shininess () const
 
color_typeref_ambient ()
 
color_typeref_diffuse ()
 
color_typeref_specular ()
 
color_typeref_emission ()
 
float & ref_shininess ()
 

Protected Attributes

std::string name
 > name of material
 
float opacity
 > opacity value
 
std::string ambient_texture_name
 > file name of ambient texture
 
std::string diffuse_texture_name
 > file name of diffuse texture
 
std::string opacity_texture_name
 > file name of opacity texture
 
std::string specular_texture_name
 > file name of specular texture
 
std::string emission_texture_name
 > file name of emission texture
 
float bump_scale
 > scaling factor for bump map
 
std::string bump_texture_name
 > file name of bump map texture
 
- Protected Attributes inherited from cgv::media::illum::phong_material
color_type ambient
 >ambient color component
 
color_type diffuse
 >diffuse color component
 
color_type specular
 >specular color component
 
color_type emission
 >emissive color component
 
float shininess
 >exponent of the specular cosine term
 

Detailed Description

>extension of a phong material with support for texture mapped color channels

Definition at line 11 of file obj_material.h.

Member Enumeration Documentation

◆ TextureType

> different types of textures

Definition at line 34 of file obj_material.h.

Constructor & Destructor Documentation

◆ obj_material()

cgv::media::illum::obj_material::obj_material ( )
inline

define default material

Definition at line 44 of file obj_material.h.

Member Function Documentation

◆ get_ambient_texture_name()

const std::string & cgv::media::illum::obj_material::get_ambient_texture_name ( ) const
inline

return ambient_texture_name value

Definition at line 60 of file obj_material.h.

Referenced by cgv::media::illum::textured_surface_material::textured_surface_material().

◆ get_bump_scale()

float cgv::media::illum::obj_material::get_bump_scale ( ) const
inline

return bump scale

Definition at line 96 of file obj_material.h.

Referenced by cgv::media::illum::textured_surface_material::textured_surface_material().

◆ get_bump_texture_name()

const std::string & cgv::media::illum::obj_material::get_bump_texture_name ( ) const
inline

return bump_texture_name value

Definition at line 90 of file obj_material.h.

Referenced by cgv::media::illum::textured_surface_material::textured_surface_material().

◆ get_diffuse_texture_name()

const std::string & cgv::media::illum::obj_material::get_diffuse_texture_name ( ) const
inline

return diffuse_texture_name value

Definition at line 66 of file obj_material.h.

Referenced by cgv::media::illum::textured_surface_material::textured_surface_material().

◆ get_emission_texture_name()

const std::string & cgv::media::illum::obj_material::get_emission_texture_name ( ) const
inline

return emission_texture_name value

Definition at line 84 of file obj_material.h.

Referenced by cgv::media::illum::textured_surface_material::textured_surface_material().

◆ get_name()

const std::string & cgv::media::illum::obj_material::get_name ( ) const
inline

◆ get_opacity()

float cgv::media::illum::obj_material::get_opacity ( ) const
inline

return opacity value

Definition at line 48 of file obj_material.h.

Referenced by cgv::media::illum::textured_surface_material::textured_surface_material().

◆ get_opacity_texture_name()

const std::string & cgv::media::illum::obj_material::get_opacity_texture_name ( ) const
inline

return opacity_texture_name value

Definition at line 72 of file obj_material.h.

Referenced by cgv::media::illum::textured_surface_material::textured_surface_material().

◆ get_specular_texture_name()

const std::string & cgv::media::illum::obj_material::get_specular_texture_name ( ) const
inline

return specular_texture_name value

Definition at line 78 of file obj_material.h.

Referenced by cgv::media::illum::textured_surface_material::textured_surface_material().

◆ ref_ambient_texture_name()

std::string & cgv::media::illum::obj_material::ref_ambient_texture_name ( )
inline

return reference to ambient_texture_name value

Definition at line 62 of file obj_material.h.

◆ ref_bump_scale()

float & cgv::media::illum::obj_material::ref_bump_scale ( )
inline

return reference to bump scale

Definition at line 98 of file obj_material.h.

◆ ref_bump_texture_name()

std::string & cgv::media::illum::obj_material::ref_bump_texture_name ( )
inline

return reference to bump_texture_name value

Definition at line 92 of file obj_material.h.

◆ ref_diffuse_texture_name()

std::string & cgv::media::illum::obj_material::ref_diffuse_texture_name ( )
inline

return reference to diffuse_texture_name value

Definition at line 68 of file obj_material.h.

◆ ref_emission_texture_name()

std::string & cgv::media::illum::obj_material::ref_emission_texture_name ( )
inline

return reference to emission_texture_name value

Definition at line 86 of file obj_material.h.

◆ ref_name()

std::string & cgv::media::illum::obj_material::ref_name ( )
inline

return reference to name value

Definition at line 56 of file obj_material.h.

◆ ref_opacity()

float & cgv::media::illum::obj_material::ref_opacity ( )
inline

return reference to opacity value

Definition at line 50 of file obj_material.h.

◆ ref_opacity_texture_name()

std::string & cgv::media::illum::obj_material::ref_opacity_texture_name ( )
inline

return reference to opacity_texture_name value

Definition at line 74 of file obj_material.h.

◆ ref_specular_texture_name()

std::string & cgv::media::illum::obj_material::ref_specular_texture_name ( )
inline

return reference to specular_texture_name value

Definition at line 80 of file obj_material.h.

◆ set_ambient_texture_name()

virtual void cgv::media::illum::obj_material::set_ambient_texture_name ( std::string  o)
inlinevirtual

set ambient_texture_name value

Definition at line 58 of file obj_material.h.

Referenced by cgv::media::mesh::obj_reader_base::read_mtl().

◆ set_bump_scale()

void cgv::media::illum::obj_material::set_bump_scale ( float  bs)
inline

set scale of bumps

Definition at line 94 of file obj_material.h.

Referenced by cgv::media::mesh::obj_reader_base::read_mtl().

◆ set_bump_texture_name()

virtual void cgv::media::illum::obj_material::set_bump_texture_name ( std::string  b)
inlinevirtual

set bump_texture_name value

Definition at line 88 of file obj_material.h.

Referenced by cgv::media::mesh::obj_reader_base::read_mtl().

◆ set_diffuse_texture_name()

virtual void cgv::media::illum::obj_material::set_diffuse_texture_name ( std::string  o)
inlinevirtual

set diffuse_texture_name value

Definition at line 64 of file obj_material.h.

Referenced by cgv::media::mesh::obj_reader_base::read_mtl().

◆ set_emission_texture_name()

virtual void cgv::media::illum::obj_material::set_emission_texture_name ( std::string  o)
inlinevirtual

set emission_texture_name value

Definition at line 82 of file obj_material.h.

Referenced by cgv::media::mesh::obj_reader_base::read_mtl().

◆ set_name()

void cgv::media::illum::obj_material::set_name ( std::string  o)
inline

◆ set_opacity()

void cgv::media::illum::obj_material::set_opacity ( float  o)
inline

set opacity value

Definition at line 46 of file obj_material.h.

Referenced by cgv::media::mesh::obj_reader_base::read_mtl().

◆ set_opacity_texture_name()

virtual void cgv::media::illum::obj_material::set_opacity_texture_name ( std::string  o)
inlinevirtual

set opacity_texture_name value

Definition at line 70 of file obj_material.h.

Referenced by cgv::media::mesh::obj_reader_base::read_mtl().

◆ set_specular_texture_name()

virtual void cgv::media::illum::obj_material::set_specular_texture_name ( std::string  o)
inlinevirtual

set specular_texture_name value

Definition at line 76 of file obj_material.h.

Referenced by cgv::media::mesh::obj_reader_base::read_mtl().

Member Data Documentation

◆ ambient_texture_name

std::string cgv::media::illum::obj_material::ambient_texture_name
protected

> file name of ambient texture

Definition at line 19 of file obj_material.h.

◆ bump_scale

float cgv::media::illum::obj_material::bump_scale
protected

> scaling factor for bump map

Definition at line 29 of file obj_material.h.

◆ bump_texture_name

std::string cgv::media::illum::obj_material::bump_texture_name
protected

> file name of bump map texture

Definition at line 31 of file obj_material.h.

◆ diffuse_texture_name

std::string cgv::media::illum::obj_material::diffuse_texture_name
protected

> file name of diffuse texture

Definition at line 21 of file obj_material.h.

◆ emission_texture_name

std::string cgv::media::illum::obj_material::emission_texture_name
protected

> file name of emission texture

Definition at line 27 of file obj_material.h.

◆ name

std::string cgv::media::illum::obj_material::name
protected

> name of material

Definition at line 15 of file obj_material.h.

◆ opacity

float cgv::media::illum::obj_material::opacity
protected

> opacity value

Definition at line 17 of file obj_material.h.

◆ opacity_texture_name

std::string cgv::media::illum::obj_material::opacity_texture_name
protected

> file name of opacity texture

Definition at line 23 of file obj_material.h.

◆ specular_texture_name

std::string cgv::media::illum::obj_material::specular_texture_name
protected

> file name of specular texture

Definition at line 25 of file obj_material.h.


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