Changeset 405
- Timestamp:
- Jul 26, 2012, 8:37:02 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionManipulator.cpp
r403 r405 530 530 if(_viewer.valid()) 531 531 { 532 //Update LF: Manipulator and Main Camera set to Identity Matrices 533 _viewer->getCameraManipulator()->setByMatrix(osg::Matrix::identity()); 534 _viewer->getCamera()->setViewMatrix(osg::Matrix::identity()); // t.b.d: Set Main Cameras' viewMatrix to Aircraft position for use in OsgVisual 532 533 #if 1 534 /*******************************************/ 535 /*** ViewMatrix-Testcase "Garching" ***/ 536 /*******************************************/ 537 538 osg::Matrixd viewOffset, transViewOffset, rotViewOffset; 539 540 rotViewOffset.makeRotate( 541 osg::DegreesToRadians(-130.0), osg::Vec3(0,1,0), // heading 542 osg::DegreesToRadians(0.0), osg::Vec3(-1,0,0), // pitch 543 osg::DegreesToRadians(-80.0), osg::Vec3(0,0,1)); // roll 544 545 transViewOffset.makeTranslate(-4169457.75*0.99975, -860009.06*0.99975, -4737192.00*0.99975); 546 viewOffset = transViewOffset * rotViewOffset; 547 548 /**************************************/ 549 /*** End of Testcase "Garching" ***/ 550 /**************************************/ 551 #endif 552 553 if(_viewer->getCameraManipulator()==NULL) 554 { 555 _viewer->getCamera()->setViewMatrix(viewOffset); 556 } 557 else 558 { 559 _viewer->getCameraManipulator()->setByMatrix(osg::Matrixd::inverse(viewOffset)); 560 } 561 535 562 _viewer->getCamera()->setProjectionMatrix(osg::Matrix::identity()); 536 563
Note: See TracChangeset
for help on using the changeset viewer.