39 lines
906 B
C++
39 lines
906 B
C++
|
|
#ifndef LIGHT_H
|
|
#define LIGHT_H LIGHT_H
|
|
|
|
#include "util/Vector.h"
|
|
#include "util/Color.h"
|
|
|
|
class Light
|
|
{
|
|
public:
|
|
Light();
|
|
|
|
void setPosition(const Vector & position) { m_position = position; }
|
|
void setPosition(refptr<Vector> vec) { setPosition(*vec); }
|
|
const Vector & getPosition() const { return m_position; }
|
|
|
|
void setDiffuseColor(const Color & diffuse)
|
|
{
|
|
m_diffuse_color = diffuse;
|
|
}
|
|
const Color & getDiffuseColor() const { return m_diffuse_color; }
|
|
|
|
void setSpecularColor(const Color & specular)
|
|
{
|
|
m_specular_color = specular;
|
|
}
|
|
const Color & getSpecularColor() const { return m_specular_color; }
|
|
|
|
protected:
|
|
Vector m_position;
|
|
Color m_diffuse_color;
|
|
Color m_specular_color;
|
|
};
|
|
|
|
#include "PointLight.h"
|
|
|
|
#endif
|
|
|