2013-12-08 16:56:59 +00:00
|
|
|
#ifndef LIGHTSTATUS_H
|
|
|
|
#define LIGHTSTATUS_H
|
|
|
|
|
|
|
|
#include "software_global.h"
|
|
|
|
|
|
|
|
#include "LightComponent.h"
|
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace software {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Light status at a given point.
|
|
|
|
*
|
|
|
|
* The light status is the combination of all LightComponent received at a given location.
|
|
|
|
*/
|
|
|
|
class SOFTWARESHARED_EXPORT LightStatus
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
LightStatus(LightingManager *manager, const Vector3 &location, const Vector3 &eye);
|
|
|
|
|
2013-12-08 19:54:34 +00:00
|
|
|
inline Vector3 getLocation() const {return location;}
|
|
|
|
|
2013-12-08 16:56:59 +00:00
|
|
|
void pushComponent(LightComponent component);
|
|
|
|
|
2013-12-08 19:54:34 +00:00
|
|
|
Color apply(const Vector3 &normal, const SurfaceMaterial &material);
|
|
|
|
|
2013-12-08 16:56:59 +00:00
|
|
|
private:
|
2013-12-26 18:03:19 +00:00
|
|
|
double max_power;
|
2013-12-08 16:56:59 +00:00
|
|
|
LightingManager* manager;
|
|
|
|
Vector3 location;
|
|
|
|
Vector3 eye;
|
|
|
|
std::vector<LightComponent> components;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // LIGHTSTATUS_H
|