source: GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodTreeLibrary.h @ 1552

Revision 1552, 2.4 KB checked in by gumbau, 18 years ago (diff)

Fixed degenerates in LodStripsFixed?

Line 
1//#include <string>
2//#include <exception>
3//#include "vertexdata.h"
4
5#ifndef _GEOLODSTREELIBRARY
6#define _GEOLODSTREELIBRARY
7
8#include "GeoMesh.h"
9#include "GeoLodStripsLibrary.h"
10#include "GeoTreeSimpSequence.h"
11#include "GeoLodObject.h"
12
13class Foliage;
14
15namespace Geometry
16{       
17        class IndexData;
18        class VertexData;
19        class LodTreeLibrary : public Geometry::LodObject
20        {
21        public:
22                LodTreeLibrary( const LodStripsLibraryData *,
23                                                const TreeSimplificationSequence *,
24                                                Geometry::Mesh *treeGeoMesh,
25                                                Geometry::IndexData *user_indexdata);
26                ~LodTreeLibrary(void);
27
28                // funciones ya descritas en la API
29/*              uint32 GoToTrunkLod(uint32 newlod);
30                uint32 MinTrunkLod(void) const;
31                uint32 MaxTrunkLod(void) const;
32                uint32 GoToFoliageLod(uint32 newlod);
33                uint32 MinFoliageLod(void) const;
34                uint32 MaxFoliageLod(void) const;*/
35
36                void GoToTrunkLod(Real);
37                void GoToFoliageLod(Real);
38
39                // changes the lod of the entire object (trunk and leaves)
40                virtual void GoToLod(Real);
41                virtual Real GetCurrentLodFactor(void) const { return (currentFoliageLodFactor+trunk->GetCurrentLodFactor())*0.5f; }
42                virtual Geometry::IndexData * GetIndexDataInterface(void){ return dataRetrievalInterface; }
43
44                // new proposed functions
45//              uint32 Get_Trunk_VertexCount(void) const;
46//              uint32 Get_Trunk_MaxIndexCount(uint32 istrip) const;
47//              uint32 CurrentLOD_Trunk_StripCount(void) const;
48//              uint32 CurrentLOD_Trunk_IndexCount(void) const;
49//              uint32 CurrentLOD_Trunk_IndexCountByStrip(uint32 istrip) const;
50/*              const VertexData* Get_Trunk_VertexData(void) const;*/
51                const IndexData* CurrentLOD_Trunk_Indices(void) const;
52                uint32 GetValidTrunkIndexCount(int isubmesh) const { return trunk->GetValidIndexCount(isubmesh); }
53//              uint32 GetValidTrunkOffset(int isubmesh) const { return trunk->GetValidOffset(isubmesh); }
54
55//              uint32 Get_Foliage_VertexCount(void) const;
56                uint32 Get_Foliage_MaxIndexCount(void) const;
57                uint32 CurrentLOD_Foliage_IndexCount(void) const;
58                const IndexData* CurrentLOD_Foliage_Indices(void) const;
59                const VertexData* Get_Foliage_VertexData(void) const;
60                uint32 GetLeavesSubMesh(void) const { return mLeavesSubMesh; }
61
62        private:
63                Foliage *foliage;
64                Geometry::LodStripsLibrary *trunk;
65                uint32 mLeavesSubMesh;
66                IndexData *dataRetrievalInterface;
67                bool delete_indexdata;
68                float currentFoliageLodFactor;
69        };
70}
71
72#endif
Note: See TracBrowser for help on using the repository browser.