Ignore:
Timestamp:
03/31/06 17:29:32 (19 years ago)
Author:
igarcia
Message:
 
Location:
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCBillboard.h

    r700 r721  
    66namespace BBC { 
    77 
    8 class _BBCExport Billboard { 
     8// Forward declarations 
     9class Billboard; 
     10 
     11namespace boost 
     12{ 
     13    void intrusive_ptr_add_ref(Billboard * p); 
     14    void intrusive_ptr_release(Billboard * p); 
     15}; 
     16 
     17 
     18class _BBCExport Billboard  
     19{ 
     20private: 
     21    long references; 
     22    friend void boost::intrusive_ptr_add_ref(Billboard * p); 
     23    friend void boost::intrusive_ptr_release(Billboard * p); 
     24 
    925  public: 
    1026    Billboard(); 
    1127 
    12     ~Billboard(); 
     28    virtual ~Billboard(); 
    1329 
    1430 
     
    2541  protected: 
    2642 
    27         BillboardClusterData *mBillboardClusterData; 
     43        BillboardClusterDataPtr mBillboardClusterData; 
    2844 
    2945  public: 
    3046 
    31         void setBillboardClusterData(BillboardClusterData *value); 
     47        void setBillboardClusterData(BillboardClusterDataPtr value); 
    3248 
    33         BillboardClusterData* getBillboardClusterData(); 
     49        BillboardClusterDataPtr getBillboardClusterData(); 
    3450 
    3551}; 
    3652 
     53// class specific addref/release implementation 
     54// the two function overloads must be in the boost namespace on most compilers: 
     55namespace boost 
     56{ 
     57 inline void intrusive_ptr_add_ref(Billboard * p) 
     58  { 
     59    // increment reference count of object *p 
     60    ++(p->references); 
     61  } 
     62 
     63 
     64 
     65 inline void intrusive_ptr_release(Billboard * p) 
     66  { 
     67   // decrement reference count, and delete object when reference count reaches 0 
     68   if (--(p->references) == 0) 
     69     delete p; 
     70  }  
     71} // namespace boost 
     72 
     73typedef ::boost::intrusive_ptr<Billboard> BillboardPtr; 
     74 
    3775} 
    3876#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCBillboardCloud.h

    r709 r721  
    1313    BillboardCloud(); 
    1414 
    15     ~BillboardCloud(); 
     15    virtual ~BillboardCloud(); 
    1616 
    1717 
    1818  protected: 
    19           std::vector<Billboard*> mBillboardList; 
     19          std::vector<BillboardPtr> mBillboardList; 
    2020           
    21           std::vector<BillboardGroup*> mBillboardGroupList; 
     21          std::vector<BillboardGroupPtr> mBillboardGroupList; 
    2222 
    2323  public: 
    24         std::vector<Billboard*>* getBillboardList(); 
     24        std::vector<BillboardPtr>* getBillboardList(); 
    2525 
    26         void setBillboardList(std::vector<Billboard*> &value); 
     26        void setBillboardList(std::vector<BillboardPtr> &value); 
    2727 
    28     void addBillboard(Billboard* value); 
     28    void addBillboard(BillboardPtr value); 
    2929 
    3030    void removeBillboard(unsigned int value); 
    3131 
    32         Billboard* getBillboard(unsigned int value);     
     32        BillboardPtr getBillboard(unsigned int value);   
    3333 
    3434        unsigned int BillboardCloud::getNumBillboards(); 
     
    4242        unsigned int getNumBillboardGroups(); 
    4343 
    44         BillboardGroup* getBillboardGroup(unsigned int iBillboardGroup); 
     44        BillboardGroupPtr getBillboardGroup(unsigned int iBillboardGroup); 
    4545 
    46         void addBillboardGroup(BillboardGroup *value);  
     46        void addBillboardGroup(BillboardGroupPtr value);  
    4747 
    4848        void removeBillboardGroup(unsigned int value); 
    4949 
    5050  protected: 
    51         Entity *mEntity; 
     51        EntityPtr mEntity; 
    5252 
    5353 
    5454  public: 
    55         Entity* getEntity(); 
     55        EntityPtr getEntity(); 
    5656 
    57         void setEntity(Entity *value); 
     57        void setEntity(EntityPtr value); 
    5858 
    5959}; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCBillboardCloudGenerator.h

    r700 r721  
    1111class _BBCExport BillboardCloudGenerator { 
    1212  public: 
     13 
     14    BillboardCloudGenerator(); 
     15 
     16        virtual ~BillboardCloudGenerator(); 
     17 
    1318    void generate(); 
    1419 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCBillboardCloudSerializer.h

    r700 r721  
    1717    BillboardCloudSerializer(); 
    1818 
    19     ~BillboardCloudSerializer(); 
     19    virtual ~BillboardCloudSerializer(); 
    2020 
    2121 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCBillboardCloudUVMapper.h

    r709 r721  
    6666        void removeClusterList(unsigned int iClusterList); 
    6767 
    68         void clear(); 
     68        void shutdown(); 
    6969 
    7070        unsigned int getNumClusterLists(); 
     
    7474    BillboardCloudUVMapper(); 
    7575 
    76     ~BillboardCloudUVMapper(); 
     76    virtual ~BillboardCloudUVMapper(); 
    7777 
    7878}; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCBillboardClusterData.h

    r700 r721  
    66namespace BBC { 
    77 
    8 class _BBCExport BillboardClusterData { 
     8// Fordward declaration... 
     9class BillboardClusterData; 
     10 
     11namespace boost 
     12{ 
     13    void intrusive_ptr_add_ref(BillboardClusterData * p); 
     14    void intrusive_ptr_release(BillboardClusterData * p); 
     15}; 
     16 
     17class _BBCExport BillboardClusterData  
     18{ 
     19private: 
     20    long references; 
     21    friend void boost::intrusive_ptr_add_ref(BillboardClusterData * p); 
     22    friend void boost::intrusive_ptr_release(BillboardClusterData * p); 
     23 
    924  public: 
    1025    BillboardClusterData(); 
    1126 
    12     ~BillboardClusterData(); 
     27    virtual ~BillboardClusterData(); 
    1328 
    1429        void setNormal(Ogre::Vector3 value); 
     
    2035        float getD(); 
    2136 
    22     EntityCluster* getEntityCluster(); 
     37    EntityClusterPtr getEntityCluster(); 
    2338 
    24         void setEntityCluster(EntityCluster *value); 
     39        void setEntityCluster(EntityClusterPtr value); 
    2540 
    2641        virtual void readBillboardClusterData(TiXmlNode *parentNode); 
     
    4762 
    4863protected: 
    49         EntityCluster *mEntityCluster; 
     64        EntityClusterPtr mEntityCluster; 
    5065         
    5166        Ogre::Vector3 mAxisX; 
     
    7085}; 
    7186 
     87// class specific addref/release implementation 
     88// the two function overloads must be in the boost namespace on most compilers: 
     89namespace boost 
     90{ 
     91 inline void intrusive_ptr_add_ref(BillboardClusterData * p) 
     92  { 
     93    // increment reference count of object *p 
     94    ++(p->references); 
     95  } 
     96 
     97 
     98 
     99 inline void intrusive_ptr_release(BillboardClusterData * p) 
     100  { 
     101   // decrement reference count, and delete object when reference count reaches 0 
     102   if (--(p->references) == 0) 
     103     delete p; 
     104  }  
     105} // namespace boost 
     106 
     107typedef ::boost::intrusive_ptr<BillboardClusterData> BillboardClusterDataPtr; 
     108 
    72109} 
    73110#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCBillboardGroup.h

    r709 r721  
    66namespace BBC { 
    77 
    8 class BillboardGroup { 
     8typedef struct 
     9{ 
     10        unsigned int billboardHandle; 
     11        unsigned int width; 
     12        unsigned int height; 
     13        Ogre::Vector2 min; 
     14        Ogre::Vector2 max;  
     15} BillboardGroupedInfo; 
     16 
     17// Forward declarations 
     18class BillboardGroup; 
     19 
     20 
     21namespace boost 
     22{ 
     23    void intrusive_ptr_add_ref(BillboardGroup * p); 
     24    void intrusive_ptr_release(BillboardGroup * p); 
     25}; 
     26 
     27class BillboardGroup  
     28{ 
     29private: 
     30    long references; 
     31    friend void boost::intrusive_ptr_add_ref(BillboardGroup * p); 
     32    friend void boost::intrusive_ptr_release(BillboardGroup * p); 
     33 
    934  protected: 
    1035        std::vector<unsigned int> mBillboardHandleList; 
    1136 
    1237  public: 
     38 
     39    BillboardGroup(); 
     40 
     41        virtual ~BillboardGroup(); 
     42 
    1343    unsigned int getBillboardHandle(unsigned int iBillboard); 
    1444 
     
    1949}; 
    2050 
     51// class specific addref/release implementation 
     52// the two function overloads must be in the boost namespace on most compilers: 
     53namespace boost 
     54{ 
     55 inline void intrusive_ptr_add_ref(BillboardGroup * p) 
     56  { 
     57    // increment reference count of object *p 
     58    ++(p->references); 
     59  } 
     60 
     61 
     62 
     63 inline void intrusive_ptr_release(BillboardGroup * p) 
     64  { 
     65   // decrement reference count, and delete object when reference count reaches 0 
     66   if (--(p->references) == 0) 
     67     delete p; 
     68  }  
     69} // namespace boost 
     70 
     71typedef ::boost::intrusive_ptr<BillboardGroup> BillboardGroupPtr; 
     72 
    2173} 
    2274#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCEntity.h

    r700 r721  
    44#include <BBCPrerequisites.h> 
    55#include <BBCSubEntity.h> 
     6#include <BBCMesh.h> 
    67 
    78namespace BBC { 
    89 
     10// Forward declarations 
     11class Entity; 
     12 
     13 
     14namespace boost 
     15{ 
     16    void intrusive_ptr_add_ref(Entity * p); 
     17    void intrusive_ptr_release(Entity * p); 
     18}; 
     19 
    920class _BBCExport Entity  
    1021{ 
     22private: 
     23    long references; 
     24    friend void boost::intrusive_ptr_add_ref(Entity * p); 
     25    friend void boost::intrusive_ptr_release(Entity * p); 
     26 
    1127  protected: 
    1228 
    13         typedef std::vector<SubEntity*> SubEntityList; 
     29        typedef std::vector<SubEntityPtr> SubEntityList; 
    1430 
    1531        unsigned int mEntityHandle; 
     
    1935        SubEntityList mSubEntityList; 
    2036 
    21         Ogre::Mesh *mMesh; 
     37        MeshPtr mMesh; 
    2238         
    2339  public: 
     
    2541    Entity(); 
    2642 
    27     ~Entity(); 
     43    virtual ~Entity(); 
    2844 
    2945        void createSubEntity(); 
    3046 
    31         void addSubEntity(SubEntity *value); 
     47        void addSubEntity(SubEntityPtr value); 
    3248 
    33         SubEntity* getSubEntity(unsigned int index); 
     49        SubEntityPtr getSubEntity(unsigned int index); 
    3450 
    3551        void removeSubEntity(unsigned int index); 
    3652 
    37         virtual Ogre::Mesh* getMesh(); 
     53        virtual MeshPtr getMesh(); 
    3854 
    39         virtual void setMesh(Ogre::Mesh *value); 
     55        virtual void setMesh(MeshPtr value); 
    4056 
    4157        void loadMesh(bool mergeSubMeshes); 
     
    6581}; 
    6682 
     83// class specific addref/release implementation 
     84// the two function overloads must be in the boost namespace on most compilers: 
     85namespace boost 
     86{ 
     87 inline void intrusive_ptr_add_ref(Entity * p) 
     88  { 
     89    // increment reference count of object *p 
     90    ++(p->references); 
     91  } 
     92 
     93 
     94 
     95 inline void intrusive_ptr_release(Entity * p) 
     96  { 
     97   // decrement reference count, and delete object when reference count reaches 0 
     98   if (--(p->references) == 0) 
     99     delete p; 
     100  }  
     101} // namespace boost 
     102 
     103typedef ::boost::intrusive_ptr<Entity> EntityPtr; 
     104 
    67105} 
    68106#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCEntityCluster.h

    r700 r721  
    1111namespace BBC { 
    1212 
    13 class _BBCExport EntityCluster { 
     13// Forward declarations 
     14class EntityCluster; 
     15 
     16 
     17namespace boost 
     18{ 
     19    void intrusive_ptr_add_ref(EntityCluster * p); 
     20    void intrusive_ptr_release(EntityCluster * p); 
     21}; 
     22 
     23class _BBCExport EntityCluster  
     24{ 
     25private: 
     26    long references; 
     27    friend void boost::intrusive_ptr_add_ref(EntityCluster * p); 
     28    friend void boost::intrusive_ptr_release(EntityCluster * p); 
     29 
    1430  public: 
    1531    EntityCluster(); 
    1632 
    17     ~EntityCluster(); 
     33    virtual ~EntityCluster(); 
    1834 
    19         EntityClusterData* getEntityClusterData(unsigned int value); 
     35        void removeEntityClusterData(unsigned int value); 
    2036 
    21         void addEntityClusterData(EntityClusterData *value); 
     37        EntityClusterDataPtr getEntityClusterData(unsigned int value); 
     38 
     39        void addEntityClusterData(EntityClusterDataPtr value); 
    2240 
    2341        void removeEntitClusterData(unsigned int value); 
    2442 
    25         EntityDistribution* getEntityDistribution(); 
     43        EntityDistributionPtr getEntityDistribution(); 
    2644 
    27         void setEntityDistribution(EntityDistribution *value); 
     45        void setEntityDistribution(EntityDistributionPtr value); 
    2846 
    2947  protected: 
    3048 
    31         EntityDistribution *mEntityDistribution; 
     49        EntityDistributionPtr mEntityDistribution; 
    3250         
    33         std::vector<EntityClusterData*> mEntityClusterDataList; 
     51        std::vector<EntityClusterDataPtr> mEntityClusterDataList; 
    3452     
    3553        std::vector<unsigned int> mBillboarHandle; 
    3654 
    37         Entity *mEntity; 
     55        EntityPtr mEntity; 
    3856 
    3957        unsigned int mBillboardHandle; 
     
    4159  public: 
    4260 
    43         Entity* getEntity(); 
     61        EntityPtr getEntity(); 
    4462 
    45         void setEntity(Entity* value); 
     63        void setEntity(EntityPtr value); 
    4664 
    4765        unsigned int getNumEntitiesClusterData(); 
     
    5573}; 
    5674 
     75// class specific addref/release implementation 
     76// the two function overloads must be in the boost namespace on most compilers: 
     77namespace boost 
     78{ 
     79 inline void intrusive_ptr_add_ref(EntityCluster * p) 
     80  { 
     81    // increment reference count of object *p 
     82    ++(p->references); 
     83  } 
     84 
     85 
     86 
     87 inline void intrusive_ptr_release(EntityCluster * p) 
     88  { 
     89   // decrement reference count, and delete object when reference count reaches 0 
     90   if (--(p->references) == 0) 
     91     delete p; 
     92  }  
     93} // namespace boost 
     94 
     95typedef ::boost::intrusive_ptr<EntityCluster> EntityClusterPtr; 
     96 
     97 
    5798} 
    5899#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCEntityClusterData.h

    r700 r721  
    66namespace BBC { 
    77 
    8 class _BBCExport EntityClusterData { 
     8// Fordward declaration... 
     9class EntityClusterData; 
     10 
     11namespace boost 
     12{ 
     13    void intrusive_ptr_add_ref(EntityClusterData * p); 
     14    void intrusive_ptr_release(EntityClusterData * p); 
     15}; 
     16 
     17class _BBCExport EntityClusterData  
     18{ 
     19private: 
     20    long references; 
     21    friend void boost::intrusive_ptr_add_ref(EntityClusterData * p); 
     22    friend void boost::intrusive_ptr_release(EntityClusterData * p); 
     23 
    924  public: 
    1025    EntityClusterData(); 
    1126 
    12     ~EntityClusterData(); 
     27    virtual ~EntityClusterData(); 
    1328 
    14         void setEntity(Entity *value); 
     29        void setEntity(EntityPtr value); 
    1530 
    16         Entity* getEntity(); 
     31        EntityPtr getEntity(); 
    1732 
    1833  protected: 
    19         Entity *mEntity; 
     34        EntityPtr mEntity; 
    2035 
    2136}; 
    2237 
     38// class specific addref/release implementation 
     39// the two function overloads must be in the boost namespace on most compilers: 
     40namespace boost 
     41{ 
     42 inline void intrusive_ptr_add_ref(EntityClusterData * p) 
     43  { 
     44    // increment reference count of object *p 
     45    ++(p->references); 
     46  } 
     47 
     48 
     49 
     50 inline void intrusive_ptr_release(EntityClusterData * p) 
     51  { 
     52   // decrement reference count, and delete object when reference count reaches 0 
     53   if (--(p->references) == 0) 
     54     delete p; 
     55  }  
     56} // namespace boost 
     57 
     58typedef ::boost::intrusive_ptr<EntityClusterData> EntityClusterDataPtr; 
     59 
    2360} 
    2461#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCEntityDistribution.h

    r700 r721  
    66namespace BBC { 
    77 
    8 class _BBCExport EntityDistribution { 
     8// Forward declarations 
     9class EntityDistribution; 
     10 
     11 
     12namespace boost 
     13{ 
     14    void intrusive_ptr_add_ref(EntityDistribution * p); 
     15    void intrusive_ptr_release(EntityDistribution * p); 
     16}; 
     17 
     18class _BBCExport EntityDistribution  
     19{ 
     20private: 
     21    long references; 
     22    friend void boost::intrusive_ptr_add_ref(EntityDistribution * p); 
     23    friend void boost::intrusive_ptr_release(EntityDistribution * p); 
     24 
    925  protected: 
    10         std::vector<Entity*> mEntityList; 
     26        std::vector<EntityPtr> mEntityList; 
    1127 
    1228  public: 
    13         Entity* getEntity(unsigned int value); 
     29    EntityDistribution(); 
    1430 
    15         void addEntity(Entity *value); 
     31        virtual ~EntityDistribution(); 
     32 
     33        EntityPtr getEntity(unsigned int value); 
     34 
     35        void addEntity(EntityPtr value); 
    1636 
    1737        void removeEntity(unsigned int value); 
     
    2040}; 
    2141 
     42 
     43// class specific addref/release implementation 
     44// the two function overloads must be in the boost namespace on most compilers: 
     45namespace boost 
     46{ 
     47 inline void intrusive_ptr_add_ref(EntityDistribution * p) 
     48  { 
     49    // increment reference count of object *p 
     50    ++(p->references); 
     51  } 
     52 
     53 
     54 
     55 inline void intrusive_ptr_release(EntityDistribution * p) 
     56  { 
     57   // decrement reference count, and delete object when reference count reaches 0 
     58   if (--(p->references) == 0) 
     59     delete p; 
     60  }  
     61} // namespace boost 
     62 
     63typedef ::boost::intrusive_ptr<EntityDistribution> EntityDistributionPtr; 
     64 
    2265} 
    2366#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCEntityDistributionGenerator.h

    r700 r721  
    1313        EntityDistribution *mEntityDistribution; 
    1414 
    15     Entity *mEntity; 
     15    EntityPtr mEntity; 
    1616 
    1717  public: 
     
    2020    void init(); 
    2121 
    22         Entity* getEntity(); 
     22        EntityPtr getEntity(); 
    2323 
    24         void setEntity(Entity *value); 
     24        void setEntity(EntityPtr value); 
    2525 
    2626        void setDistribution(EntityDistribution *value); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCEntityDistributionSerializer.h

    r700 r721  
    1010class _BBCExport EntityDistributionSerializer: public BBC::XmlSerializer { 
    1111  protected: 
    12         Entity* mEntity; 
     12        EntityPtr mEntity; 
    1313 
    1414  public: 
    15     Entity* getEntity(); 
     15    EntityPtr getEntity(); 
    1616 
    17     void setEntity(Entity * value); 
     17    void setEntity(EntityPtr value); 
    1818 
    1919    void generate(); 
     
    2323    EntityDistributionSerializer(); 
    2424 
    25     ~EntityDistributionSerializer(); 
     25    virtual ~EntityDistributionSerializer(); 
    2626 
    2727}; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCManager.h

    r700 r721  
    44#include <BBCPrerequisites.h> 
    55#include <BBCSingleton.h> 
    6  
    7 //#include <ExampleFrameListener.h> 
    86 
    97namespace BBC { 
     
    1917        static Manager* getSingletonPtr(void); 
    2018 
    21         void initRenderWindow(); 
    22  
    23         Ogre::Mesh* loadMesh(Ogre::String name); 
     19        Ogre::Mesh* loadMesh(Ogre::String folderName, Ogre::String fileName); 
    2420 
    2521        Ogre::Mesh* loadXMLMesh(Ogre::String name); 
    26  
    27         void loadResources(); 
    2822 
    2923        void saveMesh(Ogre::String name); 
     
    4034 
    4135  protected: 
    42           Ogre::Root* mOgreRoot; 
    43           Ogre::MeshSerializer *mMeshSerializer; 
    44           Ogre::XMLMeshSerializer *mXMLMeshSerializer; 
    45           Ogre::DefaultHardwareBufferManager *mDefaultHardwareBufferManager; 
    46           Ogre::RenderWindow *mWnd; 
    47           Ogre::SceneManager *mScene; 
    48           Ogre::RenderSystem *mRSys; 
    49           Ogre::Camera *mCam; 
    50           Ogre::Viewport *mView; 
    51           Ogre::Math *mMath; 
    52           //ExampleFrameListener *mFrameListener; 
     36 
    5337}; 
    5438 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCOgreMeshSerializer.h

    r700 r721  
    44#include <BBCPrerequisites.h> 
    55#include <BBCEntity.h> 
     6#include <BBCMesh.h> 
    67 
    78namespace BBC { 
     
    1415        virtual ~OgreMeshSerializer(); 
    1516 
    16                 void setEntity(Entity *entity); 
     17                void setEntity(EntityPtr entity); 
    1718 
    18                 Entity* getEntity(); 
     19                EntityPtr getEntity(); 
    1920 
    2021                void exportMesh(const Ogre::String& fileName, bool mergeSubMeshes, bool tangents); 
     
    2223    protected: 
    2324 
    24                 Entity *mEntity; 
     25                EntityPtr mEntity; 
    2526                 
    26                 void buildMesh(Ogre::Mesh* pMesh, bool mergeSubmeshes); 
     27                void buildMesh(MeshPtr pMesh, bool mergeSubmeshes); 
    2728                 
    28                 void generateEntityAABB(Ogre::Mesh* pMesh); 
     29                void generateEntityAABB(MeshPtr pMesh); 
    2930                 
    30                 void exportSubMeshes(Ogre::Mesh* pMesh); 
     31                void exportSubMeshes(MeshPtr pMesh); 
    3132         
    32                 void exportSubMesh(Ogre::Mesh* pMesh, SubEntity *subEntity); 
     33                void exportSubMesh(MeshPtr pMesh, SubEntityPtr subEntity); 
    3334         
    34                 template <typename T> void writeIndexes(T* buf, SubEntity *subEntity); 
     35                template <typename T> void writeIndexes(T* buf, SubEntityPtr subEntity); 
    3536         
    3637                void createVertexBuffer(Ogre::VertexData* vd, unsigned short bufIdx, UniqueVertexList *uniqueVertexList); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCPrerequisites.h

    r700 r721  
    2323#include <OgreVertexBoneAssignment.h> 
    2424#include <OgreAxisAlignedBox.h> 
    25  
    2625#include <OgreKeyEvent.h> 
    2726#include <OgreEventListeners.h> 
     
    3130#include <OgrePixelFormat.h> 
    3231#include <OgreGpuProgram.h> 
     32#include <OgreSharedPtr.h> 
     33 
     34#include <OBA.h> 
     35 
     36#include <boost/smart_ptr.hpp> 
    3337 
    3438//#include <ospace/stl/hashset.h> 
     
    3640 
    3741#define _BBCExport __declspec( dllexport ) 
     42 
    3843#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCSingleton.h

    r700 r721  
    1 #ifndef __SINGLETON_H__ 
    2 #define __SINGLETON_H__ 
     1#ifndef __BBCSINGLETON_H__ 
     2#define __BBCSINGLETON_H__ 
    33 
    44namespace BBC { 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCSubEntity.h

    r700 r721  
    55 
    66namespace BBC { 
    7  
     7  
    88class _BBCExport UniqueVertex 
    99{ 
     
    2424typedef std::vector<UniqueVertex> UniqueVertexList; 
    2525 
    26 class _BBCExport SubEntity { 
    27   public: 
     26// Fordward declaration 
     27class SubEntity; 
     28 
     29namespace boost 
     30{ 
     31    void intrusive_ptr_add_ref(SubEntity * p); 
     32    void intrusive_ptr_release(SubEntity * p); 
     33}; 
     34 
     35class _BBCExport SubEntity 
     36{ 
     37  private: 
     38    long references; 
     39 
     40    friend void boost::intrusive_ptr_add_ref(SubEntity * p); 
     41 
     42    friend void boost::intrusive_ptr_release(SubEntity * p); 
     43 
     44  protected: 
    2845 
    2946        typedef std::vector<unsigned short int> TextureCoordSetsDimensions; 
     47 
    3048        typedef std::vector<Ogre::Vector3> Indices; 
    31  
    32   protected: 
    3349 
    3450        UniqueVertexList mUniqueVertexList; 
     
    5672    SubEntity(); 
    5773 
    58     ~SubEntity(); 
     74    virtual ~SubEntity(); 
    5975 
    6076        void enableTangents(bool value); 
     
    129145 
    130146        void generateAABBox(); 
     147 
     148        const char *GetClassName(void) const; 
     149 
    131150}; 
     151 
     152// class specific addref/release implementation 
     153// the two function overloads must be in the boost namespace on most compilers: 
     154namespace boost 
     155{ 
     156  inline void intrusive_ptr_add_ref(SubEntity * p) 
     157  { 
     158    // increment reference count of object *p 
     159    ++(p->references); 
     160  } 
     161 
     162 
     163 
     164  inline void intrusive_ptr_release(SubEntity * p) 
     165  { 
     166   // decrement reference count, and delete object when reference count reaches 0 
     167   if (--(p->references) == 0) 
     168     delete p; 
     169  }  
     170} // namespace boost 
     171 
     172typedef ::boost::intrusive_ptr<SubEntity> SubEntityPtr; 
    132173 
    133174} 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/BBC/BBCXmlSerializer.h

    r700 r721  
    1111    XmlSerializer(); 
    1212 
    13     ~XmlSerializer(); 
     13    virtual ~XmlSerializer(); 
    1414 
    1515  protected: 
    1616    Ogre::String mFilename; 
     17 
    1718        TiXmlDocument *mFile; 
     19 
    1820    bool mLoaded; 
    1921 
Note: See TracChangeset for help on using the changeset viewer.