paysages3d/src/render/software/AtmosphereRenderer.h

49 lines
1.4 KiB
C
Raw Normal View History

#ifndef ATMOSPHERERENDERER_H
#define ATMOSPHERERENDERER_H
#include "software_global.h"
2015-09-24 22:12:31 +00:00
#include "LightSource.h"
namespace paysages {
namespace software {
class BaseAtmosphereRenderer : public LightSource {
public:
BaseAtmosphereRenderer(SoftwareRenderer *parent);
virtual ~BaseAtmosphereRenderer() {
}
virtual AtmosphereResult applyAerialPerspective(const Vector3 &location, const Color &base);
virtual AtmosphereResult getSkyColor(const Vector3 &direction);
virtual Vector3 getSunDirection(bool cache = true) const;
2015-09-24 22:12:31 +00:00
virtual bool getLightsAt(std::vector<LightComponent> &result, const Vector3 &location) const override;
2013-12-15 13:28:46 +00:00
protected:
virtual AtmosphereDefinition *getDefinition() const;
SoftwareRenderer *parent;
};
class SoftwareBrunetonAtmosphereRenderer : public BaseAtmosphereRenderer {
public:
SoftwareBrunetonAtmosphereRenderer(SoftwareRenderer *parent);
virtual ~SoftwareBrunetonAtmosphereRenderer();
virtual AtmosphereResult applyAerialPerspective(const Vector3 &location, const Color &base) override;
virtual AtmosphereResult getSkyColor(const Vector3 &direction) override;
2015-09-24 22:12:31 +00:00
virtual bool getLightsAt(std::vector<LightComponent> &result, const Vector3 &location) const override;
inline const AtmosphereModelBruneton *getModel() const {
return model;
}
2013-12-21 22:48:54 +00:00
private:
AtmosphereModelBruneton *model;
};
}
}
#endif // ATMOSPHERERENDERER_H