cgv
Loading...
Searching...
No Matches
phong_material.h
1#pragma once
2
3#include <cgv/media/color.h> //@<
4#include "lib_begin.h" //@<
5
6namespace cgv { //@<
7 namespace media { //@<
8 namespace illum { //@<
9
11class CGV_API phong_material
12{
13public: //@<
16protected: //@<
26 float shininess;
27public: //@<
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
48extern CGV_API const phong_material& default_material();
49
50 } //@<
51 } //@<
52} //@<
53
54#include <cgv/config/lib_end.h> //@<
represent a color with components of given type and color and alpha model as specified.
Definition color.h:574
>simple class to hold the material properties of a phong material
color< float, RGB, OPACITY > color_type
>used color type
color_type ambient
>ambient color component
color_type emission
>emissive color component
color_type diffuse
>diffuse color component
color_type specular
>specular color component
float shininess
>exponent of the specular cosine term
the cgv namespace
Definition print.h:11