added util/Color module, updated Light and PointLight
git-svn-id: svn://anubis/fart/trunk@49 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
072bf75c04
commit
e0d545a6b7
6 files changed
+76
-7
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
#include "Light.h"
|
||||
#include "util/Vector.h"
|
||||
|
||||
Light::Light(const Vector & position)
|
||||
Light::Light(const Vector & position, const Color & color)
|
||||
{
|
||||
m_position = position;
|
||||
}
|
||||
|
||||
+3
-2
@@ -3,14 +3,15 @@
|
||||
#define LIGHT_H LIGHT_H
|
||||
|
||||
#include "util/Vector.h"
|
||||
#include "util/Color.h"
|
||||
|
||||
class Light
|
||||
{
|
||||
public:
|
||||
Light(const Vector & position);
|
||||
Light(const Vector & position, const Color & color = Color::white);
|
||||
const Vector & getPosition() const { return m_position; }
|
||||
|
||||
private:
|
||||
protected:
|
||||
Vector m_position;
|
||||
};
|
||||
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "PointLight.h"
|
||||
|
||||
PointLight::PointLight(const Vector & position)
|
||||
: Light(position)
|
||||
PointLight::PointLight(const Vector & position, const Color & color)
|
||||
: Light(position, color)
|
||||
{
|
||||
}
|
||||
+3
-2
@@ -3,13 +3,14 @@
|
||||
#define POINTLIGHT_H POINTLIGHT_H
|
||||
|
||||
#include "Light.h"
|
||||
#include "util/Color.h"
|
||||
|
||||
class PointLight : public Light
|
||||
{
|
||||
public:
|
||||
PointLight(const Vector & position);
|
||||
PointLight(const Vector & position, const Color & color = Color::white);
|
||||
|
||||
private:
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user