Changeset 2715 for GTP/trunk/Lib/Vis/Preprocessing/src/SceneGraph.cpp
- Timestamp:
- 05/27/08 10:57:05 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/SceneGraph.cpp
r2710 r2715 39 39 SceneGraphLeaf::~SceneGraphLeaf() 40 40 { 41 CLEAR_CONTAINER(mGeometry); 41 if (mDeleteGeometry) 42 CLEAR_CONTAINER(mGeometry); 42 43 } 43 44 … … 278 279 279 280 280 SceneGraphLeaf::SceneGraphLeaf(): mIsDynamic(false), mHasChanged(true) 281 SceneGraphLeaf::SceneGraphLeaf(): 282 mIsDynamic(false), mHasChanged(true), mDeleteGeometry(true) 281 283 { 282 284 mTrafo = IdentityMatrix(); … … 285 287 286 288 287 SceneGraphLeaf::SceneGraphLeaf(bool isDynamic): mIsDynamic(isDynamic), mHasChanged(true) 289 SceneGraphLeaf::SceneGraphLeaf(bool isDynamic): 290 mIsDynamic(isDynamic), mHasChanged(true), mDeleteGeometry(true) 288 291 { 289 292 mTrafo = IdentityMatrix(); … … 327 330 { 328 331 // hack: should just pass a IntersectableGroup as a whole 329 // instead we duplicate the object container and create a new 330 // leaf 332 // instead we duplicate the geometry vector 331 333 mGeometry = copy.mGeometry; 332 //for (size_t i = 0; i < copy.mGeometry->size(); ++ i)333 // mGeometry.push_back(copy.mGeometry[i]);334 334 335 335 mBox = copy.mBox; … … 339 339 mIntersectable = new SceneGraphLeafIntersectable(this, mBox); 340 340 mHasChanged = true; 341 } 342 343 } 341 342 // hack: the geometry should not be deleted here because this 343 // is just a copy 344 mDeleteGeometry = false; 345 } 346 347 }
Note: See TracChangeset
for help on using the changeset viewer.