added main/{Light,PointLight} modules
git-svn-id: svn://anubis/fart/trunk@48 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
parent
7d7ec130e0
commit
072bf75c04
9
main/Light.cc
Normal file
9
main/Light.cc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
#include "Light.h"
|
||||||
|
#include "util/Vector.h"
|
||||||
|
|
||||||
|
Light::Light(const Vector & position)
|
||||||
|
{
|
||||||
|
m_position = position;
|
||||||
|
}
|
||||||
|
|
18
main/Light.h
Normal file
18
main/Light.h
Normal file
@ -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
|
||||||
|
|
7
main/PointLight.cc
Executable file
7
main/PointLight.cc
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
#include "PointLight.h"
|
||||||
|
|
||||||
|
PointLight::PointLight(const Vector & position)
|
||||||
|
: Light(position)
|
||||||
|
{
|
||||||
|
}
|
16
main/PointLight.h
Executable file
16
main/PointLight.h
Executable file
@ -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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user