1#include "phong_material.h"
7 phong_material::phong_material() : ambient(0.1f,0.1f,0.1f,1), diffuse(0.5f,0.5f,0.5f,1), specular(0.5f, 0.5f, 0.5f,1), emission(0,0,0,1), shininess(50.0f) {}
8 void phong_material::set_ambient(
const color_type& c) {
ambient = c; }
9 void phong_material::set_diffuse(
const color_type& c) {
diffuse = c; }
10 void phong_material::set_specular(
const color_type& c) {
specular = c; }
11 void phong_material::set_emission(
const color_type& c) {
emission = c; }
12 void phong_material::set_shininess(
float s) {
shininess = s; }
17 float phong_material::get_shininess()
const {
return shininess; }
22 float& phong_material::ref_shininess() {
return shininess; }
24 const phong_material& default_material() {
static phong_material mat;
return mat; }