35 typedef std::vector<StructureRef> StructureRefVector;
48 void SetRange(
float range);
56 StructureRefVector m_StructureRefs;
57 int m_iNumConstructed;
61 virtual void traverse(osg::NodeVisitor& nv)
63 switch(nv.getTraversalMode())
65 case(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN):
66 std::for_each(_children.begin(),_children.end(),osg::NodeAcceptOp(nv));
68 case(osg::NodeVisitor::TRAVERSE_ACTIVE_CHILDREN):
71 float distance = nv.getDistanceToEyePoint(getCenter(),
true);
80 nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR))
83 std::for_each(_children.begin(),_children.end(),osg::NodeAcceptOp(nv));
106 typedef std::vector<QueueEntry> QueueVector;
126 void SetDistance(
float fLODDistance);
132 void DoPaging(
const FPoint3 &CamPos,
int iMaxStructures,
float fDeleteDistance);
135 uint GetQueueSize() {
return m_Queue.size(); }
140 void EnableLoading(
bool b) { m_LoadingEnabled = b; }
141 bool m_LoadingEnabled;
143 int GetLoadCount() {
return m_iLoadCount; }
144 void ResetLoadCount() { m_iLoadCount = 0; }
145 int GetTotalConstructed() {
return m_iTotalConstructed; }
152 void CullFarawayStructures(
const FPoint3 &CamPos,
153 int iMaxStructures,
float fDistance);
158 int m_iLoadCount, m_iTotalConstructed;
160 osg::Group *FindCellParent(
const FPoint3 &point);
162 void AllocateCell(
int a,
int b);
163 osg::Group *GetCell(
int a,
int b);
168 #endif // PAGEDLODGRIDH