#ifndef FOLIAGE_H #define FOLIAGE_H #include "GeoSubMesh.h" #include "tlista.h" #include "VertexData.h" #include "Leaf.h" #include "GeoTreeSimpSequence.h" class ActiveLeafNode { public : // Variable members int index;// Array of pointers to vertices int prev; int next; ActiveLeafNode (void){ index = prev = next = -1; } // Constructor }; class Foliage { public : ActiveLeafNode *Acth; // first active leaf int begin, final; int active_leaf_count; int leavesSubMeshID; Foliage ( int leavesSubMeshID, const Geometry::SubMesh *, const Geometry::TreeSimplificationSequence * ); Foliage (const Foliage *); virtual ~Foliage (void); // Destructor void CalculateLOD(int nhojas); RuntimeLeaf *Leaves; ActiveLeafNode *MinDet; // first active leaf int leafCount; int leafTotal; int minLeaves; int TotalVerts; private: bool IsActive( int num) const; int PrevActive (int h); int NextActive (int h); void RCecol(int nhojas); void RCsplit(int nhojas); void ReadLeafs(const Geometry::SubMesh *); void ReadVertices(const Geometry::SubMesh *); bool ReadSimpSeq(const Geometry::TreeSimplificationSequence *); /// returns true when successful void FillRoot(void); }; #endif