Revision 1526,
1.3 KB
checked in by gumbau, 18 years ago
(diff) |
Updated modules to the new interface and the new simplification algorithm improvements.
|
Line | |
---|
1 | #ifndef FOLIAGE_H
|
---|
2 | #define FOLIAGE_H
|
---|
3 |
|
---|
4 | #include "GeoSubMesh.h"
|
---|
5 | #include "tlista.h"
|
---|
6 | #include "VertexData.h"
|
---|
7 | #include "Leaf.h"
|
---|
8 | #include "GeoTreeSimpSequence.h"
|
---|
9 |
|
---|
10 | class ActiveLeafNode
|
---|
11 | {
|
---|
12 | public :
|
---|
13 | // Variable members
|
---|
14 | int index;// Array of pointers to vertices
|
---|
15 | int prev;
|
---|
16 | int next;
|
---|
17 |
|
---|
18 | ActiveLeafNode (void){ index = prev = next = -1; } // Constructor
|
---|
19 | };
|
---|
20 |
|
---|
21 | class Foliage
|
---|
22 | {
|
---|
23 | public :
|
---|
24 |
|
---|
25 | ActiveLeafNode *Acth; // first active leaf
|
---|
26 | int begin, final;
|
---|
27 | int active_leaf_count;
|
---|
28 | int leavesSubMeshID;
|
---|
29 |
|
---|
30 | Foliage ( int leavesSubMeshID,
|
---|
31 | const Geometry::SubMesh *,
|
---|
32 | const Geometry::TreeSimplificationSequence * );
|
---|
33 |
|
---|
34 | Foliage (const Foliage *);
|
---|
35 | virtual ~Foliage (void); // Destructor
|
---|
36 |
|
---|
37 | void CalculateLOD(int nhojas);
|
---|
38 |
|
---|
39 | RuntimeLeaf *Leaves;
|
---|
40 | ActiveLeafNode *MinDet; // first active leaf
|
---|
41 | int leafCount;
|
---|
42 | int leafTotal;
|
---|
43 |
|
---|
44 | int minLeaves;
|
---|
45 | int TotalVerts;
|
---|
46 |
|
---|
47 | private:
|
---|
48 |
|
---|
49 | bool IsActive( int num) const;
|
---|
50 | int PrevActive (int h);
|
---|
51 | int NextActive (int h);
|
---|
52 |
|
---|
53 | void RCecol(int nhojas);
|
---|
54 | void RCsplit(int nhojas);
|
---|
55 |
|
---|
56 | void ReadLeafs(const Geometry::SubMesh *);
|
---|
57 | void ReadVertices(const Geometry::SubMesh *);
|
---|
58 | bool ReadSimpSeq(const Geometry::TreeSimplificationSequence *); /// returns true when successful
|
---|
59 | void FillRoot(void);
|
---|
60 | };
|
---|
61 |
|
---|
62 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.