paysages3d/src/render/software/VegetationModelRenderer.h
Michaël Lemaire 9a096ec329 Merge branch 'master' into vegetation
Conflicts:
	src/basics/Disk.cpp
	src/basics/Disk.h
	src/basics/SpaceSegment.cpp
	src/definition/DefinitionNode.cpp
	src/definition/DefinitionNode.h
	src/definition/Scenery.cpp
	src/definition/Scenery.h
	src/definition/SurfaceMaterial.cpp
	src/definition/SurfaceMaterial.h
	src/definition/TextureLayerDefinition.cpp
	src/definition/definition_global.h
	src/interface/commandline/tests.cpp
	src/render/opengl/OpenGLRenderer.cpp
	src/render/software/SoftwareCanvasRenderer.cpp
	src/render/software/SoftwareCanvasRenderer.h
	src/render/software/SoftwareRenderer.h
	src/render/software/TerrainRasterizer.cpp
	src/render/software/TerrainRasterizer.h
	src/render/software/TerrainRenderer.h
	src/render/software/software_global.h
2015-11-09 22:38:00 +01:00

43 lines
1.1 KiB
C++

#ifndef VEGETATIONMODELRENDERER_H
#define VEGETATIONMODELRENDERER_H
#include "software_global.h"
#include "LightFilter.h"
namespace paysages {
namespace software {
/**
* Renderer of a single instance of vegetation model (e.g a single tree).
*/
class SOFTWARESHARED_EXPORT VegetationModelRenderer : public LightFilter {
public:
VegetationModelRenderer(SoftwareRenderer *parent, const VegetationModelDefinition *model);
virtual ~VegetationModelRenderer();
/**
* Get the final color of this model on a segment.
*
* Coordinates should be expressed as relative to the model origin point.
*
* If only_hit is True, we only look whether there is a hit or not.
*/
VegetationResult getResult(const SpaceSegment &segment, bool only_hit = false) const;
/**
* Internal (relative) light filter.
*
* The 'at' parameter should be expressed as relative to the model origin point.
*/
virtual bool applyLightFilter(LightComponent &light, const Vector3 &at);
private:
SoftwareRenderer *parent;
const VegetationModelDefinition *model;
};
}
}
#endif // VEGETATIONMODELRENDERER_H