Changeset 230 for osgVisual/trunk
- Timestamp:
- Feb 13, 2011, 3:19:38 PM (14 years ago)
- Location:
- osgVisual/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/bin/osgVisualConfig.xml
r229 r230 71 71 </geometry> 72 72 </model> 73 <trackmodel id=" 1" updater_slot=""></trackmodel>73 <trackmodel id="2" updater_slot=""></trackmodel> 74 74 </models> 75 75 <datetime day="0" month="0" year="0" hour="12" minute="30"></datetime> -
osgVisual/trunk/include/manip_Spacemouse/manip_nodeTrackerSpaceMouse.h
r229 r230 200 200 void addMouseEvent(const GUIEventAdapter& ea); 201 201 202 /** Computes the world to local matrix */ 203 void computeNodeWorldToLocal(osg::Matrixd& worldToLocal) const; 204 205 /** Computes the local to world matrix */ 206 void computeNodeLocalToWorld(osg::Matrixd& localToWorld) const; 207 202 208 void computeNodeCenterAndRotation(osg::Vec3d& center, osg::Quat& rotation) const; 203 209 -
osgVisual/trunk/src/manip_Spacemouse/manip_nodeTrackerSpaceMouse.cpp
r229 r230 316 316 } 317 317 318 void NodeTrackerSpaceMouse::computeNodeWorldToLocal(osg::Matrixd& worldToLocal) const 319 { 320 osg::NodePath nodePath; 321 if (_trackNodePath.getNodePath(nodePath)) 322 { 323 worldToLocal = osg::computeWorldToLocal(nodePath); 324 } 325 } 326 327 void NodeTrackerSpaceMouse::computeNodeLocalToWorld(osg::Matrixd& localToWorld) const 328 { 329 osg::NodePath nodePath; 330 if (_trackNodePath.getNodePath(nodePath)) 331 { 332 localToWorld = osg::computeLocalToWorld(nodePath); 333 } 334 335 } 336 318 337 void NodeTrackerSpaceMouse::computeNodeCenterAndRotation(osg::Vec3d& nodeCenter, osg::Quat& nodeRotation) const 319 338 { … … 321 340 return; 322 341 323 osg::Matrixd localToWorld, worldToLocal; 342 osg::Matrixd localToWorld; 343 computeNodeLocalToWorld(localToWorld); 344 324 345 osg::NodePath nodePath; 325 326 346 if (_trackNodePath.getNodePath(nodePath) && !nodePath.empty()) 327 {328 worldToLocal = osg::computeWorldToLocal(nodePath);329 localToWorld = osg::computeLocalToWorld(nodePath);330 347 nodeCenter = osg::Vec3d(nodePath.back()->getBound().center())*localToWorld; 331 }332 348 else 333 349 nodeCenter = osg::Vec3d(0.0f,0.0f,0.0f)*localToWorld;
Note: See TracChangeset
for help on using the changeset viewer.