source: GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCLeaf.h @ 721

Revision 721, 1.7 KB checked in by igarcia, 19 years ago (diff)
Line 
1#ifndef _LBBCLEAF_H
2#define _LBBCLEAF_H
3
4
5#include "BBCEntity.h"
6
7namespace LBBC {
8
9class _BBCExport Leaf : public BBC::Entity {
10  protected:
11    Ogre::Vector3 mPosition;
12
13    Ogre::Quaternion mOrientation;
14
15        float mLeafD;
16
17    float mPlaneD;
18
19    Ogre::Vector3 mPlaneNormal;
20
21        Ogre::Vector3 mLeafNormal;
22
23        std::vector<Ogre::Vector3> mFacesNormals;
24
25        //typedef std::set<unsigned int,std::greater<unsigned int> > ID_FACESet;
26        //typedef std::hash_set <unsigned int, hash<unsigned int >, equal_to<unsigned int > > ID_FACESet;
27        // Working version...
28        //std::hash_set<int, std::hash_compare<int, std::greater<unsigned int> > > subTri;
29        typedef stdext::hash_set <unsigned int> ID_FACESet;
30        ID_FACESet mFacesEntitySet;
31
32  public:
33    bool hasFace(unsigned int value);
34
35        void addFace(unsigned int value);
36
37        void removeFace(unsigned int value);
38
39        unsigned int getFace(unsigned int value);
40
41        unsigned int getNumFaces();
42
43        void addFaceNormal(Ogre::Vector3 value);
44
45        void removeFaceNormal(unsigned int value);
46
47        Ogre::Vector3 getFaceNormal(unsigned int value);
48   
49    void setPlaneD(float value);
50
51    float getPlaneD();
52
53        void setPlaneNormal(Ogre::Vector3 value);
54
55        Ogre::Vector3 getPlaneNormal();
56
57        void setPosition(Ogre::Vector3 value);
58
59        Ogre::Vector3 getPosition();
60
61        Ogre::Quaternion getOrientation();
62
63        void setOrientation(const Ogre::Quaternion & Quaternion);
64
65        unsigned int getNumLeafNormals();
66       
67        void setLeafNormal(Ogre::Vector3 normal);
68
69        Ogre::Vector3 getLeafNormal();
70
71        void setLeafD(float leafD);
72
73        float getLeafD();
74
75        void addFaceInfo(BBC::UniqueVertex v0, BBC::UniqueVertex v1, BBC::UniqueVertex v2);
76
77        void readLeaf(TiXmlNode *leafNode);
78
79        void writeLeaf(TiXmlNode *leafNode);
80
81    Leaf();
82
83    virtual ~Leaf();
84
85};
86
87}
88#endif
Note: See TracBrowser for help on using the repository browser.