source: GTP/trunk/Lib/Geom/shared/GTGeometry/src/libs/leaves/foliage.h @ 1526

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.

RevLine 
[830]1#ifndef FOLIAGE_H
2#define FOLIAGE_H
3
[1019]4#include "GeoSubMesh.h"
[830]5#include "tlista.h"
[1019]6#include "VertexData.h"
7#include "Leaf.h"
[1078]8#include "GeoTreeSimpSequence.h"
[830]9
[1057]10class 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
[830]21class Foliage
22{
23        public :
24
[1057]25                ActiveLeafNode  *Acth; // first active leaf
[1058]26                int begin, final;
27                int active_leaf_count;
[1526]28                int leavesSubMeshID;
[830]29
[1526]30                Foliage (       int leavesSubMeshID,
31                                        const Geometry::SubMesh *,
32                                        const Geometry::TreeSimplificationSequence *    );
33
[1019]34                Foliage (const Foliage *);
[830]35                virtual ~Foliage (void); // Destructor
36               
[1058]37                void CalculateLOD(int nhojas);
[1057]38
[1526]39                RuntimeLeaf   *Leaves;
[1058]40                ActiveLeafNode  *MinDet; // first active leaf
41                int leafCount;
42                int leafTotal;
[830]43               
[1058]44                int minLeaves;
45                int TotalVerts;
[1019]46
47        private:
48
[1058]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
[1019]56                void ReadLeafs(const Geometry::SubMesh *);
57                void ReadVertices(const Geometry::SubMesh *);
[1083]58                bool ReadSimpSeq(const Geometry::TreeSimplificationSequence *); /// returns true when successful
[1058]59                void FillRoot(void);
[830]60};
61
62#endif
Note: See TracBrowser for help on using the repository browser.