- Timestamp:
- 04/14/03 20:49:41 (10 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgstereoimage/osgstereoimage.cpp
r1844 r1876 174 174 case(osgGA::GUIEventAdapter::MOVE): 175 175 { 176 static float px = ea.getX ();177 static float py = ea.getY ();178 179 float dx = ea.getX ()-px;180 float dy = ea.getY ()-py;181 182 px = ea.getX ();183 py = ea.getY ();184 185 rotateImage( (float)dx/(float)(ea.getXmax()-ea.getXmin()),(float)dy/(float)(ea.getYmax()-ea.getYmin()));176 static float px = ea.getXnormalized(); 177 static float py = ea.getYnormalized(); 178 179 float dx = ea.getXnormalized()-px; 180 float dy = ea.getYnormalized()-py; 181 182 px = ea.getXnormalized(); 183 py = ea.getYnormalized(); 184 185 rotateImage(dx,dy); 186 186 187 187 return true; … … 268 268 { 269 269 const float scale = 0.5f; 270 _texmatLeft->setMatrix(_texmatLeft->getMatrix()*osg::Matrix::translate(-rx*scale, ry*scale,0.0f));271 _texmatRight->setMatrix(_texmatRight->getMatrix()*osg::Matrix::translate(-rx*scale, ry*scale,0.0f));270 _texmatLeft->setMatrix(_texmatLeft->getMatrix()*osg::Matrix::translate(-rx*scale,-ry*scale,0.0f)); 271 _texmatRight->setMatrix(_texmatRight->getMatrix()*osg::Matrix::translate(-rx*scale,-ry*scale,0.0f)); 272 272 } 273 273
