paysages3d/src/render/software/SkyIntersector.h
2016-07-25 18:27:48 +02:00

29 lines
805 B
C++

#pragma once
#include "software_global.h"
#include "RayIntersector.h"
namespace paysages {
namespace software {
/**
* Ray intersector with sky.
*
* This will always hit the upper atmosphere limit, in any direction.
* If already in the upper atmosphere, it will hit immediately in front of the eye.
*/
class SOFTWARESHARED_EXPORT SkyIntersector : public RayIntersector {
public:
SkyIntersector(BaseAtmosphereRenderer *atmosphere);
virtual int getPriority() const override;
virtual bool findIntersection(const Vector3 &eye, const Vector3 &direction, double limit,
Vector3 *out_hit) const override;
virtual Color getColorAtHit(const Vector3 &eye, const Vector3 &location) const override;
private:
BaseAtmosphereRenderer *atmosphere;
};
}
}