Changeset 2702 for GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
- Timestamp:
- 05/23/08 17:47:22 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Preprocessor.cpp
r2701 r2702 1591 1591 1592 1592 1593 SceneGraphLeaf *Preprocessor::RegisterDynamicGeometryWithRayCaster(SceneGraphLeaf *leaf) 1594 { 1593 void Preprocessor::RegisterDynamicObject(SceneGraphLeaf *leaf) 1594 { 1595 mDynamicObjects.push_back(leaf); 1596 1597 // add to scene graph 1598 mSceneGraph->GetRoot()->mChildren.push_back(leaf); 1599 1595 1600 if (mRayCaster) 1596 1601 mRayCaster->AddDynamicObjecs(leaf->mGeometry, leaf->GetTransformation()); … … 1602 1607 SceneGraphLeaf *Preprocessor::LoadDynamicGeometry(const string &filename) 1603 1608 { 1604 #if DYNAMIC_OBJECTS_HACK1605 1606 1609 const bool dynamic = true; 1607 1610 SceneGraphLeaf *leaf = new SceneGraphLeaf(dynamic); … … 1623 1626 if (parsed) 1624 1627 { 1625 const float scale = 0.01f;1626 1627 1628 ObjectContainer::const_iterator it, it_end = leaf->mGeometry.end(); 1628 1629 … … 1633 1634 Triangle3 t = tri->GetItem(); 1634 1635 1635 // scale object appropriately 1636 // hack: scale object appropriately 1637 float scale = 0.01f; 1638 1636 1639 t.mVertices[0] *= scale; 1637 1640 t.mVertices[1] *= scale; … … 1641 1644 } 1642 1645 1643 //leaf->ApplyTransform(ScaleMatrix(s, s, s));1644 //leaf->ApplyTransform(TranslationMatrix(Vector3(0, 10, 0)));1645 1646 1646 leaf->UpdateBox(); 1647 mSceneGraph->GetRoot()->mChildren.push_back(leaf);1648 //mDynamicObjects.push_back(leaf);1649 1650 1647 cout<<"Dynamic object loaded successfully: " << leaf->GetBox() << endl; 1651 1648 … … 1654 1651 1655 1652 1656 #endif1657 1653 cout<<"Dynamic object loading failed."<<endl; 1658 1654 return NULL;
Note: See TracChangeset
for help on using the changeset viewer.