Changeset 228 for osgVisual/trunk/src
- Timestamp:
- Feb 10, 2011, 2:18:04 PM (14 years ago)
- Location:
- osgVisual/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/core/visual_core.cpp
r227 r228 23 23 { 24 24 OSG_NOTIFY( osg::ALWAYS ) << "visual_core instantiated." << std::endl; 25 26 currentTrackingID = -1; 25 27 } 26 28 … … 203 205 keyswitchManipulator->addMatrixManipulator( '3', "Terrain", new osgGA::TerrainManipulator() ); 204 206 nt = new osgGA::NodeTrackerManipulator(); 207 nt->setTrackNode(NULL); 205 208 keyswitchManipulator->addMatrixManipulator( '4', "NodeTrackerManipulator", nt ); 206 209 … … 294 297 std::string attr_name=reinterpret_cast<const char*>(attr->name); 295 298 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 296 if( attr_name == "id" ) 297 trackNode( util::strToInt(attr_value) ); 299 if( attr_name == "id" ) trackNode( util::strToInt(attr_value) ); 300 301 298 302 attr = attr->next; 299 303 } … … 553 557 osg::ref_ptr<osg::Node> tmp = visual_object::findNodeByTrackingID(trackingID, rootNode); 554 558 if(tmp.valid()) 559 { 560 currentTrackingID = trackingID; 555 561 trackNode(tmp); 556 } 562 } 563 } -
osgVisual/trunk/src/manip_Spacemouse/manip_nodeTrackerSpaceMouse.cpp
r221 r228 39 39 RY=0; 40 40 RZ=0; 41 42 41 } 43 42 … … 319 318 void NodeTrackerSpaceMouse::computeNodeCenterAndRotation(osg::Vec3d& nodeCenter, osg::Quat& nodeRotation) const 320 319 { 320 if (_trackNodePath.empty()) 321 return; 322 321 323 osg::Matrixd localToWorld, worldToLocal; 322 324 osg::NodePath nodePath; 323 if (_trackNodePath.getNodePath(nodePath)) 325 326 if ( _trackNodePath.getNodePath(nodePath)) 324 327 { 325 328 worldToLocal = osg::computeWorldToLocal(nodePath);
Note: See TracChangeset
for help on using the changeset viewer.