[138] | 1 | #include "GeoBase.h"
|
---|
| 2 | #include <Ogre.h>
|
---|
| 3 |
|
---|
| 4 | namespace Geometry
|
---|
| 5 | {
|
---|
| 6 | /// LodTreeLibrary interface class.
|
---|
| 7 | /** This module contains functions that handle the levels of detail of the input multiresolution trees.
|
---|
| 8 | For Any given resolution and object this module returns two thins: a set of triangle strips representing the trunk
|
---|
| 9 | and the branches at that resolution, and a triangle list representing the leaves at the same resolution.
|
---|
| 10 | \n\n
|
---|
| 11 |
|
---|
| 12 | Inputs:\n
|
---|
| 13 | - The module receives a file describing a multiresolution tree object.
|
---|
| 14 | .
|
---|
| 15 |
|
---|
| 16 | Outputs:\n
|
---|
| 17 | - The module returns a strip set that represents the level of deatil demanded for the trunk and a triangle list
|
---|
| 18 | that representes the level of detail for leaves.
|
---|
| 19 | .
|
---|
| 20 |
|
---|
| 21 | */
|
---|
| 22 | class LodTreeLibrary: public Ogre::Renderable,Ogre::MovableObject
|
---|
| 23 | {
|
---|
| 24 | public:
|
---|
| 25 | /// Constructor, receives as a parameter the name of the file including the multiresolution object.
|
---|
| 26 | LodTreeLibrary (std::string);
|
---|
| 27 |
|
---|
| 28 | /// Destructor.
|
---|
| 29 | ~LodTreeLibrary (void);
|
---|
| 30 |
|
---|
| 31 | /// Copy constructor
|
---|
| 32 | //LodTreeLibrary(const LodTreeLibrary&);
|
---|
| 33 |
|
---|
| 34 | /// Assignment operator
|
---|
| 35 | //LodTreeLibrary& operator =(const LodTreeLibrary&);
|
---|
| 36 |
|
---|
| 37 | /// Returns the highest LOD of the foliage.
|
---|
| 38 | uint32 MaxFoliageLod();
|
---|
| 39 |
|
---|
| 40 | /// Returns the highest LOD of the trunk.
|
---|
| 41 | uint32 MaxTrunkLod();
|
---|
| 42 |
|
---|
| 43 | /// Returns the lowest LOD of the foliage.
|
---|
| 44 | uint32 MinFoliageLod();
|
---|
| 45 |
|
---|
| 46 | /// Returns the lowest LOD of the trunk.
|
---|
| 47 | uint32 MinTrunkLod();
|
---|
| 48 |
|
---|
| 49 | /// Returns de current foliage LOD and changes to the specified LOD.
|
---|
| 50 | uint32 GoToFoliageLod(uint32);
|
---|
| 51 |
|
---|
| 52 | /// Returns de current trunk LOD and changes to the specified LOD.
|
---|
| 53 | uint32 GoToTrunkLod(uint32);
|
---|
| 54 |
|
---|
| 55 | /// Establishes the new LOD range.
|
---|
| 56 | /// Only the LODs in that range are stored and used.
|
---|
| 57 | void TrimFoliageByLod(uint32, uint32);
|
---|
| 58 |
|
---|
| 59 | /// Establishes the new LOD range.
|
---|
| 60 | /// Only the LODs in that range are stored and used.
|
---|
| 61 | void TrimTrunkByLod(uint32, uint32);
|
---|
| 62 |
|
---|
| 63 | /// Returns the number of triangles of the foliage at the highest LOD.
|
---|
| 64 | uint32 MaxFoliageFaces();
|
---|
| 65 |
|
---|
| 66 | /// Returns the number of triangles of the trunk at the highest LOD.
|
---|
| 67 | uint32 MaxTrunkFaces();
|
---|
| 68 |
|
---|
| 69 | /// Returns the number of triangles of the foliage at the lowest LOD.
|
---|
| 70 | uint32 MinFoliageFaces();
|
---|
| 71 |
|
---|
| 72 | /// Returns the number of triangles of the trunk at the lowest LOD.
|
---|
| 73 | uint32 MinTrunkFaces();
|
---|
| 74 |
|
---|
| 75 | /// Returns the number of vertices of the foliage at the highest LOD.
|
---|
| 76 | uint32 MaxFoliageVertices();
|
---|
| 77 |
|
---|
| 78 | /// Returns the number of vertices of the trunk at the highest LOD.
|
---|
| 79 | uint32 MaxTrunkVertices();
|
---|
| 80 |
|
---|
| 81 | /// Returns the number of vertices of the foliage at the lowest LOD.
|
---|
| 82 | uint32 MinFoliageVertices();
|
---|
| 83 |
|
---|
| 84 | /// Returns the number of vertices of the trunk at the lowest LOD.
|
---|
| 85 | uint32 MinTrunkVertices();
|
---|
| 86 |
|
---|
| 87 | };
|
---|
| 88 | }
|
---|