Changeset 731


Ignore:
Timestamp:
04/06/06 20:48:19 (18 years ago)
Author:
igarcia
Message:
 
Location:
GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE
Files:
8 added
1 deleted
40 edited

Legend:

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

    r721 r731  
    77namespace BBC { 
    88 
    9 class _BBCExport Manager : public CSingleton<Manager> { 
     9class _BBCExport BBCManager : public CSingleton<BBCManager> { 
    1010  public: 
    11     Manager(); 
     11    BBCManager(); 
    1212         
    13     ~Manager(); 
     13    ~BBCManager(); 
    1414 
    15         static Manager& getSingleton(void); 
     15        static BBCManager& getSingleton(void); 
    1616     
    17         static Manager* getSingletonPtr(void); 
     17        static BBCManager* getSingletonPtr(void); 
    1818 
    1919        Ogre::Mesh* loadMesh(Ogre::String folderName, Ogre::String fileName); 
     
    2424 
    2525        void saveXMLMesh(Ogre::String name); 
     26 
     27        void saveMaterial(Ogre::String materialName); 
    2628 
    2729        void initialize(void); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IBRBillboardCloudTreeApplication.h

    r721 r731  
    22#define _IBRBILLBOARDCLOUDTREEAPPLICATION_H 
    33 
     4#include <IMG.h> 
     5#include <LBBC.h> 
    46#include <OBAOgreApplication.h> 
    5 #include <LBBC.h> 
    67#include <IBRBillboardCloudTreeFrameListener.h> 
    78 
     
    1516protected: 
    1617         
     18        LBBC::SampleConfigFile *mSampleConfigFile; 
     19 
    1720        CommandLineOptions mOpts; 
    1821         
    19         LBBC::Manager* mLBBCManager; 
     22        LBBC::LBBCManager* mLBBCManager; 
    2023 
    2124        int findCommandLineOpts(int numargs, char** argv, Ogre::UnaryOptionList& unaryOptList, Ogre::BinaryOptionList& binOptList); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMG.h

    r721 r731  
    22#define _IMG_H 
    33 
     4#include <IMGTexture.h> 
     5#include <IMGTextureAtlas.h> 
     6 
    47#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGBBox.h

    r721 r731  
    2525//      this class encaplusalte the ogre::AxisAlignedBox 
    2626//* 
    27 class BBox: public Ogre::AxisAlignedBox { 
     27class _IMGExport BBox: public Ogre::AxisAlignedBox { 
    2828  public: 
    2929    BBox(); 
     
    3131        ~BBox(); 
    3232 
    33     void StartBoundingBox(); 
     33    void initialize(); 
    3434 
    35         Ogre::Vector3 GetMinimum(); 
     35        Ogre::Vector3 getMinimum(); 
    3636 
    37         Ogre::Vector3 GetMaximum(); 
     37        Ogre::Vector3 getMaximum(); 
    3838 
    39     void AddBoundingVector3(float x, float y, float z); 
     39    void addBoundingVector3(float x, float y, float z); 
    4040 
    41     void Print(); 
     41    void print(); 
    4242 
    43         Ogre::Vector3 GetCorner(int corner) const; 
     43        Ogre::Vector3 getCorner(int corner) const; 
    4444 
    4545    bool intersects(Ogre::Vector3 v); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGBox2d.h

    r721 r731  
    77 
    88//* this class represents a 2d bound box for a texture  
    9 class Box2d  
     9class _IMGExport Box2d  
    1010{ 
    1111        public: 
     
    2222                } 
    2323 
    24                 Ogre::Vector2 GetMinimum(); 
     24                Ogre::Vector2 getMinimum(); 
    2525 
    26                 Ogre::Vector2 GetMaximum();  
     26                Ogre::Vector2 getMaximum();  
    2727 
    28                 void SetBoundBox(float x, float y, float X, float Y);  
     28                void setBoundBox(float x, float y, float X, float Y);  
    2929 
    30                 void AddBoundingVector3(float x, float y); 
     30                void addBoundingVector3(float x, float y); 
    3131 
    32                 void Print();  
     32                void print();  
    3333 
    34                 Ogre::Vector2 GetCorner(int corner) const; 
     34                Ogre::Vector2 getCorner(int corner) const; 
    3535 
    36                 bool In(int w, int h);  
     36                bool in(int w, int h);  
    3737 
    38                 bool FitPerfect(int w, int h); 
     38                bool fitPerfect(int w, int h); 
    3939 
    4040        protected: 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGBsp.h

    r721 r731  
    77namespace IMG { 
    88 
    9 class Bsp { 
     9class _IMGExport Bsp { 
    1010  public: 
    1111    Bsp(); 
     
    1313    virtual ~Bsp(); 
    1414 
    15     void SetRoot(NodeBspPtr node); 
     15    void setRoot(NodeBspPtr node); 
    1616 
    17     void Print(); 
     17    void print(); 
    1818 
    19     void PrintLeaf();  
     19    void printLeaf();  
    2020 
    21     NodeBspPtr Insert(int w, int h, int idcluster); 
     21    NodeBspPtr insert(int w, int h, int idcluster); 
    2222 
    23     NodeBspPtr Get(int i); 
     23    NodeBspPtr get(int i); 
    2424 
    2525  protected: 
     
    3030    int counttotal; 
    3131 
    32     void Print(NodeBspPtr node); 
     32    void print(NodeBspPtr node); 
    3333 
    34     void PrintLeaf(NodeBspPtr node); 
     34    void printLeaf(NodeBspPtr node); 
    3535 
    3636}; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGCluster.h

    r721 r731  
    1111{ 
    1212 
    13 class Cluster  
     13class _IMGExport Cluster  
    1414{ 
    1515  public: 
    1616    Cluster(); 
     17 
     18    virtual ~Cluster(); 
    1719 
    1820    Cluster & operator =(const Cluster & p); 
     
    2022    Cluster(const Cluster & p); 
    2123 
    22         void SetNormal(Ogre::Vector3* n); 
     24        void setNormal(Ogre::Vector3* n); 
    2325 
    24         Ogre::Vector3* GetNormal(); 
     26        Ogre::Vector3* getNormal(); 
    2527 
    26     BBox* GetBound(); 
     28    BBox* getBound(); 
    2729 
    28     Box2d* GetBspNodeBound(); 
     30    Box2d* getBspNodeBound(); 
    2931 
    30     void SetBspNodeBound(Box2d* box); 
     32    void setBspNodeBound(Box2d* box); 
    3133 
    32     void Print(); 
     34    void print(); 
    3335 
    3436    //* return the dominant normal axis, for calculate the 2d projection 
    35     int AxisProjected(); 
     37    int axisProjected(); 
    3638 
    37     int GetId() const; 
     39    int getId() const; 
    3840 
    39     void SetId(int id_); 
     41    void setId(int id_); 
    4042 
    41         std::vector<Ogre::Vector3>* GetVector3sVector(); 
     43        std::vector<Ogre::Vector3>* getVector3sVector(); 
    4244 
    43         Ogre::Vector3* GetVector3sTex() const; 
     45        Ogre::Vector3* getVector3sTex() const; 
    4446 
    45     void Finish(); 
     47    void finish(); 
    4648 
    47         void SetPlane(Ogre::Vector3* normal, Ogre::Vector3 * point); 
     49        void setPlane(Ogre::Vector3* normal, Ogre::Vector3 * point); 
    4850 
    49     Plane3 * GetPlane(); 
     51    Plane3 * getPlane(); 
    5052 
    5153    //* Return the increment in U (lumel increment in x). For patchs calculation  
    52         Ogre::Vector3 GetIncU(); 
     54        Ogre::Vector3 getIncU(); 
    5355 
    5456    //* Return the increment in V (lumel increment in x). For patchs calculation  
    55         Ogre::Vector3 GetIncV(); 
     57        Ogre::Vector3 getIncV(); 
    5658 
    5759    //* Return the origin. For patchs calculation  
    58         Ogre::Vector3 GetOrigin(); 
     60        Ogre::Vector3 getOrigin(); 
    5961 
    60         bool PointIn(Ogre::Vector3 & point); 
     62        bool pointIn(Ogre::Vector3 & point); 
    6163 
    6264        Ogre::Real *pointeru[4];  
     
    9395    Plane3 plane; 
    9496 
    95   public: 
    96     virtual ~Cluster(); 
    97  
    9897}; 
    9998 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGCluster2d.h

    r721 r731  
    88class Cluster; 
    99 
    10 class Cluster2d { 
     10class _IMGExport Cluster2d { 
    1111  public: 
    1212    Cluster2d(); 
     
    1717    //                   
    1818    //    
    19     int Create2d(Cluster * cluster, int type, int type_vertexs); 
     19    int create2d(Cluster * cluster, int type, int type_vertexs); 
    2020 
    21     void Print(); 
     21    void print(); 
    2222 
    23         Ogre::Vector2 * GetVector3s(); 
     23        Ogre::Vector2 * getVector3s(); 
    2424 
    25         std::vector<Ogre::Vector2> * GetVector3sVector(); 
     25        std::vector<Ogre::Vector2> * getVector3sVector(); 
    2626 
    27         Ogre::Vector3 * GetNormal(); 
     27        Ogre::Vector3 * getNormal(); 
    2828 
    2929  protected: 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGClusterList.h

    r721 r731  
    77namespace IMG { 
    88 
    9 class ClusterList  
     9class _IMGExport ClusterList  
    1010{ 
    1111  public: 
     
    1414    virtual ~ClusterList(); 
    1515     
    16     std::vector<Cluster> * GetList(); 
     16    std::vector<Cluster> * getList(); 
    1717 
    1818    //return the pointer to the list of voxels 
    19     unsigned int GetSize() const; 
     19    unsigned int getSize() const; 
    2020 
    2121    //return the number of elements of list 
    22     Cluster * Get(unsigned int i); 
     22    Cluster * get(unsigned int i); 
    2323 
    24     bool Insert(Cluster * p); 
     24    bool insert(Cluster * p); 
    2525 
    26     void Print(); 
     26    void print(); 
    2727 
    2828 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGNodeBsp.h

    r721 r731  
    88 
    99// Fordward declaration... 
    10 class NodeBsp; 
     10class _IMGExport NodeBsp; 
    1111 
    1212typedef ::boost::intrusive_ptr<NodeBsp> NodeBspPtr; 
     
    2525    virtual ~NodeBsp(); 
    2626 
    27     Box2d* GetBound(); 
     27    Box2d* getBound(); 
    2828 
    29     void SetBound(Box2d *box); 
     29    void setBound(Box2d *box); 
    3030 
    31     NodeBspPtr GetChild(int i); 
     31    NodeBspPtr getChild(int i); 
    3232 
    33     void SetId(int id_); 
     33    void setId(int id_); 
    3434 
    35     unsigned int GetId() const; 
     35    unsigned int getId() const; 
    3636 
    37     void SetChild(NodeBspPtr node, int i); 
     37    void setChild(NodeBspPtr node, int i); 
    3838 
    39     void Print(); 
     39    void print(); 
    4040 
    41     NodeBspPtr Insert(int w, int h); 
     41    NodeBspPtr insert(int w, int h); 
    4242 
    43     NodeBspPtr Get(NodeBspPtr node, int i); 
     43    NodeBspPtr get(NodeBspPtr node, int i); 
    4444 
    4545  protected: 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGPlane3.h

    r721 r731  
    66namespace IMG { 
    77 
    8 class Plane3: public Ogre::Plane { 
     8class _IMGExport Plane3: public Ogre::Plane { 
    99  public: 
    1010    //a plane's interface 
     
    1515    Plane3 & operator =(const Plane3 & p); 
    1616 
    17         Ogre::Vector3 * GetNormal(); 
     17        Ogre::Vector3 * getNormal(); 
    1818 
    19     void SetNormal(float x, float y, float z); 
     19    void setNormal(float x, float y, float z); 
    2020 
    21     void SetDistance(float dist); 
     21    void setDistance(float dist); 
    2222 
    23     float GetDistance() const; 
     23    float getDistance() const; 
    2424 
    25     void Print(); 
     25    void print(); 
    2626 
    2727}; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/IMG/IMGPrerequisites.h

    r721 r731  
    88#include <OgrePlane.h> 
    99#include <OgreAxisAlignedBox.h>  
     10#include <OgreHardwarePixelBuffer.h> 
     11#include <OgreImageCodec.h> 
     12 
     13#include <imdebug.h> 
    1014 
    1115#include <boost/smart_ptr.hpp> 
    1216 
     17#       if defined( IMG_LIB_BUILD ) 
     18#               define _IMGExport __declspec( dllexport )                        
     19#       else 
     20#               define _IMGExport 
     21#       endif 
     22 
    1323#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBC.h

    r721 r731  
    99#include <LBBCBillboardViewMode.h> 
    1010#include <LBBCClusterViewMode.h> 
    11  
     11#include <LBBCEntityTextureAtlasViewMode.h> 
    1212#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCManager.h

    r721 r731  
    1515namespace LBBC { 
    1616 
    17 class _BBCExport Manager : public BBC::Manager { 
     17class _BBCExport LBBCManager : public BBC::BBCManager { 
    1818  public: 
    19     Manager(); 
     19    LBBCManager(); 
    2020 
    21     ~Manager(); 
     21    ~LBBCManager(); 
    2222 
    2323        void runSampleConfigFile(); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/LBBC/LBBCSampleConfigFile.h

    r721 r731  
    1212    virtual ~SampleConfigFile(); 
    1313 
     14        Ogre::String getEntitySampleMaterialPrefixName(); 
     15 
    1416        bool getEntityDistributionMerged(); 
    1517 
     
    2022        bool getEntityDistributionSplitted(); 
    2123 
    22         Ogre::String getEntitySampleMeshPrefixFilename(); 
     24        Ogre::String getEntitySampleMeshPrefixName(); 
    2325 
    2426        bool getEntityDistributionGeneration(); 
     
    2628        Ogre::String getEntityDistributionFolder(); 
    2729 
    28         Ogre::String getEntityDistributionXMLPrefixFilename(); 
     30        Ogre::String getEntityDistributionXMLPrefixName(); 
    2931 
    3032        Ogre::String getEntitiesFolder(); 
     
    3234        bool getEntitySampleMeshGeneration(); 
    3335 
    34         Ogre::String getEntitiesMeshPrefixFilename(); 
     36        Ogre::String getEntitiesMeshPrefixName(); 
    3537 
    3638        bool getEntityClustersGeneration(); 
     
    4850        bool getEntityClustersSplittedClusters(); 
    4951 
    50         Ogre::String getEntityClustersMeshPrefixFilename(); 
     52        Ogre::String getEntityClustersMeshPrefixName(); 
    5153 
    52         Ogre::String getEntityClustersMaterialPrefixFilename(); 
     54        Ogre::String getEntityClustersMaterialPrefixName(); 
    5355 
    5456        bool getBillboardCloudMergedBillboards(); 
     
    6062        Ogre::String getBillboardCloudFolder(); 
    6163 
    62         Ogre::String getBillboardCloudMeshPrefixFilename(); 
     64        Ogre::String getBillboardCloudMeshPrefixName(); 
    6365 
    64         Ogre::String getBillboardCloudMaterialPrefixFilename(); 
     66        Ogre::String getBillboardCloudBillboardMaterialPrefixName(); 
    6567 
    66         Ogre::String getBillboardCloudXMLPrefixFilename(); 
     68        Ogre::String getBillboardCloudBillboardGroupMaterialPrefixName(); 
    6769 
    68         bool getBillboardCloudDiffuseColorTextureAtlasGeneration(); 
     70        Ogre::String getBillboardCloudBillboardTextureUnit0PrefixName(); 
    6971 
    70         unsigned int getBillboardCloudDiffuseColorTextureSize(); 
     72        Ogre::String getBillboardCloudBillboardGroupTextureUnit0PrefixName(); 
    7173 
    72         unsigned int getBillboardCloudDiffuseColorTextureAtlasSize(); 
    73  
    74         bool getBillboardCloudIndirectTextureAtlasGeneration(); 
    75  
    76         unsigned int getBillboardCloudIndirectTextureSize(); 
    77  
    78         unsigned int getBillboardCloudIndirectTextureAtlasSize(); 
     74        Ogre::String getBillboardCloudXMLPrefixName(); 
    7975 
    8076        unsigned int getBillboardCloudGroups(); 
    8177 
    8278        bool getBillboardCloudGroupedBillboards(); 
     79 
     80        bool getBillboardCloudDiffuseColorEntityTextureAtlasGeneration(); 
     81 
     82        Ogre::String getBillboardCloudDiffuseColorEntityTexturePrefixName(); 
     83 
     84        Ogre::String getBillboardCloudDiffuseColorEntityTextureAtlasPrefixName(); 
     85 
     86        unsigned int getBillboardCloudDiffuseColorEntityTextureAtlasBitRange(); 
     87 
     88        unsigned int getBillboardCloudDiffuseColorEntityTextureAtlasSize(); 
     89 
     90        unsigned int getBillboardCloudDiffuseColorBillboardGroupTextureSize(); 
     91 
     92        bool getBillboardCloudIndirectBillboardGroupTextureAtlasGeneration(); 
     93 
     94        Ogre::String getBillboardCloudIndirectBillboardGroupTextureAtlasPrefixName(); 
     95 
     96        unsigned int getBillboardCloudIndirectBillboardGroupTextureAtlasBitRange(); 
     97 
     98        unsigned int getBillboardCloudIndirectBillboardGroupTextureAtlasSize(); 
     99 
     100        unsigned int getBillboardCloudIndirectBillboardGroupTextureSize(); 
     101 
     102        bool getBillboardCloudDiffuseColorBillboardGroupTextureAtlasGeneration(); 
     103 
     104        bool getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasGeneration(); 
     105 
     106        Ogre::String getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasPrefixName(); 
     107 
     108        unsigned int getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasBitRange(); 
     109 
     110        unsigned int getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasSize(); 
     111 
     112        unsigned int getBillboardCloudDiffuseColorMergedBillboardsTextureSize(); 
     113 
     114        unsigned int getBillboardCloudDiffuseColorBillboardGroupTextureAtlasSize(); 
     115 
     116        unsigned int getBillboardCloudDiffuseColorEntityTextureAtlasNumSamples(); 
     117 
     118        bool getBillboardCloudIndirectMergedBillboardsTextureAtlasGeneration(); 
     119 
     120        Ogre::String getBillboardCloudIndirectMergedBillboardsTextureAtlasPrefixName(); 
     121 
     122        unsigned int getBillboardCloudIndirectMergedBillboardsTextureAtlasBitRange(); 
     123 
     124        unsigned int getBillboardCloudIndirectMergedBillboardsTextureAtlasSize(); 
     125 
     126        unsigned int getBillboardCloudIndirectMergedBillboardsTextureSize(); 
    83127 
    84128}; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/OBA/OBAOgreBase.h

    r721 r731  
    3434  protected: 
    3535          Ogre::ArchiveManager *mArchiveManager; 
     36           
    3637          Ogre::ResourceGroupManager *mResourceGroupManager; 
     38           
    3739          Ogre::DefaultHardwareBufferManager *mDefaultHardwareBufferManager; 
     40           
    3841          Ogre::MeshSerializer *mMeshSerializer; 
     42           
     43          Ogre::MaterialSerializer *mMaterialSerializer; 
     44 
    3945          Ogre::XMLMeshSerializer *mXMLMeshSerializer; 
     46           
    4047          Ogre::MaterialManager *mMaterialManager; 
     48           
    4149          Ogre::LogManager *mLogManager; 
     50           
    4251          Ogre::MeshManager *mMeshManager; 
     52           
    4353          FileSystemArchiveFactory *mFileSystemArchiveFactory; 
     54 
    4455          Ogre::Math *mMath; 
    4556 
     
    5667        Ogre::XMLMeshSerializer* getXMLMeshSerializer(); 
    5768         
     69        Ogre::MaterialSerializer* getMaterialSerializer(); 
     70 
    5871        Ogre::MeshSerializer* getMeshSerializer(); 
    59  
    60         Ogre::MeshManager* getMeshManager(); 
    6172 
    6273        void initialize(); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/include/OBA/OBAPrerequisites.h

    r721 r731  
    2323#       endif 
    2424 
    25  
    26  
    2725#endif 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/scripts/IBRBillboardCloudTreeGenerator.vcproj

    r721 r731  
    2020                        <Tool 
    2121                                Name="VCCLCompilerTool" 
    22                                 AdditionalOptions="/D &quot;TIXML_USE_STL&quot; /D &quot;OBA_LIB_BUILD&quot;" 
     22                                AdditionalOptions="/D &quot;TIXML_USE_STL&quot; /D &quot;OBA_LIB_BUILD&quot;  /D &quot;IMG_LIB_BUILD&quot;" 
    2323                                Optimization="0" 
    24                                 AdditionalIncludeDirectories="&quot;$(OGRE_PATH)/OgreMain/include&quot;;&quot;$(OGRE_PATH)/Samples/Common/include&quot;;&quot;$(OGRE_PATH)/Tools/XMLConverter/include&quot;;../include/IMG;../include/BBC;../include/LBBC;../include/OBA;D:\design_04_11_2005\svn\NonGTP\Boost" 
     24                                AdditionalIncludeDirectories="&quot;$(OGRE_PATH)/OgreMain/include&quot;;&quot;$(OGRE_PATH)/Samples/Common/include&quot;;&quot;$(OGRE_PATH)/Tools/XMLConverter/include&quot;;../include/IMG;../include/BBC;../include/LBBC;../include/OBA;D:\design_04_11_2005\svn\NonGTP\Boost;D:\design_04_11_2005\svn\NonGTP\ImageDebugger\include" 
    2525                                PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;_MT" 
    2626                                MinimalRebuild="TRUE" 
     
    3939                                Name="VCLinkerTool" 
    4040                                AdditionalOptions=" /IMPLIB:&quot;..\bin\debug\$(ProjectName)_d.lib&quot; " 
    41                                 AdditionalDependencies="Ogremain_d.lib" 
     41                                AdditionalDependencies="Ogremain_d.lib imdebug.lib" 
    4242                                OutputFile="$(OutDir)/$(ProjectName)_d.dll" 
    4343                                LinkIncremental="2" 
    4444                                SuppressStartupBanner="TRUE" 
    45                                 AdditionalLibraryDirectories="$(OGRE_PATH)/OgreMain/lib/$(ConfigurationName)" 
     45                                AdditionalLibraryDirectories="&quot;$(OGRE_PATH)/OgreMain/lib/$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)/OgreMain/lib/Release&quot;;D:\design_04_11_2005\svn\NonGTP\ImageDebugger\lib" 
    4646                                IgnoreDefaultLibraryNames="LIBCD;LIBCMTD" 
    4747                                GenerateDebugInformation="TRUE" 
     
    7979                        <Tool 
    8080                                Name="VCCLCompilerTool" 
    81                                 AdditionalOptions="/D &quot;TIXML_USE_STL&quot; /D &quot;TIXML_USE_STL&quot; /D &quot;OBA_LIB_BUILD&quot;" 
    82                                 AdditionalIncludeDirectories="&quot;$(OGRE_PATH)/OgreMain/include&quot;;&quot;$(OGRE_PATH)/Tools/XMLConverter/include&quot;;&quot;$(OGRE_PATH)/Samples/Common/include&quot;;../include/IMG;../include/BBC;../include/LBBC;../include/OBA;D:\design_04_11_2005\svn\NonGTP\Boost" 
     81                                AdditionalOptions="/D &quot;TIXML_USE_STL&quot; /D &quot;TIXML_USE_STL&quot; /D &quot;OBA_LIB_BUILD&quot;  /D &quot;IMG_LIB_BUILD&quot;" 
     82                                AdditionalIncludeDirectories="&quot;$(OGRE_PATH)/OgreMain/include&quot;;&quot;$(OGRE_PATH)/Tools/XMLConverter/include&quot;;&quot;$(OGRE_PATH)/Samples/Common/include&quot;;../include/IMG;../include/BBC;../include/LBBC;../include/OBA;D:\design_04_11_2005\svn\NonGTP\Boost;D:\design_04_11_2005\svn\NonGTP\ImageDebugger\include" 
    8383                                PreprocessorDefinitions="WIN32;NDEBUG;_LIB" 
    8484                                RuntimeLibrary="2" 
     
    9292                                Name="VCLinkerTool" 
    9393                                AdditionalOptions=" /IMPLIB:&quot;..\bin\release\$(ProjectName).lib&quot; " 
    94                                 AdditionalDependencies="OgreMain.lib" 
     94                                AdditionalDependencies="OgreMain.lib imdebug.lib" 
    9595                                LinkIncremental="1" 
    9696                                SuppressStartupBanner="TRUE" 
    97                                 AdditionalLibraryDirectories="$(OGRE_PATH)/OgreMain/lib/$(ConfigurationName)" 
     97                                AdditionalLibraryDirectories="&quot;$(OGRE_PATH)/OgreMain/lib/$(ConfigurationName)&quot;;D:\design_04_11_2005\svn\NonGTP\ImageDebugger\lib" 
    9898                                SubSystem="1" 
    9999                                OptimizeReferences="2" 
     
    223223                                </File> 
    224224                                <File 
     225                                        RelativePath="..\src\LBBCClusterViewMode.cpp"> 
     226                                </File> 
     227                                <File 
     228                                        RelativePath="..\src\LBBCEntityTextureAtlasViewMode.cpp"> 
     229                                </File> 
     230                                <File 
    225231                                        RelativePath="..\src\LBBCKdTreeClusterGenerator.cpp"> 
    226232                                </File> 
     
    288294                                <File 
    289295                                        RelativePath="..\src\IMGPlane3.cpp"> 
     296                                </File> 
     297                                <File 
     298                                        RelativePath="..\src\IMGTexture.cpp"> 
     299                                </File> 
     300                                <File 
     301                                        RelativePath="..\src\IMGTextureAtlas.cpp"> 
    290302                                </File> 
    291303                        </Filter> 
     
    417429                                </File> 
    418430                                <File 
     431                                        RelativePath="..\include\Lbbc\LBBCEntityTextureAtlasViewMode.h"> 
     432                                </File> 
     433                                <File 
    419434                                        RelativePath="..\include\Lbbc\LBBCKdTreeClusterGenerator.h"> 
    420435                                </File> 
     
    491506                                <File 
    492507                                        RelativePath="..\include\Img\IMGPrerequisites.h"> 
     508                                </File> 
     509                                <File 
     510                                        RelativePath="..\include\Img\IMGTexture.h"> 
     511                                </File> 
     512                                <File 
     513                                        RelativePath="..\include\Img\IMGTextureAtlas.h"> 
    493514                                </File> 
    494515                        </Filter> 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/scripts/IBRBillboardCloudTreeGeneratorCommandLine.vcproj

    r721 r731  
    2020                                Name="VCCLCompilerTool" 
    2121                                Optimization="0" 
    22                                 AdditionalIncludeDirectories="../include;../include/BBC;../include/IMG;../include/OBA;../include/LBBC;&quot;$(OGRE_PATH)/OgreMain/include&quot;;&quot;$(OGRE_PATH)/Tools/XMLConverter/include&quot;;D:\design_04_11_2005\svn\NonGTP\Boost" 
     22                                AdditionalIncludeDirectories="../include;../include/BBC;../include/IMG;../include/OBA;../include/LBBC;&quot;$(OGRE_PATH)/OgreMain/include&quot;;&quot;$(OGRE_PATH)/Tools/XMLConverter/include&quot;;D:\design_04_11_2005\svn\NonGTP\Boost;D:\design_04_11_2005\svn\NonGTP\ImageDebugger\include" 
    2323                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" 
    2424                                MinimalRebuild="TRUE" 
     
    3333                        <Tool 
    3434                                Name="VCLinkerTool" 
    35                                 AdditionalDependencies="IBRBillboardCloudTreeGenerator_d.lib OgreMain_d.lib" 
     35                                AdditionalDependencies="IBRBillboardCloudTreeGenerator_d.lib OgreMain_d.lib imdebug.lib" 
    3636                                OutputFile="$(OutDir)/IBRBillboardCloudTreeGeneratorCmd_d.exe" 
    3737                                LinkIncremental="2" 
    38                                 AdditionalLibraryDirectories="../bin/$(ConfigurationName);$(OGRE_PATH)/OgreMain/lib/$(ConfigurationName)" 
     38                                AdditionalLibraryDirectories="&quot;../bin/$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)/OgreMain/lib/$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)/OgreMain/lib/Release&quot;;D:\design_04_11_2005\svn\NonGTP\ImageDebugger\lib" 
    3939                                GenerateDebugInformation="TRUE" 
    4040                                ProgramDatabaseFile="$(OutDir)/scripts.pdb" 
     
    7070                        <Tool 
    7171                                Name="VCCLCompilerTool" 
    72                                 AdditionalIncludeDirectories="../include;../include/OBA;../include/BBC;../include/IMG;../include/LBBC;&quot;$(OGRE_PATH)/OgreMain/include&quot;;&quot;$(OGRE_PATH)/Tools/XMLConverter/include&quot;;D:\design_04_11_2005\svn\NonGTP\Boost" 
     72                                AdditionalIncludeDirectories="../include;../include/OBA;../include/BBC;../include/IMG;../include/LBBC;&quot;$(OGRE_PATH)/OgreMain/include&quot;;&quot;$(OGRE_PATH)/Tools/XMLConverter/include&quot;;D:\design_04_11_2005\svn\NonGTP\Boost;D:\design_04_11_2005\svn\NonGTP\ImageDebugger\include" 
    7373                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" 
    7474                                RuntimeLibrary="0" 
     
    8181                        <Tool 
    8282                                Name="VCLinkerTool" 
    83                                 AdditionalDependencies="IBRBillboardCloudTreeGenerator.lib OgreMain.lib" 
     83                                AdditionalDependencies="IBRBillboardCloudTreeGenerator.lib OgreMain.lib imdebug.lib" 
    8484                                OutputFile="$(OutDir)/IBRBillboardCloudTreeGeneratorCmd.exe" 
    8585                                LinkIncremental="1" 
    86                                 AdditionalLibraryDirectories="../bin/$(ConfigurationName);$(OGRE_PATH)/OgreMain/lib/$(ConfigurationName)" 
     86                                AdditionalLibraryDirectories="&quot;../bin/$(ConfigurationName)&quot;;&quot;$(OGRE_PATH)/OgreMain/lib/$(ConfigurationName)&quot;;D:\design_04_11_2005\svn\NonGTP\ImageDebugger\lib" 
    8787                                GenerateDebugInformation="TRUE" 
    8888                                SubSystem="1" 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/BBCBillboardCloudUVMapper.cpp

    r721 r731  
    124124        Ogre::LogManager::getSingleton().logMessage("iBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds) + "-" + "iBBCG:" + Ogre::StringConverter::toString(iBillboardGroup)); 
    125125 
    126         Ogre::LogManager::getSingleton().logMessage("SizeCLList:" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup)->GetSize()) + " -- numBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds)); 
    127  
    128         IMG::Cluster *cluster = getClusterList(iBillboardGroup)->Get(getClusterList(iBillboardGroup)->GetSize()-1);              
    129         IMG::Box2d *box = cluster->GetBspNodeBound(); 
    130         Ogre::Vector2 max = box->GetMaximum(); 
    131         Ogre::Vector2 min = box->GetMinimum(); 
     126        Ogre::LogManager::getSingleton().logMessage("SizeCLList:" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup)->getSize()) + " -- numBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds)); 
     127 
     128        IMG::Cluster *cluster = getClusterList(iBillboardGroup)->get(getClusterList(iBillboardGroup)->getSize()-1);              
     129        IMG::Box2d *box = cluster->getBspNodeBound(); 
     130        Ogre::Vector2 max = box->getMaximum(); 
     131        Ogre::Vector2 min = box->getMinimum(); 
    132132        Ogre::LogManager::getSingleton().logMessage("Max:" + Ogre::StringConverter::toString(Ogre::Vector3(max[0],max[1],0)) +  
    133133                "\tMin:" + Ogre::StringConverter::toString(Ogre::Vector3(min[0],min[1],0)) +  
     
    282282        Ogre::LogManager::getSingleton().logMessage("w:" + Ogre::StringConverter::toString(mTextureWidth)); 
    283283        Ogre::LogManager::getSingleton().logMessage("h:" + Ogre::StringConverter::toString(mTextureHeight)); 
    284         nodeDest = getBsp(iBillboardGroup)->Insert(mTextureWidth,mTextureHeight,iBillboard); 
     284        nodeDest = getBsp(iBillboardGroup)->insert(mTextureWidth,mTextureHeight,iBillboard); 
    285285         
    286         cluster.SetBspNodeBound(nodeDest->GetBound()); 
    287         //cluster.Finish(); 
    288         getClusterList(iBillboardGroup)->Insert(&cluster);       
     286        cluster.setBspNodeBound(nodeDest->getBound()); 
     287        //cluster.finish(); 
     288        getClusterList(iBillboardGroup)->insert(&cluster);       
    289289} 
    290290 
     
    353353                IMG::NodeBspPtr node = IMG::NodeBspPtr(new IMG::NodeBsp); 
    354354 
    355                 node->GetBound()->SetBoundBox(0, 0, mTextureAtlasWidth, mTextureAtlasHeight); 
    356                 bsp->SetRoot(node);      
     355                node->getBound()->setBoundBox(0, 0, mTextureAtlasWidth, mTextureAtlasHeight); 
     356                bsp->setRoot(node);      
    357357 
    358358                addBsp(bsp); 
     
    379379                                { 
    380380                                        Ogre::LogManager::getSingleton().logMessage("\nA"); 
    381                                         Ogre::LogManager::getSingleton().logMessage("IG:" + Ogre::StringConverter::toString(iBillboardsInGroup) + " SizeCLList(" + Ogre::StringConverter::toString(iBillboardGroup) + "):" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup)->GetSize()) + " -- numBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds)); 
     381                                        Ogre::LogManager::getSingleton().logMessage("IG:" + Ogre::StringConverter::toString(iBillboardsInGroup) + " SizeCLList(" + Ogre::StringConverter::toString(iBillboardGroup) + "):" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup)->getSize()) + " -- numBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds)); 
    382382 
    383383                                        addTextureInBsp(iBillboardGroup, iBillboard); 
     
    391391                                        { 
    392392                                                Ogre::LogManager::getSingleton().logMessage("\nB"); 
    393                                                 Ogre::LogManager::getSingleton().logMessage("IG:" + Ogre::StringConverter::toString(iBillboardsInGroup) + " SizeCLList(" + Ogre::StringConverter::toString(iBillboardGroup) + "):" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup)->GetSize()) + " -- numBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds)); 
     393                                                Ogre::LogManager::getSingleton().logMessage("IG:" + Ogre::StringConverter::toString(iBillboardsInGroup) + " SizeCLList(" + Ogre::StringConverter::toString(iBillboardGroup) + "):" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup)->getSize()) + " -- numBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds)); 
    394394 
    395395                                                addTextureInBsp(iBillboardGroup, iBillboard); 
     
    403403                                                iBillboardsInGroup = 0; 
    404404 
    405                                                 Ogre::LogManager::getSingleton().logMessage("\nC IG:" + Ogre::StringConverter::toString(iBillboardsInGroup-1) + " SizeCLList(" + Ogre::StringConverter::toString(iBillboardGroup-1) + "):" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup-1)->GetSize())); 
    406                                                 Ogre::LogManager::getSingleton().logMessage("IG:" + Ogre::StringConverter::toString(iBillboardsInGroup) + " SizeCLList(" + Ogre::StringConverter::toString(iBillboardGroup) + "):" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup)->GetSize()) + " -- numBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds)); 
     405                                                Ogre::LogManager::getSingleton().logMessage("\nC IG:" + Ogre::StringConverter::toString(iBillboardsInGroup-1) + " SizeCLList(" + Ogre::StringConverter::toString(iBillboardGroup-1) + "):" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup-1)->getSize())); 
     406                                                Ogre::LogManager::getSingleton().logMessage("IG:" + Ogre::StringConverter::toString(iBillboardsInGroup) + " SizeCLList(" + Ogre::StringConverter::toString(iBillboardGroup) + "):" + Ogre::StringConverter::toString(getClusterList(iBillboardGroup)->getSize()) + " -- numBBC:" + Ogre::StringConverter::toString(numGeneratedBillboardClouds)); 
    407407 
    408408                                                addTextureInBsp(iBillboardGroup, iBillboard); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/BBCManager.cpp

    r721 r731  
    44namespace BBC { 
    55 
    6 template <> Manager* CSingleton<Manager>::ms_Singleton = NULL; 
     6template <> BBCManager* CSingleton<BBCManager>::ms_Singleton = NULL; 
    77 
    8 Manager* Manager::getSingletonPtr(void) 
     8BBCManager* BBCManager::getSingletonPtr(void) 
    99{ 
    1010    return ms_Singleton; 
    1111} 
    1212 
    13 Manager& Manager::getSingleton(void) 
     13BBCManager& BBCManager::getSingleton(void) 
    1414 
    1515    assert( ms_Singleton );  return ( *ms_Singleton );   
    1616} 
    1717 
    18 Manager::Manager()  
     18BBCManager::BBCManager()  
    1919{    
    2020} 
    2121 
    22 Manager::~Manager()  
     22BBCManager::~BBCManager()  
    2323{ 
    2424} 
    2525 
    26 void Manager::shutdown() 
     26void BBCManager::shutdown() 
    2727{ 
    2828} 
    2929 
    30 void Manager::initialize() 
     30void BBCManager::initialize() 
    3131{ 
    3232} 
    3333 
    34 Ogre::Mesh* Manager::loadMesh(Ogre::String folderName, Ogre::String fileName) 
     34Ogre::Mesh* BBCManager::loadMesh(Ogre::String folderName, Ogre::String fileName) 
    3535{        
    3636        //std::ifstream ifs; 
     
    4242        Ogre::ResourceGroupManager::getSingleton().addResourceLocation(folderName, "FileSystem", fileName, false); 
    4343 
    44         Ogre::MeshPtr mesh = OBA::OgreBase::getSingleton().getMeshManager()->load(fileName, fileName); 
     44        Ogre::MeshPtr mesh = Ogre::MeshManager::getSingleton().load(fileName, fileName); 
    4545 
    4646        return mesh.getPointer(); 
    4747} 
    4848 
    49 Ogre::Mesh* Manager::loadXMLMesh(Ogre::String name) 
     49Ogre::Mesh* BBCManager::loadXMLMesh(Ogre::String name) 
    5050{ 
    5151        Ogre::MeshPtr newMesh = Ogre::MeshManager::getSingleton().createManual(name.substr(0,((name.size()-1)-4)),Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 
     
    6868} 
    6969 
    70 void Manager::saveMesh(Ogre::String name) 
     70void BBCManager::saveMesh(Ogre::String name) 
    7171{ 
    7272        Ogre::MeshPtr meshPtr = Ogre::MeshManager::getSingleton().getByName(name); 
     
    7474} 
    7575 
    76 void Manager::saveXMLMesh(Ogre::String name) 
     76void BBCManager::saveXMLMesh(Ogre::String name) 
    7777{ 
    7878        Ogre::MeshPtr meshPtr = Ogre::MeshManager::getSingleton().getByName(name); 
     
    8080} 
    8181 
     82void BBCManager::saveMaterial(Ogre::String materialName) 
     83{ 
     84        Ogre::ResourceManager::ResourceMapIterator it = Ogre::MaterialManager::getSingleton().getResourceIterator(); 
     85    while (it.hasMoreElements()) 
     86    { 
     87                Ogre::MaterialPtr m = it.getNext(); 
     88         
     89        if (m->getName() == materialName) 
     90                { 
     91                        OBA::OgreBase::getSingleton().getMaterialSerializer()->queueForExport(m); 
     92                        break; 
     93                } 
     94    } 
     95    //OBA::OgreBase::getSingleton().getMaterialSerializer()->exportQueued(dest); 
    8296} 
     97 
     98} 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/BBCOgreMeshSerializer.cpp

    r721 r731  
    5353                BBC::MeshPtr pMesh(new BBC::Mesh(Ogre::MeshManager::getSingleton().createManual(fileName, fileName).getPointer())); 
    5454                 
    55                 Ogre::MeshPtr mesh = OBA::OgreBase::getSingleton().getMeshManager()->load(fileName, fileName); 
     55                Ogre::MeshPtr mesh = Ogre::MeshManager::getSingleton().load(fileName, fileName); 
    5656 
    5757                Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mEntity->getNumSubEntities())); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IBRBillboardCloudTreeApplication.cpp

    r721 r731  
    1919        for (unsigned int i = 0; i < 1; i++) 
    2020        { 
     21                mSampleConfigFile = new LBBC::SampleConfigFile(); 
     22                mSampleConfigFile->load(mOpts.cfg); 
     23 
    2124                this->setup(false); 
    22                 mLBBCManager = new LBBC::Manager();      
    23                 LBBC::SampleConfigFile *sampleConfigFile = new LBBC::SampleConfigFile(); 
    24                 sampleConfigFile->load(mOpts.cfg); 
    25                 mLBBCManager->setSampleConfigFile(sampleConfigFile);     
     25                mLBBCManager = new LBBC::LBBCManager();  
     26                mLBBCManager->setSampleConfigFile(mSampleConfigFile);    
    2627                //mLBBCManager->loadSampleConfigFile(mOpts.cfg); 
    2728                mLBBCManager->runSampleConfigFile();     
     
    3334                this->setup(true); 
    3435                this->go();      
     36                for (unsigned int iFrameListenerMode = 0; iFrameListenerMode < mFrameListener->getNumFrameListenerModes(); iFrameListenerMode++) 
     37                { 
     38                        mFrameListener->getFrameListenerMode(iFrameListenerMode)->destroyScene(); 
     39                } 
    3540                mRoot->shutdown();       
    3641                mWindow->destroy();              
    3742                delete mRoot; 
     43                delete mSampleConfigFile; 
    3844        } 
     45 
    3946} 
    4047 
     
    108115         
    109116        mSceneMgr = mFrameListener->getEnabledFrameListenerMode()->getSceneManager();    
     117 
    110118        { 
    111                 LBBC::ClustersViewMode *anotherFrameListenerMode; 
    112                 anotherFrameListenerMode = new LBBC::ClustersViewMode(mWindow,mFrameListener->getNumFrameListenerModes()); 
     119                LBBC::ClusterViewMode *anotherFrameListenerMode; 
     120                anotherFrameListenerMode = new LBBC::ClusterViewMode(mWindow,mFrameListener->getNumFrameListenerModes()); 
    113121                anotherFrameListenerMode->chooseSceneManager(); 
    114122                anotherFrameListenerMode->createCamera(); 
     
    118126        } 
    119127 
     128        //{ 
     129        //      LBBC::BillboardViewMode *anotherFrameListenerMode; 
     130        //      anotherFrameListenerMode = new LBBC::BillboardViewMode(mWindow,mFrameListener->getNumFrameListenerModes()); 
     131        //      anotherFrameListenerMode->chooseSceneManager(); 
     132        //      anotherFrameListenerMode->createCamera(); 
     133        //      anotherFrameListenerMode->createViewports(); 
     134        //      anotherFrameListenerMode->createScene(); 
     135        //      mFrameListener->addFrameListenerMode(anotherFrameListenerMode); 
     136        //} 
     137 
    120138        { 
    121                 LBBC::BillboardViewMode *anotherFrameListenerMode; 
    122                 anotherFrameListenerMode = new LBBC::BillboardViewMode(mWindow,mFrameListener->getNumFrameListenerModes()); 
    123                 anotherFrameListenerMode->chooseSceneManager(); 
    124                 anotherFrameListenerMode->createCamera(); 
    125                 anotherFrameListenerMode->createViewports(); 
    126                 anotherFrameListenerMode->createScene(); 
    127                 mFrameListener->addFrameListenerMode(anotherFrameListenerMode); 
     139                LBBC::EntityTextureAtlasViewMode *textureAtlasFrameListenerMode; 
     140                textureAtlasFrameListenerMode = new LBBC::EntityTextureAtlasViewMode(mWindow,mFrameListener->getNumFrameListenerModes()); 
     141                textureAtlasFrameListenerMode->chooseSceneManager(); 
     142                textureAtlasFrameListenerMode->createCamera(); 
     143                textureAtlasFrameListenerMode->createViewports(); 
     144                textureAtlasFrameListenerMode->setTextureAtlasSize(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasSize()); 
     145                textureAtlasFrameListenerMode->setTextureAtlasBitRange(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasBitRange()); 
     146                textureAtlasFrameListenerMode->setTextureAtlasNumSamples(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasNumSamples()); 
     147                textureAtlasFrameListenerMode->setTextureName(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTexturePrefixName()); 
     148                textureAtlasFrameListenerMode->setTextureAtlasName(mSampleConfigFile->getBillboardCloudDiffuseColorEntityTextureAtlasPrefixName()); 
     149                textureAtlasFrameListenerMode->setTextureAtlasFolder(mSampleConfigFile->getBillboardCloudFolder()); 
     150 
     151                mFrameListener->addFrameListenerMode(textureAtlasFrameListenerMode); 
     152                textureAtlasFrameListenerMode->createScene(); 
    128153        } 
    129154 
    130         mFrameListener->setEnabledFrameListenerMode(1); 
    131155        mFrameListener->removeFrameListenerMode(0); 
     156        mFrameListener->setEnabledFrameListenerMode(0); 
    132157 
    133158    mRoot->addFrameListener(mFrameListener); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGBBox.cpp

    r721 r731  
    66BBox::BBox() 
    77{  
    8         BBox::StartBoundingBox();  
     8        BBox::initialize();  
    99} 
    1010 
     
    1313} 
    1414 
    15 void BBox::StartBoundingBox() 
     15void BBox::initialize() 
    1616{ 
    1717        mMinimum.x =  BOUNDINGBOX_MAXVALUE; 
     
    2323} 
    2424 
    25 Ogre::Vector3 BBox::GetMinimum()  
     25Ogre::Vector3 BBox::getMinimum()  
    2626{  
    2727        return mMinimum;  
    2828} 
    2929 
    30 Ogre::Vector3 BBox::GetMaximum() 
     30Ogre::Vector3 BBox::getMaximum() 
    3131{  
    3232        return mMaximum; 
    3333} 
    3434 
    35 void BBox::AddBoundingVector3(float x, float y, float z) 
     35void BBox::addBoundingVector3(float x, float y, float z) 
    3636{ 
    3737    if (x < mMinimum.x) 
     
    6666} 
    6767 
    68 void BBox::Print()  
     68void BBox::print()  
    6969{ 
    7070        Ogre::LogManager::getSingleton().logMessage("\nValor de la Caixa: (" + Ogre::StringConverter::toString(mMinimum) + ") - (" + + ") " + Ogre::StringConverter::toString(mMaximum)); 
    7171} 
    7272 
    73 Ogre::Vector3 BBox::GetCorner(int corner) const  
     73Ogre::Vector3 BBox::getCorner(int corner) const  
    7474{ 
    7575    Ogre::Vector3 vector;        
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGBox2d.cpp

    r721 r731  
    1818} 
    1919 
    20 Ogre::Vector2 Box2d::GetMinimum()  
     20Ogre::Vector2 Box2d::getMinimum()  
    2121{  
    2222    return mMinimum; 
    2323} 
    2424 
    25 Ogre::Vector2 Box2d::GetMaximum()  
     25Ogre::Vector2 Box2d::getMaximum()  
    2626{  
    2727    return mMaximum;  
    2828} 
    2929 
    30 void Box2d::SetBoundBox(float x, float y, float X, float Y)  
     30void Box2d::setBoundBox(float x, float y, float X, float Y)  
    3131{ 
    3232    mMinimum.x = x; 
     
    3636} 
    3737 
    38 void Box2d::AddBoundingVector3(float x, float y) 
     38void Box2d::addBoundingVector3(float x, float y) 
    3939{ 
    4040    if (x < mMinimum.x) 
     
    5959} 
    6060 
    61 void Box2d::Print() 
     61void Box2d::print() 
    6262{ 
    6363        Ogre::LogManager::getSingleton().logMessage("Valor de la Caixa: (" + Ogre::StringConverter::toString(Ogre::Vector3(mMinimum.x, mMinimum.y, 0)) + ") - (" + Ogre::StringConverter::toString(Ogre::Vector3(mMaximum.x, mMaximum.y, 0)) + ")"); 
    6464} 
    6565 
    66 Ogre::Vector2 Box2d::GetCorner(int corner) const  
     66Ogre::Vector2 Box2d::getCorner(int corner) const  
    6767{ 
    6868        Ogre::Vector2 vector; 
     
    7979} 
    8080 
    81 bool Box2d::In(int w, int h)  
     81bool Box2d::in(int w, int h)  
    8282{ 
    8383    if (w <= (mMaximum.x - mMinimum.x) && h <= (mMaximum.y - mMinimum.y)) 
     
    8989} 
    9090 
    91 bool Box2d::FitPerfect(int w, int h) 
     91bool Box2d::fitPerfect(int w, int h) 
    9292{        
    9393    if (w == (mMaximum.x - mMinimum.x) && h == (mMaximum.y - mMinimum.y)) 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGBsp.cpp

    r721 r731  
    1414} 
    1515 
    16 void Bsp::SetRoot(NodeBspPtr node)  
     16void Bsp::setRoot(NodeBspPtr node)  
    1717{ 
    1818    root = node; 
     
    2020} 
    2121 
    22 void Bsp::Print()  
     22void Bsp::print()  
    2323{ 
    2424        Ogre::LogManager::getSingleton().logMessage("\nImprimint Arbre BSP, num nodes leaf: " + Ogre::StringConverter::toString(countleaf) + ", totals: " + Ogre::StringConverter::toString(counttotal)); 
    25     Print(root); 
     25    print(root); 
    2626} 
    2727 
    28 void Bsp::PrintLeaf() 
     28void Bsp::printLeaf() 
    2929{ 
    30         PrintLeaf(root); 
     30        printLeaf(root); 
    3131} 
    3232 
    33 NodeBspPtr Bsp::Insert(int w, int h, int idcluster)  
     33NodeBspPtr Bsp::insert(int w, int h, int idcluster)  
    3434{ 
    35     NodeBspPtr node = root->Insert(w,h); 
     35    NodeBspPtr node = root->insert(w,h); 
    3636 
    3737        if (idcluster != -1) 
    3838    { 
    39         node->SetId (idcluster); 
     39        node->setId(idcluster); 
    4040        countleaf++;                     
    4141    } 
     
    4848} 
    4949 
    50 NodeBspPtr Bsp::Get(int i)  
     50NodeBspPtr Bsp::get(int i)  
    5151{ 
    52         return root->Get(root, i); 
     52        return root->get(root, i); 
    5353} 
    5454 
    55 void Bsp::Print(NodeBspPtr node)  
     55void Bsp::print(NodeBspPtr node)  
    5656{ 
    57     node->Print(); 
    58     Print(node->GetChild(0)); 
    59     Print(node->GetChild(1)); 
     57    node->print(); 
     58    this->print(node->getChild(0)); 
     59    this->print(node->getChild(1)); 
    6060} 
    6161 
    62 void Bsp::PrintLeaf(NodeBspPtr node)  
     62void Bsp::printLeaf(NodeBspPtr node)  
    6363{        
    64     if (node->GetChild(0) == NULL && node->GetChild(1) == NULL) 
     64    if (node->getChild(0) == NULL && node->getChild(1) == NULL) 
    6565        { 
    66                 node->Print(); 
     66                node->print(); 
    6767        } 
    6868         
    69     PrintLeaf (node->GetChild(0)); 
    70     PrintLeaf (node->GetChild(1));       
     69    printLeaf(node->getChild(0)); 
     70    printLeaf(node->getChild(1));        
    7171} 
    7272 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGCluster.cpp

    r721 r731  
    1313} 
    1414 
    15 void Cluster::SetNormal(Ogre::Vector3* n)  
     15void Cluster::setNormal(Ogre::Vector3* n)  
    1616{  
    1717        normal = *n;  
    1818} 
    1919 
    20 Ogre::Vector3* Cluster::GetNormal()  
     20Ogre::Vector3* Cluster::getNormal()  
    2121{  
    2222        return &normal;  
    2323} 
    2424 
    25 BBox* Cluster::GetBound()  
     25BBox* Cluster::getBound()  
    2626{  
    2727        return &bound;  
    2828} 
    2929 
    30 Box2d* Cluster::GetBspNodeBound()  
     30Box2d* Cluster::getBspNodeBound()  
    3131{  
    3232        return &bspnodebound;  
    3333} 
    3434 
    35 void Cluster::SetBspNodeBound(Box2d* box)  
     35void Cluster::setBspNodeBound(Box2d* box)  
    3636{ 
    3737        bspnodebound = (*box); 
    3838} 
    3939 
    40 int Cluster::GetId() const  
     40int Cluster::getId() const  
    4141{  
    4242        return id;  
    4343} 
    4444 
    45 void Cluster::SetId(int id_)  
     45void Cluster::setId(int id_)  
    4646{  
    4747        id = id; 
    4848} 
    4949 
    50         std::vector<Ogre::Vector3>* Cluster::GetVector3sVector()  
     50std::vector<Ogre::Vector3>* Cluster::getVector3sVector()  
    5151{  
    5252        return &Vector3s_vector;  
    5353} 
    5454 
    55 Ogre::Vector3* Cluster::GetVector3sTex() const  
     55Ogre::Vector3* Cluster::getVector3sTex() const  
    5656{  
    5757        return Vector3s_triangle_text; 
    5858} 
    5959 
    60 void Cluster::SetPlane(Ogre::Vector3* normal, Ogre::Vector3 * point)  
     60void Cluster::setPlane(Ogre::Vector3* normal, Ogre::Vector3 * point)  
    6161{ 
    6262    plane.normal = *normal; 
     
    6565} 
    6666 
    67 Plane3 * Cluster::GetPlane() 
     67Plane3 * Cluster::getPlane() 
    6868{  
    6969        return &plane;  
     
    108108} 
    109109 
    110 void Cluster::Print()  
     110void Cluster::print()  
    111111{ 
    112112        Ogre::LogManager::getSingleton().logMessage("\n\nCluster: " + Ogre::StringConverter::toString(id) + ", axisproj: " + Ogre::StringConverter::toString(axisproj)  + ", order: " + Ogre::StringConverter::toString(order)); 
    113113         
    114         plane.Print(); 
     114        plane.print(); 
    115115        Ogre::LogManager::getSingleton().logMessage("\nOrigin (" + Ogre::StringConverter::toString(lumel_origin) + ")"); 
    116116        Ogre::LogManager::getSingleton().logMessage("Inc U (" + Ogre::StringConverter::toString(lumel_x_axis) + ")"); 
    117117        Ogre::LogManager::getSingleton().logMessage("Inc V (" + Ogre::StringConverter::toString(lumel_y_axis.z) + ")"); 
    118118         
    119         bound.Print(); 
    120  
    121         bspnodebound.Print(); 
     119        bound.print(); 
     120 
     121        bspnodebound.print(); 
    122122         
    123123        Ogre::LogManager::getSingleton().logMessage("Printant els vertexs: "); 
     
    125125 
    126126//* return the dominant normal axis, for calculate the 2d projection 
    127 int Cluster::AxisProjected() { 
    128          
    129         Ogre::Vector3 *normal = plane.GetNormal(); 
     127int Cluster::axisProjected()  
     128{ 
     129        Ogre::Vector3 *normal = plane.getNormal(); 
    130130         
    131131        if (Ogre::Math::Abs(normal->x) >= Ogre::Math::Abs(normal->y) && Ogre::Math::Abs(normal->x) >= Ogre::Math::Abs(normal->z)) 
     
    143143} 
    144144 
    145 void Cluster::Finish()  
     145void Cluster::finish()  
    146146{ 
    147147        Ogre::LogManager::getSingleton().logMessage("\nCluster::Finish()"); 
    148         Plane3 *plane = GetPlane(); 
    149         Ogre::Vector3 normal = *plane->GetNormal(); 
    150         float distance = plane->GetDistance(); 
     148        Plane3 *plane = getPlane(); 
     149        Ogre::Vector3 normal = *plane->getNormal(); 
     150        float distance = plane->getDistance(); 
    151151        Ogre::Vector3 corner; 
    152152        Cluster2d cluster2d;             
    153153        Ogre::Vector3 vertexfinal[3]; 
    154         Ogre::Vector2 *vertexs2d; 
    155154        int num_vertexs = 4; 
    156         //Box box; 
    157155        Ogre::Vector3 min; 
    158156        Ogre::Vector3 max; 
    159         float num, den;  
    160157        bool type = true; 
    161158 
    162159        Ogre::LogManager::getSingleton().logMessage("\tCreant cluster 2d"); 
    163         axisproj = cluster2d.Create2d (this, 0, true);   
     160        axisproj = cluster2d.create2d (this, 0, true);   
    164161        Ogre::LogManager::getSingleton().logMessage("\t Imprimint el que hi al del cluster"); 
    165162                 
    166163        std::vector<Ogre::Vector2> vector2; 
    167         vector2 =*cluster2d.GetVector3sVector(); 
     164        vector2 =*cluster2d.getVector3sVector(); 
    168165         
    169166        for (unsigned int i = 0; i < vector2.size(); i++) 
    170167        {                
    171                 bound.AddBoundingVector3 (vector2[i].x, vector2[i].y, 0);                
    172         } 
    173          
    174         min = bound.GetMinimum();        
    175         max = bound.GetMaximum(); 
     168                bound.addBoundingVector3 (vector2[i].x, vector2[i].y, 0);                
     169        } 
     170         
     171        min = bound.getMinimum();        
     172        max = bound.getMaximum(); 
    176173         
    177174        Ogre::LogManager::getSingleton().logMessage("Caixa Englobant del cluster 2d"); 
    178         bound.Print(); 
     175        bound.print(); 
    179176 
    180177        Ogre::Vector3 aux (-9999,-9999,-9999); 
     
    184181 
    185182//* Return the increment in U (lumel increment in x). For patchs calculation  
    186 Ogre::Vector3 Cluster::GetIncU()  
     183Ogre::Vector3 Cluster::getIncU()  
    187184{  
    188185        return lumel_x_axis; 
     
    190187 
    191188//* Return the increment in V (lumel increment in x). For patchs calculation  
    192 Ogre::Vector3 Cluster::GetIncV()  
     189Ogre::Vector3 Cluster::getIncV()  
    193190{ 
    194191        return lumel_y_axis; 
    195192} 
    196193 
    197 Ogre::Vector3 Cluster::GetOrigin()  
     194Ogre::Vector3 Cluster::getOrigin()  
    198195{ 
    199196        return lumel_origin; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGCluster2d.cpp

    r721 r731  
    1313} 
    1414 
    15 Ogre::Vector2 * Cluster2d::GetVector3s() 
     15Ogre::Vector2 * Cluster2d::getVector3s() 
    1616{  
    1717        return Vector3s;  
    1818} 
    1919 
    20 std::vector<Ogre::Vector2> * Cluster2d::GetVector3sVector()  
     20std::vector<Ogre::Vector2> * Cluster2d::getVector3sVector()  
    2121{  
    2222        return &Vector3s2_vector;  
    2323}  
    2424 
    25 Ogre::Vector3 * Cluster2d::GetNormal()  
     25Ogre::Vector3 * Cluster2d::getNormal()  
    2626{  
    2727        return normal;  
     
    3131//                       
    3232//        
    33 int Cluster2d::Create2d(Cluster * cluster, int type, int type_vertexs)  
     33int Cluster2d::create2d(Cluster * cluster, int type, int type_vertexs)  
    3434{ 
    3535        if (!cluster) 
     
    3838        } 
    3939         
    40         int axis = cluster->AxisProjected(); 
     40        int axis = cluster->axisProjected(); 
    4141 
    4242        this->cluster = cluster; 
     
    4545} 
    4646 
    47 void Cluster2d::Print()  
     47void Cluster2d::print()  
    4848{ 
    49         printf("\nPrintant cluster2d: %d", id); 
     49        Ogre::LogManager::getSingleton().logMessage("Printant cluster2d: " + Ogre::StringConverter::toString(id)); 
    5050} 
    5151 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGClusterList.cpp

    r721 r731  
    99} 
    1010 
    11 bool ClusterList::Insert(Cluster * p)  
     11bool ClusterList::insert(Cluster * p)  
    1212{ 
    1313        if (!p) 
     
    2121} 
    2222 
    23 void ClusterList::Print()  
     23void ClusterList::print()  
    2424{ 
    2525        Ogre::LogManager::getSingleton().logMessage("nNombre de  cluster a la llista: " + Ogre::StringConverter::toString(list.size())); 
     26 
    2627        for (register int i = 0; i < list.size(); i ++) 
    2728        { 
    28                 Get(i)->Print(); 
     29                this->get(i)->print(); 
    2930        }        
    3031} 
     
    3536} 
    3637 
    37 std::vector<Cluster> * ClusterList::GetList()  
     38std::vector<Cluster> * ClusterList::getList()  
    3839{ 
    3940        return &list; 
    4041} 
    4142 
    42 unsigned int ClusterList::GetSize() const 
     43unsigned int ClusterList::getSize() const 
    4344{  
    4445        return list.size();  
    4546} 
    4647 
    47 Cluster * ClusterList::Get(unsigned int i)  
     48Cluster * ClusterList::get(unsigned int i)  
    4849{ 
    4950    if (i <= list.size()) 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGNodeBsp.cpp

    r721 r731  
    1515} 
    1616 
    17 void NodeBsp::SetBound(Box2d * box)  
     17void NodeBsp::setBound(Box2d * box)  
    1818{  
    1919        bound = (*box);  
    2020} 
    2121 
    22 NodeBspPtr NodeBsp::GetChild(int i)  
     22NodeBspPtr NodeBsp::getChild(int i)  
    2323{  
    2424        return child[i];  
    2525} 
    2626 
    27 void NodeBsp::SetId(int id_)  
     27void NodeBsp::setId(int id_)  
    2828{  
    2929        id = id_;  
    3030} 
    3131 
    32 unsigned int NodeBsp::GetId() const 
     32unsigned int NodeBsp::getId() const 
    3333{  
    3434        return id;  
    3535} 
    3636 
    37 void NodeBsp::SetChild(NodeBspPtr node, int i)  
     37void NodeBsp::setChild(NodeBspPtr node, int i)  
    3838{  
    3939        child[i] = node;  
    4040} 
    4141 
    42 NodeBspPtr NodeBsp::Get(NodeBspPtr node, int i)  
     42NodeBspPtr NodeBsp::get(NodeBspPtr node, int i)  
    4343{ 
    4444    if (!node) 
     
    4747        } 
    4848 
    49     if (node->GetId() == i ) 
     49    if (node->getId() == i ) 
    5050        { 
    5151                return node; 
     
    5353     
    5454    NodeBspPtr nod;  
    55     if (nod = node->GetChild(0)->Get(node->GetChild(0), i))  
     55    if (nod = node->getChild(0)->get(node->getChild(0), i))  
    5656        { 
    5757                return nod; 
    5858        } 
    5959     
    60     return node->GetChild(0)->Get(node->GetChild(1), i); 
     60    return node->getChild(0)->get(node->getChild(1), i); 
    6161} 
    6262 
    6363 
    64 Box2d * NodeBsp::GetBound()  
     64Box2d * NodeBsp::getBound()  
    6565{  
    6666        return &bound;    
    6767} 
    6868 
    69 void NodeBsp::Print()  
     69void NodeBsp::print()  
    7070{ 
    7171        Ogre::LogManager::getSingleton().logMessage("Node : " + Ogre::StringConverter::toString(id) + ", fit: " + Ogre::StringConverter::toString(fit)); 
    7272 
    73         bound.Print(); 
     73        bound.print(); 
    7474} 
    7575 
    76 NodeBspPtr NodeBsp::Insert(int w, int h)  
     76NodeBspPtr NodeBsp::insert(int w, int h)  
    7777{ 
    7878        //Ogre::LogManager::getSingleton().logMessage("\nInsert del node: :" + Ogre::StringConverter::toString(id) + " (" + Ogre::StringConverter::toString(w) + ", " + Ogre::StringConverter::toString(h)); 
     
    8585        if (this->child[0] != NULL && this->child[1] != NULL) 
    8686        { 
    87                 NodeBspPtr new_node = child[0]->Insert(w, h); 
     87                NodeBspPtr new_node = child[0]->insert(w, h); 
    8888                 
    8989                if (new_node) return new_node; 
    9090                 
    91                 return child[1]->Insert(w,h); 
     91                return child[1]->insert(w,h); 
    9292        } 
    9393         
    94         if (!bound.In (w,h))  
     94        if (!bound.in(w,h))  
    9595        { 
    9696                return NULL;  
    9797        } 
    9898         
    99         if (bound.FitPerfect(w,h)) 
     99        if (bound.fitPerfect(w,h)) 
    100100        { 
    101101                fit = true;  return this;  
     
    109109        float width, height; 
    110110         
    111         bound.Print(); 
    112         min = bound.GetMinimum(); 
    113         max = bound.GetMaximum(); 
     111        bound.print(); 
     112        min = bound.getMinimum(); 
     113        max = bound.getMaximum(); 
    114114         
    115115        width = max.x - min.x; 
     
    121121        if (dw > dh) 
    122122        {        
    123                 child[0]->bound.SetBoundBox(min.x, min.y, min.x + w, max.y);             
    124                 child[1]->bound.SetBoundBox(min.x + w, min.y, max.x, max.y);                                                                             
     123                child[0]->bound.setBoundBox(min.x, min.y, min.x + w, max.y);             
     124                child[1]->bound.setBoundBox(min.x + w, min.y, max.x, max.y);                                                                             
    125125        } 
    126126        else 
    127127        {                
    128                 child[0]->bound.SetBoundBox(min.x, max.y - h, max.x, max.y); 
    129                 child[1]->bound.SetBoundBox(min.x, min.y, max.x, max.y - h); 
     128                child[0]->bound.setBoundBox(min.x, max.y - h, max.x, max.y); 
     129                child[1]->bound.setBoundBox(min.x, min.y, max.x, max.y - h); 
    130130        } 
    131131         
    132         return child[0]->Insert(w, h); 
     132        return child[0]->insert(w, h); 
    133133} 
    134134 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGPlane3.cpp

    r721 r731  
    2121} 
    2222 
    23 Ogre::Vector3 * Plane3::GetNormal()  
     23Ogre::Vector3 * Plane3::getNormal()  
    2424{ 
    2525        Ogre::Vector3 *v = new Ogre::Vector3; 
     
    3030} 
    3131 
    32 void Plane3::SetNormal(float x, float y, float z)  
     32void Plane3::setNormal(float x, float y, float z)  
    3333{ 
    3434    normal.x = x; 
     
    3737} 
    3838 
    39 void Plane3::SetDistance(float dist)  
     39void Plane3::setDistance(float dist)  
    4040{ 
    4141    d = dist; 
    4242} 
    4343 
    44 float Plane3::GetDistance() const  
     44float Plane3::getDistance() const  
    4545{  
    4646        return d; 
    4747} 
    4848 
    49 void Plane3::Print()  
     49void Plane3::print()  
    5050{ 
    5151        Ogre::LogManager::getSingleton().logMessage("Printant pla: (" + Ogre::StringConverter::toString(normal) + Ogre::StringConverter::toString(d) + ")"); 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGTexture.cpp

    r721 r731  
    22#include "IMGTexture.h" 
    33 
    4 namespace IMG { 
     4namespace IMG  
     5{ 
    56 
    6     Texture::Texture() 
     7Texture::Texture(): references(0) // initialize references to 0 
     8{ 
     9        mTexture = 0; 
     10        mWidth = 0; 
     11        mHeight = 0; 
     12        mMaterial = 0; 
     13        mCalculatedAvgColour = false; 
     14        mRectangle2D = new Ogre::Rectangle2D(true); 
     15        mRectangle2D->setBoundingBox(Ogre::AxisAlignedBox(-100000.0 * Ogre::Vector3::UNIT_SCALE, 100000.0 * Ogre::Vector3::UNIT_SCALE)); 
     16        mRectangle2D->setRenderQueueGroup(Ogre::RENDER_QUEUE_OVERLAY); 
     17} 
     18 
     19Texture::~Texture() 
     20{ 
     21        // Gametools -- BUG: 06/04/2006 
     22        //if (mRectangle2D) 
     23        //{ 
     24        //      delete mRectangle2D; 
     25        //} 
     26 
     27        //if (mMaterial) 
     28        //{ 
     29        //      delete mMaterial; 
     30        //} 
     31} 
     32 
     33Ogre::Rectangle2D* Texture::getRectangle2D() 
     34{ 
     35        return mRectangle2D; 
     36} 
     37 
     38void Texture::setCorners(Ogre::Real left, Ogre::Real top, Ogre::Real right, Ogre::Real bottom) 
     39{ 
     40        mRectangle2D->setCorners(left, top, right, bottom); 
     41} 
     42 
     43void Texture::bind(Ogre::String textureName) 
     44{                
     45        if (!Ogre::TextureManager::getSingleton().getByName(textureName).isNull()) 
    746        { 
     47                mTexture = (Ogre::Texture*) Ogre::TextureManager::getSingleton().getByName(textureName).getPointer(); 
     48                mWidth = mTexture->getSrcWidth(); 
     49                mHeight = mTexture->getSrcHeight(); 
     50        } 
     51        else 
     52        { 
     53                Ogre::TexturePtr tPtr = Ogre::TextureManager::getSingleton().load(textureName, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 
     54 
     55                mTexture = (Ogre::Texture*) tPtr.getPointer(); 
     56                mWidth = mTexture->getSrcWidth(); 
     57                mHeight = mTexture->getSrcHeight(); 
     58        } 
     59} 
     60 
     61void Texture::setBackgroundColour(Ogre::ColourValue colour) 
     62{ 
     63        mBackgroundColour = colour; 
     64} 
     65 
     66Ogre::ColourValue Texture::getBackgroundColour() 
     67{ 
     68        return mBackgroundColour; 
     69} 
     70 
     71Ogre::ColourValue Texture::getAvgColour() 
     72{ 
     73        if (mCalculatedAvgColour) 
     74        { 
     75                return mAvgColour; 
     76        } 
     77        else 
     78        { 
     79                calculateAvgColour(); 
     80                return mAvgColour; 
     81        } 
     82} 
     83 
     84void Texture::calculateAvgColour() 
     85{ 
     86        unsigned int cR = 0; 
     87        unsigned int cG = 0; 
     88        unsigned int cB = 0; 
     89        unsigned int cA = 0; 
     90 
     91        Ogre::Image img; 
     92        img.load(mTexture->getName(), Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);  
     93        unsigned char* data = static_cast<unsigned char*>(img.getData()); 
     94 
     95        unsigned int nColorpixels = 1; 
     96 
     97        for (unsigned int i = 0; i < mTexture->getWidth() * mTexture->getHeight() * 4; i=i+4) 
     98        { 
     99                cA = (unsigned short int)data[i+3]; 
     100                if (cA != 0) 
     101                { 
     102                        cB = cB + data[i+2]; 
     103                        cG = cG + data[i+1]; 
     104                        cR = cR + data[i];                               
     105 
     106                        nColorpixels++; 
     107                        //Ogre::LogManager::getSingleton().logMessage("(" + Ogre::StringConverter::toString(data[i]) + "," + Ogre::StringConverter::toString(data[i+1]) + "," + Ogre::StringConverter::toString(data[i+2]) + "," + Ogre::StringConverter::toString(data[i+3]) + ")"); 
     108                }                                        
    8109        } 
    9110 
    10     virtual Texture::~Texture() 
    11         { 
    12         } 
     111        cR = cR / nColorpixels; 
     112        cG = cG / nColorpixels; 
     113        cB = cB / nColorpixels; 
    13114 
    14     void Texture::setTextureHandle(unsigned int textureHandle) 
    15         { 
    16                 mTextureHandle = textureHandle; 
    17         } 
     115        mAvgColour = Ogre::ColourValue(cR/255.0, cG/255.0, cB/255.0, 0.0); 
     116        mCalculatedAvgColour = true; 
     117} 
    18118 
    19     unsigned int Texture::getTextureHandle() 
    20         { 
    21                 return mTextureHandle; 
    22         } 
     119void Texture::load(Ogre::String folderName, Ogre::String fileName) 
     120{ 
     121        Ogre::TextureManager::getSingleton().load(fileName, Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 
     122        mTexture = (Ogre::Texture*)Ogre::TextureManager::getSingleton().getByName(fileName).getPointer(); 
     123        mWidth = mTexture->getSrcWidth(); 
     124        mHeight = mTexture->getSrcHeight(); 
     125} 
    23126 
    24     Ogre::String Texture::getMaterialName() 
    25         { 
    26                 return mMaterialName; 
    27         } 
     127void Texture::save(Ogre::String folderName, Ogre::String filename) 
     128{ 
     129    Ogre::HardwarePixelBufferSharedPtr readbuffer; 
     130    readbuffer = mTexture->getBuffer(0, 0); 
     131        unsigned char *tex = new unsigned char[readbuffer->getSizeInBytes()]; 
     132        Ogre::PixelBox *pBox = new Ogre::PixelBox(mTexture->getWidth(), mTexture->getHeight(), mTexture->getDepth(), mTexture->getFormat(), tex); 
     133    readbuffer->blitToMemory((*pBox)); 
     134     
     135    Ogre::Image img; 
     136    img = img.loadDynamicImage(tex, mTexture->getWidth(), mTexture->getHeight(), mTexture->getDepth(), mTexture->getFormat(), true, 1, 0);               
     137        img.resize(mWidth, mHeight); 
     138    img.save(folderName + filename); 
     139        delete pBox; 
     140} 
    28141 
    29     void Texture::setMaterialName(Ogre::String materialName) 
    30         { 
    31                 mMaterialName = materialName; 
    32         } 
     142void Texture::rotate(Ogre::Real rRotation) 
     143{ 
     144        //mTexture->setTextureRotate( Degree( -rRotation ) ); 
     145} 
    33146 
    34     void Texture::setWidth(unsigned int width) 
    35         { 
    36                 mWidth = width; 
    37         } 
     147void Texture::setWidth(unsigned int width) 
     148{ 
     149        mWidth = width; 
     150} 
    38151 
    39     unsigned int Texture::getWidth() 
    40         { 
    41                 return mWidth; 
    42         } 
     152unsigned int Texture::getWidth() 
     153{ 
     154        return mWidth; 
     155} 
    43156 
    44     void Texture::setHeight(unsigned int height) 
    45         { 
    46                 mHeight = height; 
    47         } 
     157void Texture::setHeight(unsigned int height) 
     158{ 
     159        mHeight = height; 
     160} 
    48161 
    49     unsigned int Texture::getHeight() 
    50         { 
    51                 return mHeight; 
    52         } 
     162unsigned int Texture::getHeight() 
     163{ 
     164        return mHeight; 
     165} 
    53166 
    54     void Texture::setRenderTargetName(Ogre::String renderTargetName) 
    55         { 
    56                 mRenderTargetName = renderTargetName; 
    57         } 
     167void Texture::setTextureName(Ogre::String textureName) 
     168{ 
     169        mTextureName = textureName; 
     170} 
    58171 
    59     Ogre::String Texture::getRenderTarget() 
    60         { 
    61                 return mRenderTargetName; 
    62         } 
     172Ogre::String Texture::getTextureName() 
     173{ 
     174        return mTextureName; 
     175} 
    63176 
    64     void Texture::setTextureName(Ogre::String textureName) 
    65         { 
    66                 mTextureName = textureName; 
    67         } 
     177void Texture::setMaterial(Ogre::Material *material) 
     178{ 
     179        mMaterial = material; 
     180        mRectangle2D->setMaterial(mMaterial->getName()); 
     181} 
    68182 
    69     Ogre::String Texture::getTextureName() 
    70         { 
    71                 return mTextureName; 
    72         } 
     183Ogre::Material* Texture::getMaterial() 
     184{ 
     185        return mMaterial; 
     186} 
    73187 
    74188} 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/IMGTextureAtlas.cpp

    r721 r731  
    44namespace IMG { 
    55 
    6     TextureAtlas::TextureAtlas() 
     6TextureAtlas::TextureAtlas(): references(0) // initialize references to 0 
     7{ 
     8        mRectangle2D->setBoundingBox(Ogre::AxisAlignedBox(-100000.0 * Ogre::Vector3::UNIT_SCALE, 100000.0 * Ogre::Vector3::UNIT_SCALE)); 
     9        mRectangle2D->setRenderQueueGroup(Ogre::RENDER_QUEUE_BACKGROUND); 
     10} 
     11 
     12TextureAtlas::~TextureAtlas() 
     13{ 
     14        mTextureList.clear(); 
     15} 
     16 
     17unsigned int TextureAtlas::getReference() 
     18{ 
     19        return references; 
     20} 
     21 
     22void TextureAtlas::setTextureAtlasName(Ogre::String textureAtlasName) 
     23{ 
     24        mTextureAtlasName = textureAtlasName; 
     25} 
     26 
     27Ogre::String TextureAtlas::getTextureAtlasName() 
     28{ 
     29        return mTextureAtlasName; 
     30} 
     31 
     32void TextureAtlas::addTexture(TexturePtr texture) 
     33{ 
     34        mTextureList.push_back(texture); 
     35        mTextureAtlasSceneNode->attachObject(texture->getRectangle2D()); 
     36} 
     37 
     38TexturePtr TextureAtlas::getTexture(unsigned int iTexture) 
     39{ 
     40        return mTextureList[iTexture]; 
     41} 
     42 
     43void TextureAtlas::removeTexture(unsigned int iTexture) 
     44{ 
     45        mTextureList.erase(mTextureList.begin()+iTexture); 
     46} 
     47 
     48unsigned int TextureAtlas::getNumTextures() 
     49{ 
     50        return mTextureList.size(); 
     51} 
     52 
     53void TextureAtlas::setTextureAtlasSceneNode(Ogre::SceneNode *textureAtlasSceneNode) 
     54{ 
     55        mTextureAtlasSceneNode = textureAtlasSceneNode;  
     56        mTextureAtlasSceneNode->attachObject(mRectangle2D); 
     57} 
     58 
     59Ogre::SceneNode* TextureAtlas::getTextureAtlasSceneNode() 
     60{ 
     61        return mTextureAtlasSceneNode; 
     62} 
     63 
     64void TextureAtlas::setCamera(Ogre::Camera *camera) 
     65{ 
     66        mCamera = camera; 
     67} 
     68 
     69void TextureAtlas::update() 
     70{ 
     71        mTexture->getBuffer(0, 0)->getRenderTarget()->update(); 
     72} 
     73 
     74void TextureAtlas::save(Ogre::String folderName, Ogre::String fileName, Ogre::PixelFormat pixelFormat) 
     75{        
     76        unsigned char* pBufferBox = new unsigned char[mTexture->getBuffer(0, 0)->getSizeInBytes()]; 
     77        unsigned char* pBufferDest = new unsigned char[mTexture->getBuffer(0, 0)->getSizeInBytes()]; 
     78 
     79    // Read pixels       
     80        Ogre::PixelBox pBox(mWidth, mHeight, 1, mPixelFormat, pBufferBox); 
     81        Ogre::PixelBox pDest(mWidth, mHeight, 1, pixelFormat, pBufferDest);      
     82        mTexture->getBuffer(0, 0)->blitToMemory(pBox); 
     83        Ogre::PixelUtil::bulkPixelConversion(pBox.data,mPixelFormat,pDest.data,pixelFormat,pBox.getWidth()*pBox.getHeight()); 
     84 
     85        //if (pixelFormat == Ogre::PF_FLOAT32_RGBA) 
     86        //{ 
     87        //      imdebug("rgba w=%d h=%d %p b=32f",pDest.getWidth(),pDest.getHeight(),pDest.data); 
     88        //} 
     89 
     90        // copyToMemory 
     91        Ogre::ImageCodec::ImageData *imgData = new Ogre::ImageCodec::ImageData(); 
     92     
     93    imgData->width = mWidth; 
     94    imgData->height = mHeight; 
     95        imgData->depth = 1;      
     96    imgData->format = pixelFormat; 
     97 
     98        // Wrap buffer in a chunk 
     99        Ogre::MemoryDataStreamPtr stream(new Ogre::MemoryDataStream(pBufferDest, mTexture->getBuffer(0, 0)->getSizeInBytes(), false)); 
     100 
     101    // Get codec  
     102    size_t pos = fileName.find_last_of("."); 
     103    Ogre::String extension; 
     104    if( pos == Ogre::String::npos ) 
    7105        { 
     106        OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS, "Unable to determine image type for '" + fileName + "' - invalid extension.", "GLRenderTexture::writeContentsToFile" ); 
    8107        } 
    9108 
    10     virtual TextureAtlas::~TextureAtlas() 
     109    while( pos != fileName.length() - 1 ) 
    11110        { 
     111        extension += fileName[++pos]; 
    12112        } 
    13113 
    14     void TextureAtlas::setRenderSourceName(Ogre::String renderSourceName) 
    15         { 
    16                 mRenderSourceName = renderSourceName; 
    17         } 
     114    // Get the codec 
     115    Ogre::Codec * pCodec = Ogre::Codec::getCodec(extension); 
    18116 
    19     Ogre::String TextureAtlas::getRenderSourceName() 
    20         { 
    21                 return mRenderSourceName; 
    22         } 
     117    // Write out 
     118    Ogre::Codec::CodecDataPtr codecDataPtr(imgData); 
    23119 
    24         void TextureAtlas::setRenderSourceName(Ogre::String renderSourceName) 
    25         { 
    26                 mRenderSourceName = renderSourceName; 
    27         } 
     120        pCodec->codeToFile(stream,folderName + fileName, codecDataPtr); 
    28121 
    29         void TextureAtlas::addTexture(Texture *texture) 
    30         { 
    31                 mTextureList.push_back(texture); 
    32         } 
     122        delete [] pBufferDest; 
     123        delete [] pBufferBox; 
     124} 
    33125 
    34         void TextureAtlas::getTexture(unsigned int iTexture) 
    35         { 
    36                 return mTextureList[iTexture]; 
    37         } 
     126void TextureAtlas::setFormat(Ogre::PixelFormat pixelFormat) 
     127{ 
     128        mPixelFormat = pixelFormat; 
     129} 
    38130 
    39         void TextureAtlas::removeTexture(unsigned int iTexture) 
    40         { 
    41                 Texture *texture = mTextureList[iTexture]; 
    42                 mTextureList.erase(mTextureList.begin()+iTexture); 
    43                 delete texture; 
    44         } 
     131void TextureAtlas::create(Ogre::String fileName, unsigned int width, unsigned int height, Ogre::PixelFormat pixelFormat, Ogre::Camera *camera) 
     132{ 
     133        mCamera = camera; 
     134        mWidth = width; 
     135        mHeight = height; 
     136        mPixelFormat = pixelFormat; 
     137        mTexture = Ogre::TextureManager::getSingleton().createManual(fileName, "General", Ogre::TEX_TYPE_2D, mWidth, mHeight, 0, mPixelFormat, Ogre::TU_RENDERTARGET).getPointer(); 
     138        mTexture->getBuffer(0, 0)->getRenderTarget(); 
     139        Ogre::RenderTexture *rt = mTexture->getBuffer()->getRenderTarget(); 
     140        rt->setAutoUpdated(false); 
     141        Ogre::Viewport *v = rt->addViewport(mCamera); 
     142        v->setClearEveryFrame(true); 
     143        v->setBackgroundColour(Ogre::ColourValue(1.0f, 1.0f, 1.0f, 0.0f)); 
     144        v->setOverlaysEnabled(false); 
     145        v->setDimensions(0,0,1.0,1.0);   
     146        Ogre::Root::getSingleton().getRenderSystem()->clearFrameBuffer(Ogre::FBT_COLOUR, Ogre::ColourValue(1.0f,1.0f,1.0f,0.0f) ); 
     147} 
    45148 
    46         unsigned int TextureAtlas::getNumTextures() 
    47         { 
    48                 return mTextureList.size(); 
    49         } 
    50149} 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCBillboardKMeansClusterData.cpp

    r721 r731  
    3636        TiXmlNode *quadBottomRightCornerNode; 
    3737        TiXmlNode *quadBottomLeftCornerNode; 
    38         TiXmlNode *axisXNode; 
    3938        TiXmlNode *axisYNode; 
    4039        TiXmlNode *axisZNode; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCClusterViewMode.cpp

    r721 r731  
    11 
    2 #include "LBBCClustersViewMode.h" 
     2#include "LBBCClusterViewMode.h" 
    33 
    44namespace LBBC { 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCManager.cpp

    r721 r731  
    44namespace LBBC { 
    55 
    6 Manager::Manager()  
    7         : BBC::Manager()  
     6LBBCManager::LBBCManager()  
     7        : BBC::BBCManager()  
    88{ 
    99        mBillboardCloudSerializer = new KMeansClusterSerializer(); 
     
    1515} 
    1616 
    17 Manager::~Manager()  
     17LBBCManager::~LBBCManager()  
    1818{ 
    1919        if (mOgreMeshSerializer) 
     
    2121                delete mOgreMeshSerializer; 
    2222        } 
    23         if (mSampleConfigFile) 
    24         { 
    25                 delete mSampleConfigFile; 
    26         } 
     23        // Gametools -- BUG: 06/04/2006 
     24        //if (mSampleConfigFile) 
     25        //{ 
     26        //      delete mSampleConfigFile; 
     27        //} 
    2728        if (mLeafDistributionSerializer) 
    2829        { 
     
    5253} 
    5354 
    54 SampleConfigFile* Manager::getSampleConfigFile() 
     55SampleConfigFile* LBBCManager::getSampleConfigFile() 
    5556{ 
    5657        return mSampleConfigFile; 
    5758} 
    5859 
    59 void Manager::setSampleConfigFile(SampleConfigFile *sampleConfigFile) 
     60void LBBCManager::setSampleConfigFile(SampleConfigFile *sampleConfigFile) 
    6061{ 
    6162        mSampleConfigFile = sampleConfigFile; 
    6263} 
    6364 
    64 void Manager::loadSampleConfigFile(Ogre::String sampleConfigFile) 
     65void LBBCManager::loadSampleConfigFile(Ogre::String sampleConfigFile) 
    6566{ 
    6667        mSampleConfigFile = new SampleConfigFile(); 
     
    6869} 
    6970 
    70 void Manager::runSampleConfigFile() 
     71void LBBCManager::runSampleConfigFile() 
    7172{ 
    7273        mLeaves = new Leaves(); 
    7374         
    7475        BBC::EntityPtr entityLeaves(new BBC::Entity); 
    75         BBC::MeshPtr meshLeaves(new BBC::Mesh(this->loadMesh(mSampleConfigFile->getEntitiesFolder(), mSampleConfigFile->getEntitiesMeshPrefixFilename() + ".mesh")) ); 
     76        BBC::MeshPtr meshLeaves(new BBC::Mesh(this->loadMesh(mSampleConfigFile->getEntitiesFolder(), mSampleConfigFile->getEntitiesMeshPrefixName() + ".mesh")) ); 
    7677        entityLeaves->setMesh(meshLeaves);       
    7778        mLeaves->setEntity(entityLeaves); 
     
    8788        } 
    8889         
     90        if (mSampleConfigFile->getEntitySampleMeshGeneration()) 
     91        { 
     92                saveSingleEntity(); 
     93        } 
     94 
    8995        if (mSampleConfigFile->getEntityClustersGeneration()) 
    9096        { 
     
    96102                generateBillboardCloud(); 
    97103        }        
    98 } 
    99  
    100 void Manager::createEntityDistribution() 
     104 
     105} 
     106 
     107void LBBCManager::createEntityDistribution() 
    101108{ 
    102109        mLeafDistributionGenerator->setDistribution(mLeaves->getDistribution()); 
     
    105112} 
    106113 
    107 void Manager::saveEntityDistributionSplitted() 
     114void LBBCManager::saveEntityDistributionSplitted() 
    108115{ 
    109116        BBC::EntityPtr entity; 
     
    143150                        mOgreMeshSerializer->setEntity(entity); 
    144151                        mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityClustersFolder() + 
    145                                 mSampleConfigFile->getEntityClustersMeshPrefixFilename() + "Splitted.mesh", false, false); 
     152                                mSampleConfigFile->getEntityClustersMeshPrefixName() + "Splitted.mesh", false, false); 
    146153                         
    147                         OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitiesMeshPrefixFilename() + "Splitted.mesh"); 
    148                         //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh().get(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntitiesMeshPrefixFilename() + "Splitted.mesh" + ".xml");                       
     154                        OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitiesMeshPrefixName() + "Splitted.mesh"); 
     155                        //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh().get(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntitiesMeshPrefixName() + "Splitted.mesh" + ".xml");                   
    149156                } 
    150157        } 
     
    157164                mOgreMeshSerializer->setEntity(entity); 
    158165                mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityClustersFolder() + 
    159                         mSampleConfigFile->getEntityClustersMeshPrefixFilename() + "Merged.mesh", false, false); 
    160                  
    161                 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh((Ogre::Mesh*)entity->getMesh().get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitiesMeshPrefixFilename() + "Merged.mesh"); 
    162                 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntitiesMeshPrefixFilename() + "Merged.mesh" + ".xml");               
    163  
    164                 //Ogre::MeshManager::getSingleton().unload(mSampleConfigFile->getEntitiesMeshPrefixFilename() + "Merged.mesh"); 
    165         } 
    166 } 
    167  
    168 void Manager::saveEntityDistributionXML() 
     166                        mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh", false, false); 
     167                 
     168                OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh((Ogre::Mesh*)entity->getMesh().get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitiesMeshPrefixName() + "Merged.mesh"); 
     169                //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntitiesMeshPrefixName() + "Merged.mesh" + ".xml");                           
     170        } 
     171} 
     172 
     173void LBBCManager::saveEntityDistributionXML() 
    169174{ 
    170175        TiXmlDocument *document = mLeafDistributionSerializer->create( 
    171176                                                                        mSampleConfigFile->getEntityDistributionFolder() + 
    172                                                                         mSampleConfigFile->getEntityDistributionXMLPrefixFilename() + ".xml"); 
     177                                                                        mSampleConfigFile->getEntityDistributionXMLPrefixName() + ".xml"); 
    173178        mLeafDistributionSerializer->setLeafDistribution(mLeaves->getDistribution()); 
    174179        mLeafDistributionSerializer->writeLeafDistribution(document);    
     
    176181} 
    177182 
    178 void Manager::loadEntityDistribution() 
     183void LBBCManager::loadEntityDistribution() 
    179184{ 
    180185        TiXmlDocument *document = mLeafDistributionSerializer->load( 
    181186                                                                        mSampleConfigFile->getEntityDistributionFolder() + 
    182                                                                         mSampleConfigFile->getEntityDistributionXMLPrefixFilename() + ".xml"); 
     187                                                                        mSampleConfigFile->getEntityDistributionXMLPrefixName() + ".xml"); 
    183188        mLeafDistributionSerializer->setLeafDistribution(mLeaves->getDistribution()); 
    184189        mLeafDistributionSerializer->getEntity()->setMesh(mLeaves->getEntity()->getMesh()); 
     
    188193        BBC::EntityDistribution *entityDistribution; 
    189194 
    190         BBC::MeshPtr pMeshLeavesSplitted(new BBC::Mesh(this->loadMesh(mSampleConfigFile->getEntitiesFolder(), mSampleConfigFile->getEntitiesMeshPrefixFilename() + "Splitted.mesh"))); 
     195        BBC::MeshPtr pMeshLeavesSplitted(new BBC::Mesh(this->loadMesh(mSampleConfigFile->getEntitiesFolder(), mSampleConfigFile->getEntitiesMeshPrefixName() + "Splitted.mesh"))); 
    191196        entity = BBC::EntityPtr(new BBC::Entity()); 
    192197        entity->setMesh(pMeshLeavesSplitted); 
     
    211216} 
    212217 
    213 void Manager::generateEntityDistribution() 
     218void LBBCManager::generateEntityDistribution() 
    214219{ 
    215220        if (mSampleConfigFile->getEntityDistributionGeneration()) 
     
    221226} 
    222227 
    223 void Manager::saveBillboardCloudGrouped() 
     228void LBBCManager::saveBillboardCloudGrouped() 
    224229{ 
    225230        for (unsigned int iSubEntity = 0; iSubEntity < mLeaves->getBillboardCloud()->getEntity()->getNumSubEntities(); iSubEntity++) 
    226231        { 
    227232                BBC::SubEntityPtr subEntity = mLeaves->getBillboardCloud()->getEntity()->getSubEntity(iSubEntity); 
    228                 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudMaterialPrefixFilename()); 
     233                subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudBillboardGroupMaterialPrefixName()); 
    229234        } 
    230235        mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntity()); 
     
    232237        Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mLeaves->getBillboardCloud()->getEntity()->getNumSubEntities())); 
    233238        mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 
    234                                 mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Grouped.mesh",false, false); 
    235         OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Grouped.mesh"); 
    236         OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Grouped.mesh.xml"); 
    237  
    238         //Ogre::MeshManager::getSingleton().unload(mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Grouped.mesh"); 
    239 } 
    240  
    241  
    242 void Manager::saveBillboardCloudSplitted() 
     239                                mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Grouped.mesh",false, false); 
     240        OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Grouped.mesh"); 
     241        OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Grouped.mesh.xml"); 
     242} 
     243 
     244 
     245void LBBCManager::saveBillboardCloudSplitted() 
    243246{        
    244247        for (unsigned int iSubEntity = 0; iSubEntity < mLeaves->getBillboardCloud()->getEntity()->getNumSubEntities(); iSubEntity++) 
    245248        { 
    246249                BBC::SubEntityPtr subEntity = mLeaves->getBillboardCloud()->getEntity()->getSubEntity(iSubEntity); 
    247                 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudMaterialPrefixFilename()); 
     250                subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudBillboardMaterialPrefixName()); 
    248251        } 
    249252 
     
    253256 
    254257        mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 
    255                                 mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Splitted.mesh",false, false); 
    256  
    257         OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Splitted.mesh"); 
    258  
    259         OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Splitted.mesh.xml"); 
    260 } 
    261  
    262 void Manager::saveBillboardCloudMerged() 
     258                                mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Splitted.mesh",false, false); 
     259 
     260        OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Splitted.mesh"); 
     261 
     262        OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Splitted.mesh.xml"); 
     263} 
     264 
     265void LBBCManager::saveBillboardCloudMerged() 
    263266{        
    264         //mLeaves->getBillboardCloud()->getEntity()->getSubEntity(0)->setMaterialName(mSampleConfigFile->getBillboardCloudMaterialPrefixFilename()); 
     267        //mLeaves->getBillboardCloud()->getEntity()->getSubEntity(0)->setMaterialName(mSampleConfigFile->getBillboardCloudMaterialPrefixName()); 
    265268        //mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntity()); 
    266269        //mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 
    267         //                      mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Merged.mesh", mSampleConfigFile->getBillboardCloudMergedBillboards(), false); 
     270        //                      mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Merged.mesh", mSampleConfigFile->getBillboardCloudMergedBillboards(), false); 
    268271        //OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh(),  
    269         //                      mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Merged.mesh"); 
    270         //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Merged.mesh.xml"); 
     272        //                      mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Merged.mesh"); 
     273        //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Merged.mesh.xml"); 
    271274         
    272275 
     
    274277        { 
    275278                BBC::SubEntityPtr subEntity = mLeaves->getBillboardCloud()->getEntity()->getSubEntity(iSubEntity); 
    276                 subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudMaterialPrefixFilename()); 
     279                subEntity->setMaterialName(mSampleConfigFile->getBillboardCloudBillboardGroupMaterialPrefixName()); 
    277280        } 
    278281        mOgreMeshSerializer->setEntity(mLeaves->getBillboardCloud()->getEntity()); 
     
    280283        Ogre::LogManager::getSingleton().logMessage("Num.SubEntities:" + Ogre::StringConverter::toString(mLeaves->getBillboardCloud()->getEntity()->getNumSubEntities())); 
    281284        mOgreMeshSerializer->exportMesh(mSampleConfigFile->getBillboardCloudFolder() + 
    282                                 mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Merged.mesh",false, false); 
    283         OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Merged.mesh");     
    284         OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Merged.mesh.xml"); 
    285          
    286         //Ogre::MeshManager::getSingleton().unload(mSampleConfigFile->getBillboardCloudMeshPrefixFilename() + "Merged.mesh"); 
    287 } 
    288  
    289 void Manager::saveBillboardCloudXML() 
     285                                mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Merged.mesh",false, false); 
     286        OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Merged.mesh");         
     287        OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(mLeaves->getBillboardCloud()->getEntity()->getMesh()->get(), mSampleConfigFile->getBillboardCloudFolder() + mSampleConfigFile->getBillboardCloudMeshPrefixName() + "Merged.mesh.xml");  
     288} 
     289 
     290void LBBCManager::saveBillboardCloudXML() 
    290291{ 
    291292        //saveBillboardCloud() 
    292293        TiXmlDocument *document2 = mBillboardCloudSerializer->create( 
    293294                                                                        mSampleConfigFile->getBillboardCloudFolder() +  
    294                                                                         mSampleConfigFile->getBillboardCloudXMLPrefixFilename() + ".xml"); 
     295                                                                        mSampleConfigFile->getBillboardCloudXMLPrefixName() + ".xml"); 
    295296        mBillboardCloudSerializer->setBillboardCloud(mLeaves->getBillboardCloud()); 
    296297        mBillboardCloudSerializer->writeBillboardCloud(document2);       
     
    298299} 
    299300 
    300 void Manager::saveEntityClusters() 
     301void LBBCManager::saveEntityClusters() 
    301302{ 
    302303        BBC::BillboardClusterDataPtr billboardClusterData; 
     
    315316                        {                                        
    316317                                BBC::EntityPtr entityClusterized = entityCluster->getEntity(); 
    317                                 entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersMaterialPrefixFilename()); 
     318                                entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersMaterialPrefixName()); 
    318319                                mOgreMeshSerializer->setEntity(entityClusterized); 
    319320                                mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 
    320                                         mSampleConfigFile->getEntityClustersMeshPrefixFilename() + 
     321                                        mSampleConfigFile->getEntityClustersMeshPrefixName() + 
    321322                                        Ogre::StringConverter::toString(numSerializedBillboards) + ".mesh", !(mSampleConfigFile->getEntityClustersSplittedClusters()), false); 
    322323                                OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entityClusterized->getMesh()->get(), 
    323324                                        mSampleConfigFile->getEntityClustersFolder() + 
    324                                         mSampleConfigFile->getEntityClustersMeshPrefixFilename() + 
     325                                        mSampleConfigFile->getEntityClustersMeshPrefixName() + 
    325326                                        Ogre::StringConverter::toString(numSerializedBillboards) + ".mesh"); 
    326327                                //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entityClusterized->getMesh(), entityClusterized->getMesh()->getName() + ".xml"); 
    327  
    328                                 //Ogre::MeshManager::getSingleton().unload(mSampleConfigFile->getEntityClustersMeshPrefixFilename() + Ogre::StringConverter::toString(numSerializedBillboards) + ".mesh"); 
    329328 
    330329                                numSerializedBillboards++; 
     
    347346                        {                        
    348347                                BBC::EntityPtr entityClusterized = entityCluster->getEntity(); 
    349                                 entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersMaterialPrefixFilename()); 
     348                                entityClusterized->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersMaterialPrefixName()); 
    350349                                BBC::SubEntityPtr subEntity = entityClusterized->getSubEntity(0); 
    351350 
     
    371370                mOgreMeshSerializer->setEntity(entity); 
    372371                mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityClustersFolder() + 
    373                         mSampleConfigFile->getEntityClustersMeshPrefixFilename() + "Merged.mesh", false, false); 
    374                  
    375                 OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersMeshPrefixFilename() + "Merged.mesh"); 
    376                 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersMeshPrefixFilename() + "Merged.mesh" + ".xml"); 
    377  
    378                 //Ogre::MeshManager::getSingleton().unload(mSampleConfigFile->getEntityClustersMeshPrefixFilename() + "Merged.mesh"); 
    379  
    380                 Ogre::LogManager::getSingleton().logMessage("Before deleting:" + mSampleConfigFile->getEntityClustersMeshPrefixFilename() + "Merged.mesh");      
    381         } 
    382 } 
    383  
    384 void Manager::createEntityClusters() 
     372                        mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh", false, false); 
     373                 
     374                OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entity->getMesh()->get(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh"); 
     375                //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entity->getMesh(), mSampleConfigFile->getEntityClustersFolder() + mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh" + ".xml"); 
     376 
     377                Ogre::LogManager::getSingleton().logMessage("Before deleting:" + mSampleConfigFile->getEntityClustersMeshPrefixName() + "Merged.mesh");  
     378        } 
     379} 
     380 
     381void LBBCManager::createEntityClusters() 
    385382{ 
    386383        mBillboardCloudGenerator->setDistribution(mLeaves->getDistribution()); 
     
    392389} 
    393390 
    394 void Manager::saveSingleEntity() 
    395 { 
    396         if (mSampleConfigFile->getEntitySampleMeshGeneration()) 
    397         { 
    398                 BBC::EntityPtr entityLeaf = mLeaves->getDistribution()->getEntity(2); 
    399                 entityLeaf->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntityClustersMaterialPrefixFilename()); 
    400                 mOgreMeshSerializer->setEntity(entityLeaf); 
    401                 mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 
    402                         mSampleConfigFile->getEntitySampleMeshPrefixFilename(), mSampleConfigFile->getEntityClustersMergedClusters(), false); 
    403                 //OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entityLeaf->getMesh(), entityLeaf->getMesh()->getName() + ".xml"); 
    404  
    405         } 
    406 } 
    407  
    408 void Manager::generateEntityClusters() 
    409 { 
    410         Ogre::LogManager::getSingleton().logMessage("EntityClustersMeshPrefixName:" + mSampleConfigFile->getEntityClustersMeshPrefixFilename()); 
     391void LBBCManager::saveSingleEntity() 
     392{ 
     393        BBC::EntityPtr entityLeaf = mLeaves->getDistribution()->getEntity(2); 
     394        entityLeaf->getSubEntity(0)->setMaterialName(mSampleConfigFile->getEntitySampleMaterialPrefixName()); 
     395        mOgreMeshSerializer->setEntity(entityLeaf); 
     396        mOgreMeshSerializer->exportMesh(mSampleConfigFile->getEntityDistributionFolder() + 
     397                mSampleConfigFile->getEntitySampleMeshPrefixName(), false, false); 
     398        OBA::OgreBase::getSingleton().getMeshSerializer()->exportMesh(entityLeaf->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitySampleMeshPrefixName() + ".mesh"); 
     399        OBA::OgreBase::getSingleton().getXMLMeshSerializer()->exportMesh(entityLeaf->getMesh()->get(), mSampleConfigFile->getEntityDistributionFolder() + mSampleConfigFile->getEntitySampleMeshPrefixName() + ".mesh.xml");     
     400} 
     401 
     402void LBBCManager::generateEntityClusters() 
     403{ 
     404        Ogre::LogManager::getSingleton().logMessage("EntityClustersMeshPrefixName:" + mSampleConfigFile->getEntityClustersMeshPrefixName()); 
    411405        createEntityClusters(); 
    412         saveEntityClusters(); 
    413         saveSingleEntity();      
    414 } 
    415  
    416 void Manager::generateBillboardCloud() 
     406        saveEntityClusters();    
     407} 
     408 
     409void LBBCManager::generateBillboardCloud() 
    417410{ 
    418411        if (mSampleConfigFile->getBillboardCloudMergedBillboards()) 
     
    422415                mLeaves->getBillboardCloud()->initializeBillboardCloudGroups(1); 
    423416 
    424                 if (mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasGeneration()) 
     417                if (mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasGeneration()) 
    425418                { 
    426419                        mBillboardCloudUVMapper->shutdown(); 
    427420                        mBillboardCloudUVMapper->setBillboardCloud(mLeaves->getBillboardCloud()); 
    428                         mBillboardCloudUVMapper->setTextureWidth(mSampleConfigFile->getBillboardCloudDiffuseColorTextureSize()); 
    429                         mBillboardCloudUVMapper->setTextureHeight(mSampleConfigFile->getBillboardCloudDiffuseColorTextureSize()); 
    430                         mBillboardCloudUVMapper->setTextureAtlasWidth(mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasSize()); 
    431                         mBillboardCloudUVMapper->setTextureAtlasHeight(mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasSize()); 
     421                        mBillboardCloudUVMapper->setTextureWidth(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureSize()); 
     422                        mBillboardCloudUVMapper->setTextureHeight(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureSize()); 
     423                        mBillboardCloudUVMapper->setTextureAtlasWidth(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasSize()); 
     424                        mBillboardCloudUVMapper->setTextureAtlasHeight(mSampleConfigFile->getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasSize()); 
    432425                        mBillboardCloudUVMapper->initialize(); 
    433426 
     
    446439                mLeaves->getBillboardCloud()->initializeBillboardCloudGroups(mSampleConfigFile->getBillboardCloudGroups()); 
    447440                 
    448                 if (mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasGeneration()) 
     441                if (mSampleConfigFile->getBillboardCloudDiffuseColorBillboardGroupTextureAtlasGeneration()) 
    449442                { 
    450443                        mBillboardCloudUVMapper->shutdown(); 
    451444                        mBillboardCloudUVMapper->setBillboardCloud(mLeaves->getBillboardCloud()); 
    452                         mBillboardCloudUVMapper->setTextureWidth(mSampleConfigFile->getBillboardCloudDiffuseColorTextureSize()); 
    453                         mBillboardCloudUVMapper->setTextureHeight(mSampleConfigFile->getBillboardCloudDiffuseColorTextureSize()); 
    454                         mBillboardCloudUVMapper->setTextureAtlasWidth(mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasSize()); 
    455                         mBillboardCloudUVMapper->setTextureAtlasHeight(mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasSize()); 
     445                        mBillboardCloudUVMapper->setTextureWidth(mSampleConfigFile->getBillboardCloudDiffuseColorBillboardGroupTextureSize()); 
     446                        mBillboardCloudUVMapper->setTextureHeight(mSampleConfigFile->getBillboardCloudDiffuseColorBillboardGroupTextureSize()); 
     447                        mBillboardCloudUVMapper->setTextureAtlasWidth(mSampleConfigFile->getBillboardCloudDiffuseColorBillboardGroupTextureAtlasSize()); 
     448                        mBillboardCloudUVMapper->setTextureAtlasHeight(mSampleConfigFile->getBillboardCloudDiffuseColorBillboardGroupTextureAtlasSize()); 
    456449                        mBillboardCloudUVMapper->initialize(); 
    457450                        mBillboardCloudUVMapper->generateTextureAtlasTextureCoords(false, mSampleConfigFile->getBillboardCloudGroupedBillboards(), mSampleConfigFile->getBillboardCloudGroups());  
     
    466459        {                
    467460                mLeaves->getBillboardCloud()->generateBillboardCloud(false); 
    468                 if (mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasGeneration()) 
    469                 { 
    470                         mBillboardCloudUVMapper->shutdown(); 
    471                         mBillboardCloudUVMapper->setBillboardCloud(mLeaves->getBillboardCloud()); 
    472                         mBillboardCloudUVMapper->setTextureWidth(mSampleConfigFile->getBillboardCloudDiffuseColorTextureSize()); 
    473                         mBillboardCloudUVMapper->setTextureHeight(mSampleConfigFile->getBillboardCloudDiffuseColorTextureSize()); 
    474                         mBillboardCloudUVMapper->setTextureAtlasWidth(mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasSize()); 
    475                         mBillboardCloudUVMapper->setTextureAtlasHeight(mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasSize()); 
    476                         mBillboardCloudUVMapper->initialize(); 
    477                         mBillboardCloudUVMapper->generateTextureAtlasTextureCoords(!mSampleConfigFile->getBillboardCloudSplittedBillboards(),false);  
    478                 } 
     461                //if (mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasGeneration()) 
     462                //{ 
     463                //      mBillboardCloudUVMapper->shutdown(); 
     464                //      mBillboardCloudUVMapper->setBillboardCloud(mLeaves->getBillboardCloud()); 
     465                //      mBillboardCloudUVMapper->setTextureWidth(mSampleConfigFile->getBillboardCloudDiffuseColorTextureSize()); 
     466                //      mBillboardCloudUVMapper->setTextureHeight(mSampleConfigFile->getBillboardCloudDiffuseColorTextureSize()); 
     467                //      mBillboardCloudUVMapper->setTextureAtlasWidth(mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasSize()); 
     468                //      mBillboardCloudUVMapper->setTextureAtlasHeight(mSampleConfigFile->getBillboardCloudDiffuseColorTextureAtlasSize()); 
     469                //      mBillboardCloudUVMapper->initialize(); 
     470                //      mBillboardCloudUVMapper->generateTextureAtlasTextureCoords(!mSampleConfigFile->getBillboardCloudSplittedBillboards(),false);  
     471                //} 
    479472                saveBillboardCloudSplitted(); 
    480473        } 
     
    483476} 
    484477 
    485 Leaves* Manager::getLeaves() 
     478Leaves* LBBCManager::getLeaves() 
    486479{ 
    487480        return mLeaves; 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/LBBCSampleConfigFile.cpp

    r721 r731  
    1111} 
    1212 
    13 Ogre::String SampleConfigFile::getEntitySampleMeshPrefixFilename() 
    14 { 
    15         return getSetting("Entity Sample Mesh Prefix Filename"); 
     13Ogre::String SampleConfigFile::getEntitySampleMaterialPrefixName() 
     14{ 
     15        return getSetting("Entity Sample Material Prefix Name"); 
     16} 
     17 
     18Ogre::String SampleConfigFile::getEntitySampleMeshPrefixName() 
     19{ 
     20        return getSetting("Entity Sample Mesh Prefix Name"); 
    1621} 
    1722 
     
    4146} 
    4247 
    43 Ogre::String SampleConfigFile::getEntityDistributionXMLPrefixFilename() 
    44 { 
    45         return getSetting("Entity Distribution XML Prefix Filename"); 
     48Ogre::String SampleConfigFile::getEntityDistributionXMLPrefixName() 
     49{ 
     50        return getSetting("Entity Distribution XML Prefix Name"); 
    4651} 
    4752 
     
    5257 
    5358 
    54 Ogre::String SampleConfigFile::getEntitiesMeshPrefixFilename() 
    55 { 
    56         return getSetting("Entities Mesh Prefix Filename"); 
    57 } 
    58  
    59 Ogre::String SampleConfigFile::getBillboardCloudXMLPrefixFilename() 
    60 { 
    61         return getSetting("Billboard Cloud XML Prefix Filename"); 
     59Ogre::String SampleConfigFile::getEntitiesMeshPrefixName() 
     60{ 
     61        return getSetting("Entities Mesh Prefix Name"); 
     62} 
     63 
     64Ogre::String SampleConfigFile::getBillboardCloudXMLPrefixName() 
     65{ 
     66        return getSetting("Billboard Cloud XML Prefix Name"); 
    6267} 
    6368 
     
    122127} 
    123128 
    124 Ogre::String SampleConfigFile::getEntityClustersMeshPrefixFilename() 
    125 { 
    126         return getSetting("Entity Clusters Mesh Prefix Filename"); 
    127 } 
    128  
    129 Ogre::String SampleConfigFile::getEntityClustersMaterialPrefixFilename() 
    130 { 
    131         return getSetting("Entity Clusters Material Prefix Filename"); 
     129Ogre::String SampleConfigFile::getEntityClustersMeshPrefixName() 
     130{ 
     131        return getSetting("Entity Clusters Mesh Prefix Name"); 
     132} 
     133 
     134Ogre::String SampleConfigFile::getEntityClustersMaterialPrefixName() 
     135{ 
     136        return getSetting("Entity Clusters Material Prefix Name"); 
    132137} 
    133138 
     
    137142} 
    138143 
    139 Ogre::String SampleConfigFile::getBillboardCloudMeshPrefixFilename() 
    140 { 
    141         return getSetting("Billboard Cloud Mesh Prefix Filename"); 
    142 } 
    143  
    144 Ogre::String SampleConfigFile::getBillboardCloudMaterialPrefixFilename() 
    145 { 
    146         return getSetting("Billboard Cloud Material Prefix Filename"); 
    147 } 
    148  
    149 bool SampleConfigFile::getBillboardCloudDiffuseColorTextureAtlasGeneration() 
    150 { 
    151         return Ogre::StringConverter::parseBool(getSetting("Billboard Cloud Diffuse Color Texture Atlas Generation")); 
    152 } 
    153  
    154 unsigned int SampleConfigFile::getBillboardCloudDiffuseColorTextureSize() 
    155 { 
    156         return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Texture Size")); 
    157 } 
    158  
    159 unsigned int SampleConfigFile::getBillboardCloudDiffuseColorTextureAtlasSize() 
    160 { 
    161         return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Texture Atlas Size")); 
    162 } 
    163  
    164 bool SampleConfigFile::getBillboardCloudIndirectTextureAtlasGeneration() 
    165 { 
    166         return Ogre::StringConverter::parseBool(getSetting("Billboard Cloud Diffuse Color Texture Atlas Generation")); 
    167 } 
    168  
    169 unsigned int SampleConfigFile::getBillboardCloudIndirectTextureSize() 
    170 { 
    171         return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Indirect Texture Size")); 
    172 } 
    173  
    174 unsigned int SampleConfigFile::getBillboardCloudIndirectTextureAtlasSize() 
    175 { 
    176         return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Indirect Texture Atlas Size")); 
     144Ogre::String SampleConfigFile::getBillboardCloudMeshPrefixName() 
     145{ 
     146        return getSetting("Billboard Cloud Mesh Prefix Name"); 
     147} 
     148 
     149Ogre::String SampleConfigFile::getBillboardCloudBillboardMaterialPrefixName() 
     150{ 
     151        return getSetting("Billboard Cloud Billboard Material Prefix Name"); 
     152} 
     153 
     154Ogre::String SampleConfigFile::getBillboardCloudBillboardGroupMaterialPrefixName() 
     155{ 
     156        return getSetting("Billboard Cloud Billboard Group Material Prefix Name"); 
     157} 
     158 
     159Ogre::String SampleConfigFile::getBillboardCloudBillboardTextureUnit0PrefixName() 
     160{ 
     161        return getSetting("Billboard Cloud Billboard Texture Unit 0 Prefix Name"); 
     162} 
     163 
     164Ogre::String SampleConfigFile::getBillboardCloudBillboardGroupTextureUnit0PrefixName() 
     165{ 
     166        return getSetting("Billboard Cloud Billboard Group Texture Unit 0 Prefix Name"); 
     167} 
     168 
     169Ogre::String SampleConfigFile::getBillboardCloudIndirectBillboardGroupTextureAtlasPrefixName() 
     170{ 
     171        return getSetting("Billboard Cloud Indirect Billboard Group Texture Atlas Prefix Name"); 
     172} 
     173 
     174unsigned int SampleConfigFile::getBillboardCloudDiffuseColorEntityTextureAtlasBitRange() 
     175{ 
     176        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Entity Texture Atlas Bit Range")); 
     177} 
     178 
     179unsigned int SampleConfigFile::getBillboardCloudDiffuseColorBillboardGroupTextureSize() 
     180{ 
     181        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Billboard Group Texture Size")); 
    177182} 
    178183 
     
    182187} 
    183188 
     189unsigned int SampleConfigFile::getBillboardCloudIndirectBillboardGroupTextureAtlasBitRange() 
     190{ 
     191        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Indirect Billboard Group Texture Atlas Bit Range")); 
     192} 
     193 
     194unsigned int SampleConfigFile::getBillboardCloudIndirectBillboardGroupTextureAtlasSize() 
     195{ 
     196        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Indirect Billboard Group Texture Atlas Size")); 
     197} 
     198 
     199unsigned int SampleConfigFile::getBillboardCloudIndirectBillboardGroupTextureSize() 
     200{ 
     201        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Indirect Billboard Group Texture Size")); 
     202} 
     203 
     204unsigned int SampleConfigFile::getBillboardCloudDiffuseColorBillboardGroupTextureAtlasSize() 
     205{ 
     206        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Billboard Group Texture Atlas Size")); 
     207} 
     208 
     209bool SampleConfigFile::getBillboardCloudDiffuseColorBillboardGroupTextureAtlasGeneration() 
     210{ 
     211        return Ogre::StringConverter::parseBool(getSetting("Billboard Cloud Diffuse Color Billboard Group Texture Atlas Generation")); 
     212} 
     213 
     214bool SampleConfigFile::getBillboardCloudIndirectBillboardGroupTextureAtlasGeneration() 
     215{ 
     216        return Ogre::StringConverter::parseBool(getSetting("Billboard Cloud Indirect Billboard Group Texture Atlas Generation")); 
     217} 
     218 
    184219bool SampleConfigFile::getBillboardCloudGroupedBillboards() 
    185220{ 
     
    187222} 
    188223 
    189 } 
     224bool SampleConfigFile::getBillboardCloudDiffuseColorEntityTextureAtlasGeneration() 
     225{ 
     226        return Ogre::StringConverter::parseBool(getSetting("Billboard Cloud Diffuse Color Entity Texture Atlas Generation")); 
     227} 
     228 
     229Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorEntityTexturePrefixName() 
     230{ 
     231        return getSetting("Billboard Cloud Diffuse Color Entity Texture Prefix Name"); 
     232} 
     233 
     234Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorEntityTextureAtlasPrefixName() 
     235{ 
     236        return getSetting("Billboard Cloud Diffuse Color Entity Texture Atlas Prefix Name"); 
     237} 
     238 
     239unsigned int SampleConfigFile::getBillboardCloudDiffuseColorEntityTextureAtlasSize() 
     240{ 
     241        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Entity Texture Atlas Size")); 
     242} 
     243 
     244unsigned int SampleConfigFile::getBillboardCloudDiffuseColorEntityTextureAtlasNumSamples() 
     245{ 
     246        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Entity Texture Atlas NumSamples")); 
     247} 
     248 
     249bool SampleConfigFile::getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasGeneration() 
     250{ 
     251        return Ogre::StringConverter::parseBool(getSetting("Billboard Cloud Diffuse Color Merged Billboards Texture Atlas Generation")); 
     252} 
     253 
     254Ogre::String SampleConfigFile::getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasPrefixName() 
     255{ 
     256        return getSetting("Billboard Cloud Diffuse Color Merged Billboards Texture Atlas Prefix Name"); 
     257} 
     258 
     259unsigned int SampleConfigFile::getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasBitRange() 
     260{ 
     261        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Merged Billboards Texture Atlas Bit Range")); 
     262} 
     263 
     264unsigned int SampleConfigFile::getBillboardCloudDiffuseColorMergedBillboardsTextureAtlasSize() 
     265{ 
     266        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Merged Billboards Texture Atlas Size")); 
     267} 
     268 
     269unsigned int SampleConfigFile::getBillboardCloudDiffuseColorMergedBillboardsTextureSize() 
     270{ 
     271        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Diffuse Color Merged Billboards Texture Size")); 
     272} 
     273 
     274bool SampleConfigFile::getBillboardCloudIndirectMergedBillboardsTextureAtlasGeneration() 
     275{ 
     276        return Ogre::StringConverter::parseBool(getSetting("Billboard Cloud Indirect Merged Billboards Texture Atlas Generation")); 
     277} 
     278 
     279Ogre::String SampleConfigFile::getBillboardCloudIndirectMergedBillboardsTextureAtlasPrefixName() 
     280{ 
     281        return getSetting("Billboard Cloud Indirect Merged Billboards Texture Atlas Prefix Name"); 
     282} 
     283 
     284unsigned int SampleConfigFile::getBillboardCloudIndirectMergedBillboardsTextureAtlasBitRange() 
     285{ 
     286        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Indirect Merged Billboards Texture Atlas Bit Range")); 
     287} 
     288 
     289unsigned int SampleConfigFile::getBillboardCloudIndirectMergedBillboardsTextureAtlasSize() 
     290{ 
     291        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Indirect Merged Billboards Texture Atlas Size")); 
     292} 
     293 
     294unsigned int SampleConfigFile::getBillboardCloudIndirectMergedBillboardsTextureSize() 
     295{ 
     296        return Ogre::StringConverter::parseInt(getSetting("Billboard Cloud Indirect Merged Billboards Texture Size")); 
     297} 
     298 
     299} 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/OBAOgreApplication.cpp

    r721 r731  
    1414{ 
    1515        // Gametools -- BUG: 31/03/2006 
    16         //if (mFrameListener) 
    17         //{ 
    18         //      delete mFrameListener; 
    19         //} 
     16        if (mFrameListener) 
     17        { 
     18                delete mFrameListener; 
     19        } 
    2020 
    2121        //if (mOgreBase) 
     
    7676                // You can skip this and use root.restoreConfig() to load configuration 
    7777                // settings if you were sure there are valid ones saved in ogre.cfg 
    78                 //if(mRoot->showConfigDialog()) 
    79                 if (mRoot->restoreConfig()) 
     78                if(mRoot->showConfigDialog()) 
     79                //if (mRoot->restoreConfig()) 
    8080                { 
    8181                        // If returned true, user clicked OK so initialise 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/OBAOgreBase.cpp

    r721 r731  
    2929        return mXMLMeshSerializer; 
    3030} 
    31          
     31 
     32Ogre::MaterialSerializer* OgreBase::getMaterialSerializer() 
     33{ 
     34        return mMaterialSerializer; 
     35} 
     36 
    3237Ogre::MeshSerializer* OgreBase::getMeshSerializer() 
    3338{ 
    3439        return mMeshSerializer; 
    35 } 
    36  
    37 Ogre::MeshManager* OgreBase::getMeshManager() 
    38 { 
    39         return mMeshManager; 
    4040} 
    4141 
     
    4848   mMath = new Ogre::Math(); 
    4949   mMeshManager = new Ogre::MeshManager(); 
    50    //mMaterialManager = new Ogre::MaterialManager(); 
     50   mMaterialManager = new Ogre::MaterialManager(); 
     51   mMaterialManager->initialise(); 
     52   mMaterialSerializer = new Ogre::MaterialSerializer(); 
    5153   mMeshSerializer = new Ogre::MeshSerializer(); 
    5254   mXMLMeshSerializer = new Ogre::XMLMeshSerializer(); 
     
    7981        } 
    8082 
     83        if (mMaterialSerializer) 
     84        { 
     85                delete mMaterialSerializer; 
     86        } 
     87 
    8188        if (mMath) 
    8289        { 
     
    8996        } 
    9097 
    91         //if (mMaterialManager) 
    92         //{ 
    93         //      mMaterialManager->removeAll(); 
    94         //      delete mMaterialManager;         
    95         //} 
     98        if (mMaterialManager) 
     99        { 
     100                mMaterialManager->removeAll(); 
     101                delete mMaterialManager;         
     102        } 
    96103 
    97104        if (mResourceGroupManager) 
  • GTP/trunk/Lib/Illum/IBRBillboardCloudTrees/OGRE/src/OBAOgreFrameListener.cpp

    r721 r731  
    3939OgreFrameListener::~OgreFrameListener() 
    4040{ 
     41                for (unsigned int iOgreFrameListenerMode = 0; iOgreFrameListenerMode < this->getNumFrameListenerModes(); iOgreFrameListenerMode++) 
     42                { 
     43                        this->removeFrameListenerMode(iOgreFrameListenerMode);           
     44                } 
    4145                if (mInputTypeSwitchingOn) 
    4246                { 
     
    4852        else 
    4953        { 
    50                         if (mInputDevice) 
    51                         { 
    52                                 Ogre::PlatformManager::getSingleton().destroyInputReader( mInputDevice ); 
    53                         } 
     54                        // Gametools -- BUG: 06/04/2006 
     55                        //if (mInputDevice) 
     56                        //{ 
     57                        //      Ogre::PlatformManager::getSingleton().destroyInputReader( mInputDevice ); 
     58                        //} 
     59                        //delete mInputDevice; 
    5460        } 
    55  
    56                 for (unsigned int iOgreFrameListenerMode = 0; iOgreFrameListenerMode < this->getNumFrameListenerModes(); iOgreFrameListenerMode++) 
    57                 { 
    58                         OBA::OgreFrameListenerMode *ogreFrameListenerMode = this->getFrameListenerMode(iOgreFrameListenerMode); 
    59                         this->removeFrameListenerMode(iOgreFrameListenerMode); 
    60                         delete ogreFrameListenerMode; 
    61                 } 
    6261} 
    6362 
     
    9190    } 
    9291 
     92        mWindow->setDebugText("P: " + mDefaultOgreFrameListenerMode->getSceneManager()->getName() + " -- " + Ogre::StringConverter::toString(mTimeUntilNextToggle)); 
     93 
    9394        return mDefaultOgreFrameListenerMode->frameStarted(evt,mInputDevice); 
    9495} 
     
    107108                mWindow->setDebugText("P: " + mDefaultOgreFrameListenerMode->getSceneManager()->getName()); 
    108109 
    109                 mTimeUntilNextToggle = 1; 
     110                mTimeUntilNextToggle = 0.25; 
    110111    } 
    111112 
Note: See TracChangeset for help on using the changeset viewer.