Changeset 2710 for GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
- Timestamp:
- 05/26/08 04:01:24 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2709 r2710 36 36 37 37 38 static int sCurrentDynamicId = 0; 39 40 38 41 inline static bool ilt(Intersectable *obj1, Intersectable *obj2) 39 42 { … … 329 332 330 333 331 Intersectable *Preprocessor::GetParentObject( constint index) const334 Intersectable *Preprocessor::GetParentObject(int index) const 332 335 { 333 336 if (index < 0) … … 351 354 else 352 355 { 353 if (index >= (int)mObjects.size()) 354 { 355 cerr<<"Warning: triangle index out of range! " << index << " of " << (int)mObjects.size() << endl; 356 return NULL; 357 } 358 else 359 { 360 return mObjects[index]; 361 } 356 return mObjects[index]; 362 357 } 363 358 } … … 733 728 } 734 729 } 730 735 731 736 732 //////// … … 1594 1590 mDynamicObjects.push_back(leaf); 1595 1591 1592 const int currentId = (int)mObjects.size() + sCurrentDynamicId; 1593 1594 leaf->GetIntersectable()->SetId(currentId); 1595 1596 for (size_t i = 0; i < leaf->mGeometry.size(); ++ i) 1597 { 1598 leaf->mGeometry[i]->SetId(currentId); 1599 } 1600 1601 cout << "\**************\n******* new object has id " << currentId << endl; 1602 1603 ++ sCurrentDynamicId; 1604 1596 1605 // tell ray caster to update 1597 1606 ScheduleUpdateDynamicObjects();
Note: See TracChangeset
for help on using the changeset viewer.