2013-12-01 18:24:53 +00:00
|
|
|
#ifndef CLOUDBASICLAYERRENDERER_H
|
|
|
|
#define CLOUDBASICLAYERRENDERER_H
|
|
|
|
|
|
|
|
#include "software_global.h"
|
|
|
|
|
|
|
|
#include "BaseCloudLayerRenderer.h"
|
|
|
|
|
2015-09-13 16:58:11 +00:00
|
|
|
typedef struct CloudSegment CloudSegment;
|
|
|
|
|
2013-12-01 18:24:53 +00:00
|
|
|
namespace paysages {
|
|
|
|
namespace software {
|
|
|
|
|
2013-12-04 21:52:18 +00:00
|
|
|
/*!
|
|
|
|
* \brief Basic cloud layer renderer.
|
|
|
|
*
|
|
|
|
* This renderer simply iters through the cloud layer, collecting cloud segments.
|
|
|
|
* It does not account for local density variations.
|
|
|
|
*/
|
2015-11-09 21:30:46 +00:00
|
|
|
class SOFTWARESHARED_EXPORT CloudBasicLayerRenderer : public BaseCloudLayerRenderer {
|
|
|
|
public:
|
|
|
|
CloudBasicLayerRenderer(SoftwareRenderer *parent);
|
2013-12-01 18:24:53 +00:00
|
|
|
|
2013-12-04 21:52:18 +00:00
|
|
|
virtual Color getColor(BaseCloudsModel *model, const Vector3 &eye, const Vector3 &location) override;
|
2015-11-09 21:30:46 +00:00
|
|
|
virtual bool alterLight(BaseCloudsModel *model, LightComponent *light, const Vector3 &eye,
|
|
|
|
const Vector3 &location) override;
|
2015-09-13 16:58:11 +00:00
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
private:
|
|
|
|
int findSegments(BaseCloudsModel *model, const Vector3 &start, const Vector3 &direction, int max_segments,
|
|
|
|
double max_inside_length, double max_total_length, double *inside_length, double *total_length,
|
|
|
|
CloudSegment *out_segments);
|
2013-12-01 18:24:53 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // CLOUDBASICLAYERRENDERER_H
|