charles/src/material.h

37 lines
648 B
C
Raw Normal View History

2013-09-11 08:56:28 -07:00
/* material.h
*
* Materials are applied to shapes and determine color, texture mapping, shading, etc.
*
* Eryn Wells <eryn@erynwells.me>
*/
#ifndef __MATERIAL_H__
#define __MATERIAL_H__
#include "basics.h"
class Material
{
public:
2013-09-13 18:39:11 -07:00
enum {
DiffuseLightingTypeLambert = 1,
} DiffuseLightingType;
Material();
float get_diffuse_level() const;
void set_diffuse_level(const float &kd);
const Color &get_diffuse_color() const;
void set_diffuse_color(const Color &c);
2013-09-11 08:56:28 -07:00
private:
2013-09-13 18:39:11 -07:00
void _clamp_parameter(float &param);
// Diffusion parameters.
float diffuse_level;
Color diffuse_color;
2013-09-11 08:56:28 -07:00
};
#endif