Rev | Line | |
---|
[721] | 1 | #ifndef _LBBCKdTreeCLUSTERGENERATOR_H |
---|
| 2 | #define _LBBCKdTreeCLUSTERGENERATOR_H |
---|
[700] | 3 | |
---|
[721] | 4 | |
---|
[700] | 5 | #include <BBC.h> |
---|
| 6 | |
---|
| 7 | namespace LBBC { |
---|
| 8 | |
---|
| 9 | class _BBCExport KdTreeClusterGenerator : public BBC::BillboardCloudGenerator { |
---|
| 10 | public: |
---|
| 11 | void generate(); |
---|
| 12 | |
---|
| 13 | void init(); |
---|
| 14 | |
---|
| 15 | KdTreeClusterGenerator(); |
---|
| 16 | |
---|
[721] | 17 | virtual ~KdTreeClusterGenerator(); |
---|
[700] | 18 | |
---|
| 19 | protected: |
---|
| 20 | |
---|
[721] | 21 | class Cell
|
---|
| 22 | {
|
---|
| 23 | protected:
|
---|
| 24 | Cell *right;
|
---|
| 25 | Cell *left;
|
---|
| 26 | Ogre::Vector4 min;
|
---|
| 27 | Ogre::Vector4 max;
|
---|
| 28 |
|
---|
| 29 | public:
|
---|
| 30 | Cell()
|
---|
| 31 | {
|
---|
| 32 | right = NULL;
|
---|
| 33 | left = NULL;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | void setLeftChild(Cell *lChild)
|
---|
| 37 | {
|
---|
| 38 | left = lChild;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | void setRightChild(Cell *rChild)
|
---|
| 42 | {
|
---|
| 43 | right = rChild;
|
---|
| 44 | }
|
---|
| 45 |
|
---|
| 46 | Cell* getRightChild()
|
---|
| 47 | {
|
---|
| 48 | return right;
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | Cell* getLeftChild()
|
---|
| 52 | {
|
---|
| 53 | return left;
|
---|
| 54 | }
|
---|
| 55 |
|
---|
| 56 | Ogre::Vector4 getMin()
|
---|
| 57 | {
|
---|
| 58 | return min;
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 | Ogre::Vector4 getMax()
|
---|
| 62 | {
|
---|
| 63 | return max;
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 | void setMax(Ogre::Vector4 vmax)
|
---|
| 67 | {
|
---|
| 68 | max = vmax;
|
---|
| 69 | }
|
---|
| 70 |
|
---|
| 71 | void setMin(Ogre::Vector4 vmin)
|
---|
| 72 | {
|
---|
| 73 | min = vmin;
|
---|
| 74 | }
|
---|
| 75 | }; |
---|
[700] | 76 | |
---|
| 77 | }; |
---|
| 78 | |
---|
| 79 | } |
---|
| 80 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.