2013-12-08 16:56:59 +00:00
|
|
|
#ifndef LIGHTCOMPONENT_H
|
|
|
|
#define LIGHTCOMPONENT_H
|
|
|
|
|
|
|
|
#include "software_global.h"
|
|
|
|
|
|
|
|
#include "Color.h"
|
|
|
|
#include "Vector3.h"
|
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace software {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief One component of a LightStatus.
|
|
|
|
*
|
|
|
|
* A light component represents the amount of light received at a point from a given direction.
|
|
|
|
*/
|
2015-11-09 21:30:46 +00:00
|
|
|
class SOFTWARESHARED_EXPORT LightComponent {
|
|
|
|
public:
|
2015-09-29 20:31:25 +00:00
|
|
|
LightComponent() = default;
|
|
|
|
LightComponent(const Color &color, const Vector3 &direction, double reflection = 0.0, bool altered = true);
|
2013-12-08 16:56:59 +00:00
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
Color color; // Light power
|
|
|
|
Vector3 direction; // Direction the light is travelling
|
|
|
|
double reflection; /* Reflected factor of the light (for specular lighting) */
|
|
|
|
bool altered; /* Should the light be filtered or masked (by atmosphere, water, ground, clouds...) */
|
2013-12-08 16:56:59 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // LIGHTCOMPONENT_H
|