2015-11-25 22:15:58 +00:00
|
|
|
#ifndef OPENGLVEGETATIONINSTANCE_H
|
|
|
|
#define OPENGLVEGETATIONINSTANCE_H
|
|
|
|
|
|
|
|
#include "opengl_global.h"
|
|
|
|
|
|
|
|
#include "VegetationInstance.h"
|
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace opengl {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A single instance of vegetation.
|
|
|
|
*/
|
|
|
|
class OPENGLSHARED_EXPORT OpenGLVegetationInstance {
|
|
|
|
public:
|
|
|
|
OpenGLVegetationInstance(const VegetationInstance &wrapped);
|
|
|
|
|
|
|
|
inline const VegetationModelDefinition &getModel() const {
|
|
|
|
return wrapped.getModel();
|
|
|
|
}
|
|
|
|
inline const Vector3 &getBase() const {
|
|
|
|
return wrapped.getBase();
|
|
|
|
}
|
|
|
|
inline double getSize() const {
|
|
|
|
return wrapped.getSize();
|
|
|
|
}
|
|
|
|
inline double getDistance() const {
|
|
|
|
return distance;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the distance to camera, mainly for sorting.
|
|
|
|
*/
|
|
|
|
void setDistance(double distance);
|
|
|
|
|
2015-11-29 18:18:36 +00:00
|
|
|
private:
|
2015-11-25 22:15:58 +00:00
|
|
|
VegetationInstance wrapped;
|
|
|
|
double distance;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // OPENGLVEGETATIONINSTANCE_H
|