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

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

#include <phong_material.h>

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

Public Types

typedef color< float, RGB, OPACITY > color_type
 >used color type
 

Public Member Functions

 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

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

>simple class to hold the material properties of a phong material

Definition at line 11 of file phong_material.h.

Member Typedef Documentation

◆ color_type

>used color type

Definition at line 15 of file phong_material.h.

Constructor & Destructor Documentation

◆ phong_material()

cgv::media::illum::phong_material::phong_material ( )

construct default material

Definition at line 7 of file phong_material.cxx.

Member Function Documentation

◆ get_ambient()

const phong_material::color_type & cgv::media::illum::phong_material::get_ambient ( ) const

Definition at line 13 of file phong_material.cxx.

◆ get_diffuse()

const phong_material::color_type & cgv::media::illum::phong_material::get_diffuse ( ) const

Definition at line 14 of file phong_material.cxx.

◆ get_emission()

const phong_material::color_type & cgv::media::illum::phong_material::get_emission ( ) const

Definition at line 16 of file phong_material.cxx.

◆ get_shininess()

float cgv::media::illum::phong_material::get_shininess ( ) const

Definition at line 17 of file phong_material.cxx.

◆ get_specular()

const phong_material::color_type & cgv::media::illum::phong_material::get_specular ( ) const

Definition at line 15 of file phong_material.cxx.

◆ ref_ambient()

phong_material::color_type & cgv::media::illum::phong_material::ref_ambient ( )

Definition at line 18 of file phong_material.cxx.

◆ ref_diffuse()

phong_material::color_type & cgv::media::illum::phong_material::ref_diffuse ( )

Definition at line 19 of file phong_material.cxx.

◆ ref_emission()

phong_material::color_type & cgv::media::illum::phong_material::ref_emission ( )

Definition at line 21 of file phong_material.cxx.

◆ ref_shininess()

float & cgv::media::illum::phong_material::ref_shininess ( )

Definition at line 22 of file phong_material.cxx.

◆ ref_specular()

phong_material::color_type & cgv::media::illum::phong_material::ref_specular ( )

Definition at line 20 of file phong_material.cxx.

◆ set_ambient()

void cgv::media::illum::phong_material::set_ambient ( const color_type c)

Definition at line 8 of file phong_material.cxx.

◆ set_diffuse()

void cgv::media::illum::phong_material::set_diffuse ( const color_type c)

Definition at line 9 of file phong_material.cxx.

◆ set_emission()

void cgv::media::illum::phong_material::set_emission ( const color_type c)

Definition at line 11 of file phong_material.cxx.

◆ set_shininess()

void cgv::media::illum::phong_material::set_shininess ( float  s)

Definition at line 12 of file phong_material.cxx.

◆ set_specular()

void cgv::media::illum::phong_material::set_specular ( const color_type c)

Definition at line 10 of file phong_material.cxx.

Member Data Documentation

◆ ambient

color_type cgv::media::illum::phong_material::ambient
protected

>ambient color component

Definition at line 18 of file phong_material.h.

◆ diffuse

color_type cgv::media::illum::phong_material::diffuse
protected

>diffuse color component

Definition at line 20 of file phong_material.h.

◆ emission

color_type cgv::media::illum::phong_material::emission
protected

>emissive color component

Definition at line 24 of file phong_material.h.

◆ shininess

float cgv::media::illum::phong_material::shininess
protected

>exponent of the specular cosine term

Definition at line 26 of file phong_material.h.

◆ specular

color_type cgv::media::illum::phong_material::specular
protected

>specular color component

Definition at line 22 of file phong_material.h.


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