2013-11-12 20:34:35 +00:00
|
|
|
#ifndef ATMOSPHERERENDERER_H
|
|
|
|
#define ATMOSPHERERENDERER_H
|
|
|
|
|
|
|
|
#include "software_global.h"
|
|
|
|
|
2013-12-08 19:54:34 +00:00
|
|
|
#include "Color.h"
|
2013-12-15 13:28:46 +00:00
|
|
|
#include "LightComponent.h"
|
2013-12-08 19:54:34 +00:00
|
|
|
|
2013-11-12 20:34:35 +00:00
|
|
|
namespace paysages {
|
|
|
|
namespace software {
|
|
|
|
|
|
|
|
class BaseAtmosphereRenderer
|
|
|
|
{
|
|
|
|
public:
|
2013-12-09 10:59:57 +00:00
|
|
|
BaseAtmosphereRenderer(SoftwareRenderer* parent);
|
2013-11-12 20:34:35 +00:00
|
|
|
virtual ~BaseAtmosphereRenderer() {}
|
|
|
|
|
|
|
|
virtual void getLightingStatus(LightStatus* status, Vector3 normal, int opaque);
|
|
|
|
virtual AtmosphereResult applyAerialPerspective(Vector3 location, Color base);
|
|
|
|
virtual AtmosphereResult getSkyColor(Vector3 direction);
|
|
|
|
virtual Vector3 getSunDirection();
|
|
|
|
|
2013-12-15 13:28:46 +00:00
|
|
|
void setBasicLights();
|
|
|
|
void setStaticLights(const std::vector<LightComponent> &lights);
|
|
|
|
|
2013-11-12 20:34:35 +00:00
|
|
|
protected:
|
|
|
|
virtual AtmosphereDefinition* getDefinition();
|
2013-12-09 10:59:57 +00:00
|
|
|
SoftwareRenderer* parent;
|
2013-12-15 13:28:46 +00:00
|
|
|
std::vector<LightComponent> lights;
|
2013-11-12 20:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class SoftwareBrunetonAtmosphereRenderer: public BaseAtmosphereRenderer
|
|
|
|
{
|
|
|
|
public:
|
2013-12-09 10:59:57 +00:00
|
|
|
SoftwareBrunetonAtmosphereRenderer(SoftwareRenderer* parent);
|
2013-12-08 19:54:34 +00:00
|
|
|
virtual ~SoftwareBrunetonAtmosphereRenderer();
|
2013-11-12 20:34:35 +00:00
|
|
|
|
|
|
|
virtual void getLightingStatus(LightStatus* status, Vector3 normal, int opaque) override;
|
|
|
|
virtual AtmosphereResult applyAerialPerspective(Vector3 location, Color base) override;
|
|
|
|
virtual AtmosphereResult getSkyColor(Vector3 direction) override;
|
2013-12-08 19:54:34 +00:00
|
|
|
|
2013-12-21 22:48:54 +00:00
|
|
|
inline const AtmosphereModelBruneton* getModel() const {return model;}
|
|
|
|
|
2013-12-08 19:54:34 +00:00
|
|
|
private:
|
|
|
|
AtmosphereModelBruneton* model;
|
2013-11-12 20:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // ATMOSPHERERENDERER_H
|