From 072bf75c048cb754420206c22af7858788ac8b61 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 26 Jan 2009 16:05:23 +0000 Subject: [PATCH] added main/{Light,PointLight} modules git-svn-id: svn://anubis/fart/trunk@48 7f9b0f55-74a9-4bce-be96-3c2cd072584d --- main/Light.cc | 9 +++++++++ main/Light.h | 18 ++++++++++++++++++ main/PointLight.cc | 7 +++++++ main/PointLight.h | 16 ++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 main/Light.cc create mode 100644 main/Light.h create mode 100755 main/PointLight.cc create mode 100755 main/PointLight.h diff --git a/main/Light.cc b/main/Light.cc new file mode 100644 index 0000000..a151e30 --- /dev/null +++ b/main/Light.cc @@ -0,0 +1,9 @@ + +#include "Light.h" +#include "util/Vector.h" + +Light::Light(const Vector & position) +{ + m_position = position; +} + diff --git a/main/Light.h b/main/Light.h new file mode 100644 index 0000000..b826db7 --- /dev/null +++ b/main/Light.h @@ -0,0 +1,18 @@ + +#ifndef LIGHT_H +#define LIGHT_H LIGHT_H + +#include "util/Vector.h" + +class Light +{ + public: + Light(const Vector & position); + const Vector & getPosition() const { return m_position; } + + private: + Vector m_position; +}; + +#endif + diff --git a/main/PointLight.cc b/main/PointLight.cc new file mode 100755 index 0000000..448b277 --- /dev/null +++ b/main/PointLight.cc @@ -0,0 +1,7 @@ + +#include "PointLight.h" + +PointLight::PointLight(const Vector & position) + : Light(position) +{ +} diff --git a/main/PointLight.h b/main/PointLight.h new file mode 100755 index 0000000..f5a2e56 --- /dev/null +++ b/main/PointLight.h @@ -0,0 +1,16 @@ + +#ifndef POINTLIGHT_H +#define POINTLIGHT_H POINTLIGHT_H + +#include "Light.h" + +class PointLight : public Light +{ + public: + PointLight(const Vector & position); + + private: +}; + +#endif +