Changeset 2703


Ignore:
Timestamp:
05/23/08 18:29:47 (16 years ago)
Author:
mattausch
Message:

worked on dynamic objects

Location:
GTP/trunk/Lib/Vis/Preprocessing/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp

    r2702 r2703  
    662662                cout << "loading objects from " << buf << endl; 
    663663 
    664                 // load scene objects used as pvs entries 
     664                // load scene objects which are the entities used as pvs entries 
    665665                ObjectContainer pvsObjects; 
    666666                if (0) LoadObjects(buf, pvsObjects, mObjects); 
     
    15981598        mSceneGraph->GetRoot()->mChildren.push_back(leaf); 
    15991599 
    1600   if (mRayCaster) 
    1601         mRayCaster->AddDynamicObjecs(leaf->mGeometry, leaf->GetTransformation()); 
    1602   // $$ JB in order to compile 
    1603   return leaf; 
     1600        if (mRayCaster) 
     1601                mRayCaster->AddDynamicObjecs(leaf->mGeometry, leaf->GetTransformation()); 
     1602        // $$ JB in order to compile 
     1603        //return leaf; 
    16041604} 
    16051605 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.cpp

    r2702 r2703  
    835835                swap(p->mDynamicObjects[idx], p->mDynamicObjects.back()); 
    836836                p->mDynamicObjects.pop_back(); 
    837                 /*if (mCurrentDynamicObjectIdx >= 0) { 
    838                 preprocessor->ScheduleUpdateDynamicObjects(); 
    839                 }*/ 
     837                //preprocessor->ScheduleUpdateDynamicObjects(); 
    840838        } 
    841839} 
     
    11131111        mUseSpatialFilter = tmp; 
    11141112 
    1115         //mLogWriter = new LogWriter("myfile.out"); 
    1116  
    11171113        mShowRenderCost = false; 
    11181114        mShowPvsSizes = false; 
     
    11271123        mShowWeightedTriangles = false; 
    11281124        mShowDistribution = 15; 
    1129         mCurrentDynamicObjectIdx = -1; 
    11301125 
    11311126        mSpatialFilterSize = 0.01; 
     
    11561151        connect(mControlWidget, SIGNAL(ComputeGVS(void)), this, SLOT(ComputeGVS(void))); 
    11571152        connect(mControlWidget, SIGNAL(ReplayViewPoints(void)), this, SLOT(ReplayViewPoints(void))); 
    1158         connect(mControlWidget, SIGNAL(LoadObject(void)), this, SLOT(LoadObject(void))); 
     1153        connect(mControlWidget, SIGNAL(NextObject(void)), this, SLOT(NextObject(void))); 
    11591154 
    11601155        connect(mControlWidget, SIGNAL(SetSceneCut(int)), this, SLOT(SetSceneCut(int))); 
     
    12151210         
    12161211        mControlWidget->show(); 
     1212 
     1213        LoadObjects(); 
    12171214} 
    12181215 
     
    12661263 
    12671264 
    1268 void QtGlRendererWidget::LoadObject() 
    1269 { 
    1270         string filename("../data/teapot.bn"); 
    1271         //string filename("../data/cube.obj"); 
    1272          
    1273         cout << "Loading model << " << filename << endl; 
    1274  
    1275         ++ mCurrentDynamicObjectIdx; 
     1265void QtGlRendererWidget::LoadObjects() 
     1266{ 
     1267        LoadObject("../data/teapot.bn"); 
     1268        LoadObject("../data/bunny.bn"); 
     1269        LoadObject("../data/horse.bn"); 
     1270} 
     1271 
     1272 
     1273void QtGlRendererWidget::NextObject() 
     1274{ 
     1275        cout << "*********\n**** next object!!!!!!!!!!!! " << endl; 
     1276        mPlacer->NextObject();   
     1277} 
     1278 
     1279 
     1280void QtGlRendererWidget::LoadObject(const string &filename) 
     1281{ 
     1282        cout << "Loading model " << filename << endl; 
    12761283 
    12771284        SceneGraphLeaf *leaf =  
     
    12861293                cerr << "Loading failed" << endl; 
    12871294         
    1288     updateGL(); 
     1295    //updateGL(); 
    12891296} 
    12901297 
     
    23782385        button = new QPushButton("Load object", vbox); 
    23792386        vbox->layout()->addWidget(button); 
    2380         connect(button, SIGNAL(clicked()), SIGNAL(LoadObject())); 
     2387        connect(button, SIGNAL(clicked()), SIGNAL(NextObject())); 
     2388        //connect(button, SIGNAL(clicked()), SIGNAL(LoadObject())); 
    23812389 
    23822390        /*cb = new QCheckBox("Stats", vbox); 
  • GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtGlRenderer.h

    r2702 r2703  
    119119  void StoreStatistics(); 
    120120  void ComputeGVS(); 
    121   void LoadObject(); 
     121  //void LoadObjects(); 
     122  void NextObject(); 
    122123  void UpdateAllPvs(); 
    123124  void SetViewCellGranularity(int); 
     
    217218        int mShowDistribution; 
    218219 
    219         int mCurrentDynamicObjectIdx; 
    220  
    221220        bool mReplayMode; 
    222221 
     
    327326        int FindDynamicObject(float x, float y); 
    328327 
     328        void LoadObjects(); 
     329        void LoadObject(const std::string &filename); 
    329330 
    330331public slots: 
     
    340341        void StoreStatistics(); 
    341342         
    342         void LoadObject(); 
     343        //void LoadObject(); 
     344        void NextObject(); 
    343345 
    344346        void SetRenderErrors(bool b) { 
Note: See TracChangeset for help on using the changeset viewer.