- Timestamp:
- 02/22/07 16:17:24 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/include/GeoLodTreeLibrary.h
r1552 r2150 17 17 class IndexData; 18 18 class VertexData; 19 /// This class represents a tree object that is able to change its level of detail 20 /** It uses internally a LodStrips object to manage the level of detail of the trunk 21 The level of detail of the object initially is 1.0 (maximum quality) 22 */ 19 23 class LodTreeLibrary : public Geometry::LodObject 20 24 { 21 25 public: 26 /// Class constructor 27 /** Constructs an object from: 28 - LodStrips decimation info (for the trunk) 29 - LodTree simplification info (for the foliage) 30 - the Mesh containing the geometry of the tree 31 - a user-defined Geometry::IndexData instance */ 22 32 LodTreeLibrary( const LodStripsLibraryData *, 23 33 const TreeSimplificationSequence *, 24 34 Geometry::Mesh *treeGeoMesh, 25 35 Geometry::IndexData *user_indexdata); 36 37 /// Class destructor 26 38 ~LodTreeLibrary(void); 27 39 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;*/ 40 /// changes the lod of the entire object (trunk and leaves) 41 /** The value specified to chane the LOD must be in the range [0,1] ([min,max]) 42 After the LOD is calculated, this function automatically updates the indices 43 using the IndexData interface provided in the constructor. */ 44 virtual void GoToLod(Real); 35 45 46 /// changes the lod of the trunk 47 /** The value specified to chane the LOD must be in the range [0,1] ([min,max]) 48 After the LOD is calculated, this function automatically updates the indices 49 using the IndexData interface provided in the constructor.*/ 36 50 void GoToTrunkLod(Real); 51 52 /// changes the lod of the foliage 53 /** The value specified to chane the LOD must be in the range [0,1] ([min,max]) 54 After the LOD is calculated, this function automatically updates the indices 55 using the IndexData interface provided in the constructor.*/ 37 56 void GoToFoliageLod(Real); 38 57 39 // changes the lod of the entire object (trunk and leaves) 40 virtual void GoToLod(Real); 58 /// Retrieves the current real LOD factor of the object 41 59 virtual Real GetCurrentLodFactor(void) const { return (currentFoliageLodFactor+trunk->GetCurrentLodFactor())*0.5f; } 60 61 /// Retrieves a reference to the IndexData interface that manages the foliage, provided in the constructor 42 62 virtual Geometry::IndexData * GetIndexDataInterface(void){ return dataRetrievalInterface; } 43 63 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; 64 /// Retrieves a reference to the IndexData interface that manages the trunk 65 const Geometry::IndexData* CurrentLOD_Trunk_Indices(void) const; 66 67 /// Retrieves the index count of the trunk at the current level of detail 68 /** The maximum number of indices that the trunk will use to be rendered */ 52 69 uint32 GetValidTrunkIndexCount(int isubmesh) const { return trunk->GetValidIndexCount(isubmesh); } 53 // uint32 GetValidTrunkOffset(int isubmesh) const { return trunk->GetValidOffset(isubmesh); }54 70 55 // uint32 Get_Foliage_VertexCount(void) const; 71 /// Gets the index count of the foliage at its maximum level of detail 72 /** The maximum number of indices that the foliage will use to be rendered */ 56 73 uint32 Get_Foliage_MaxIndexCount(void) const; 74 75 /// Retrieves the index count of the foliage at the current level of detail 57 76 uint32 CurrentLOD_Foliage_IndexCount(void) const; 58 const IndexData* CurrentLOD_Foliage_Indices(void) const; 59 const VertexData* Get_Foliage_VertexData(void) const; 77 78 79 80 // const IndexData* CurrentLOD_Foliage_Indices(void) const; 81 // const VertexData* Get_Foliage_VertexData(void) const; 82 83 /// Specifies which submesh of the Mesh (provided through the constructor) represents the foliage 84 /** The rest submeshes are considered as aprt of the trunk. 85 This function is useful because the foliage must be rendered with triangle lists and the 86 trunk must be rendered with triangle strips */ 60 87 uint32 GetLeavesSubMesh(void) const { return mLeavesSubMesh; } 61 88
Note: See TracChangeset
for help on using the changeset viewer.