15 #include <vlutil/vlExceptions.h>
16 #include <osg/Drawable>
22 class DtSpeedTreeForest;
23 class DtSpeedTreeProfile;
40 myPositionArray[0] = myPositionArray[1] = myPositionArray[2] = 0.0f;
52 float myPositionArray[3];
68 const std::string& speedTreeDataPathRoot,
int randomSeed);
72 const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY );
74 virtual osg::Object*
cloneType()
const {
throw DtCorruptedState(
"Unable to clone"); } \
78 virtual
const char*
className()
const {
return "DtSpeedTreeForestDrawable"; }
84 virtual void setProfile(
int profile);
87 virtual void drawImplementation(osg::RenderInfo&)
const;
90 virtual void setTreesHaveChanged(
bool bFlag);
93 virtual bool treesHaveChanged()
const;
99 virtual osg::BoundingBox computeBound()
const;
103 virtual void setTreeClippingPlane(
float fFar);
107 virtual void setTreeLodDistances(
float fNear,
float fFar);
115 virtual void releaseGLObjects(osg::State* state = 0)
const;
126 void flushGLObjects(
unsigned int contextID)
const;
129 void createProfile(
unsigned int contextId);
130 void populateForest(
DtSpeedTreeProfile* profile,
const TreeInstanceRecordVector& recordVector );
131 bool addTree(
const TreeInstanceRecord& record );