Ignore:
Timestamp:
03/31/06 17:29:32 (18 years ago)
Author:
igarcia
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCKdTreeClusterGenerator.h

    r700 r721  
    1 #ifndef _LBBCKDTREECLUSTERGENERATOR_H 
    2 #define _LBBCKDTREECLUSTERGENERATOR_H 
     1#ifndef _LBBCKdTreeCLUSTERGENERATOR_H 
     2#define _LBBCKdTreeCLUSTERGENERATOR_H 
     3 
    34 
    45#include <BBC.h> 
    5 #include <LBBCLeafKdTreeClusterData.h> 
    6 #include <LBBCBillboardKdTreeClusterData.h> 
    7 #include <LBBCLeaf.h> 
    8 #include <LBBCLeafDistribution.h> 
    96 
    107namespace LBBC { 
     
    1613    void init(); 
    1714 
    18         void setAlpha(float value); 
    19  
    20         float getAlpha(); 
    21  
    22         void initializeBillboardCloud(); 
    23  
    24         BBC::Billboard* createBillboard(); 
    25  
    26         void initializeBillboardClusterData(BBC::Billboard *billboard); 
    27          
    28         void initializeRandomBillboard(BBC::Billboard *billboard); 
    29  
    30         void splitLeafDistribution(); 
    31  
    32         void assignLeafBillboard(Leaf *leaf, BBC::Billboard *billboard); 
    33  
    34         void recomputeBillboardCloud(); 
    35  
    36         void recomputeBillboard(BBC::Billboard *billboard); 
    37  
    38         void iterativeRecomputeBillboardCloud(); 
    39  
    40         unsigned int findBestBillboard(Leaf *leaf); 
    41  
    42         void generateBillboardCloudBounds(); 
    43  
    44         void setNumIterations(unsigned int value); 
    45  
    46         unsigned int getNumIterations(); 
    47  
    4815    KdTreeClusterGenerator(); 
    4916 
    50     ~KdTreeClusterGenerator(); 
     17    virtual ~KdTreeClusterGenerator(); 
    5118 
    5219  protected: 
    5320 
    54     float mAlpha; 
     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                } 
    5535 
    56         float mEpsilonYN; 
     36                void setLeftChild(Cell *lChild) 
     37                { 
     38                        left = lChild; 
     39                } 
    5740 
    58         float mNumIterations; 
     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        }; 
     76 
    5977}; 
    6078 
Note: See TracChangeset for help on using the changeset viewer.