paysages3d/src/render/software/CloudsRenderer.h

64 lines
1.6 KiB
C
Raw Normal View History

#ifndef CLOUDSRENDERER_H
#define CLOUDSRENDERER_H
#include "software_global.h"
namespace paysages {
namespace software {
/*!
* \brief Software renderer of a group of cloud layers.
*/
class SOFTWARESHARED_EXPORT CloudsRenderer
{
public:
CloudsRenderer(SoftwareRenderer* parent);
virtual ~CloudsRenderer();
/*!
2013-12-04 21:52:18 +00:00
* \brief Update the renderer with the bound scenery.
*
* Don't call this if another thread is currently using this renderer.
*/
void update();
/*!
2013-12-04 21:52:18 +00:00
* \brief Get the layer renderer for a given layer.
*
* The returned renderer is managed by this object and should not be deleted.
*/
virtual BaseCloudLayerRenderer* getLayerRenderer(unsigned int layer);
/*!
2013-12-04 21:52:18 +00:00
* \brief Get the cloud model for a given layer.
*
* The returned model is managed by this object and should not be deleted.
*/
virtual BaseCloudsModel* getLayerModel(unsigned int layer);
/*!
* \brief Get the composited color, as applied on a base color and location.
*/
virtual Color getColor(const Vector3 &eye, const Vector3 &location, const Color &base);
/*!
2013-12-04 21:52:18 +00:00
* \brief Alter a light, as if passed through all layers.
*
* Return true if the light was altered.
*/
virtual bool alterLight(LightComponent* light, const Vector3 &eye, const Vector3 &location);
private:
SoftwareRenderer* parent;
2013-12-04 21:52:18 +00:00
std::vector<BaseCloudLayerRenderer*> layer_renderers;
BaseCloudLayerRenderer* fake_renderer;
2013-12-04 21:52:18 +00:00
std::vector<BaseCloudsModel*> layer_models;
BaseCloudsModel* fake_model;
};
}
}
#endif // CLOUDSRENDERER_H