Changeset 381 for experimental/distortionNG/DistortionManipulator.cpp
- Timestamp:
- Jun 15, 2012, 7:22:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionManipulator.cpp
r380 r381 23 23 #include <osg/Point> 24 24 #include <osg/PolygonMode> 25 #include <osg/TextureRectangle> 25 26 26 27 #include <osgDB/Registry> … … 261 262 if( _distortionSet->isDirty() && _viewer.valid()) 262 263 { 263 _viewer->updateDistortion();264 updateDistortionSetup(); 264 265 } 265 266 //OSG_ALWAYS<<"..done"<<std::endl; … … 512 513 _highlighter->dirtyBound(); 513 514 } 515 516 void DistortionManipulator::updateDistortionSetup() 517 { 518 updateDistortionViewProjectionMatrix(); 519 updateDistortionMesh(); 520 } 521 522 void DistortionManipulator::updateDistortionViewProjectionMatrix() 523 { 524 if(!_distortionSet.valid()) 525 { 526 osg::notify(osg::WARN) << "You cannot update the distortion without distortion set up." << std::endl; 527 return; 528 } 529 530 if(_viewer.valid()) 531 { 532 _viewer->getCamera()->setViewMatrix(_distortionSet->getViewOffset()); 533 _viewer->getCamera()->setProjectionMatrix(_distortionSet->getProjectionOffset()); 534 } 535 else 536 OSG_NOTIFY(osg::ALWAYS)<<"Invalid viewer!"<<std::endl; 537 } 538 539 void DistortionManipulator::updateDistortionMesh() 540 { 541 542 }
Note: See TracChangeset
for help on using the changeset viewer.