2013-12-26 14:36:15 +00:00
|
|
|
#ifndef NIGHTSKY_H
|
|
|
|
#define NIGHTSKY_H
|
|
|
|
|
|
|
|
#include "software_global.h"
|
|
|
|
|
2015-09-24 22:12:31 +00:00
|
|
|
#include "LightSource.h"
|
|
|
|
|
2013-12-26 14:36:15 +00:00
|
|
|
namespace paysages {
|
|
|
|
namespace software {
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Night sky renderer.
|
|
|
|
*/
|
2015-11-09 21:30:46 +00:00
|
|
|
class SOFTWARESHARED_EXPORT NightSky : public LightSource {
|
|
|
|
public:
|
|
|
|
NightSky(SoftwareRenderer *renderer);
|
2013-12-26 14:36:15 +00:00
|
|
|
virtual ~NightSky();
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Update the night sky renderer, when the scenery or parent renderer changed.
|
|
|
|
*/
|
|
|
|
void update();
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Get the color of the night sky at a given direction.
|
|
|
|
* \param altitude Altitude above water level, in coordinate units (not kilometers).
|
|
|
|
*/
|
|
|
|
virtual const Color getColor(double altitude, const Vector3 &direction);
|
|
|
|
|
2015-12-10 23:36:50 +00:00
|
|
|
virtual bool getLightsAt(vector<LightComponent> &result, const Vector3 &location) const override;
|
2013-12-26 17:28:25 +00:00
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
private:
|
|
|
|
SoftwareRenderer *renderer;
|
2013-12-26 14:36:15 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // NIGHTSKY_H
|