cgv
phong_material.hh
1 #pragma once
2 
3 #include <cgv/media/color.h> //@<
4 #include "lib_begin.h" //@<
5 
6 namespace cgv { //@<
7  namespace media { //@<
8  namespace illum { //@<
9 
11 class CGV_API phong_material
12 {
13 public: //@<
16 protected: //@<
26  float shininess;
27 public: //@<
30  void set_ambient(const color_type& c);
31  void set_diffuse(const color_type& c);
32  void set_specular(const color_type& c);
33  void set_emission(const color_type& c);
34  void set_shininess(float s);
35  const color_type& get_ambient() const;
36  const color_type& get_diffuse() const;
37  const color_type& get_specular() const;
38  const color_type& get_emission() const;
39  float get_shininess() const;
40  color_type& ref_ambient();
41  color_type& ref_diffuse();
42  color_type& ref_specular();
43  color_type& ref_emission();
44  float& ref_shininess();
45 }; //@<
46 
48 extern CGV_API const phong_material& default_material();
49 
50  } //@<
51  } //@<
52 } //@<
53 
54 #include <cgv/config/lib_end.h> //@<
cgv::media::illum::phong_material::shininess
float shininess
>exponent of the specular cosine term
Definition: phong_material.hh:26
cgv::media::illum::phong_material
>simple class to hold the material properties of a phong material
Definition: phong_material.hh:12
cgv::media::illum::phong_material::ambient
color_type ambient
>ambient color component
Definition: phong_material.hh:18
cgv::media::color< float, RGB, OPACITY >
cgv::media::illum::phong_material::diffuse
color_type diffuse
>diffuse color component
Definition: phong_material.hh:20
cgv::media::illum::phong_material::color_type
color< float, RGB, OPACITY > color_type
>used color type
Definition: phong_material.hh:15
cgv::media::illum::phong_material::emission
color_type emission
>emissive color component
Definition: phong_material.hh:24
cgv::media::illum::phong_material::specular
color_type specular
>specular color component
Definition: phong_material.hh:22
cgv
the cgv namespace
Definition: vr_calib.cxx:9