Ignore:
Timestamp:
Jun 30, 2012, 1:09:04 PM (12 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionManipulator.cpp

    r387 r391  
    289289        OSG_ALWAYS<<"Reseting IntensityMap Blending."<<std::endl;
    290290
    291         if (!image->isDataContiguous())
     291        //isDataContiguous is unknown to MSVS2010 and GCC
     292        /*if (!image->isDataContiguous())
    292293        {
    293294                OSG_WARN<<"Warning: DistortionManipulator does not support working with non contiguous imagery as blendmaps!"<<std::endl;
    294295                return;
    295         }
     296        }*/
    296297
    297298        // Fill intensity map with 255
     
    531532        if(_viewer.valid())
    532533        {
     534                // LF CameraMainupulators override ViewMatrix, so they have to go...
     535                // alternatively, _viewer->getCameraManipulator()->setByMatrix(_distortionSet->getViewOffset()) could be set
     536                // but this complicates exact camera positioning and rotating
     537
     538                _viewer->setCameraManipulator(0);
     539
    533540                _viewer->getCamera()->setViewMatrix(_distortionSet->getViewOffset());
    534541                _viewer->getCamera()->setProjectionMatrix(_distortionSet->getProjectionOffset());
     542
     543                // Print viewMatrixAsLookAt for Debug Purposes
     544                osg::Vec3 Eye,Focus,Vertical;
     545                _viewer->getCamera()->getViewMatrixAsLookAt(Eye,Focus,Vertical);
     546                OSG_ALWAYS<<"Camera Eyepoint: X:"<<Eye.x()<<" Y:"<<Eye.y()<<" Z:"<<Eye.z()<<std::endl;
     547                printf("Camera Eyepoint: %.2lf, %.2lf, %.2lf\n",Eye.x(),Eye.y(),Eye.z());
     548                printf("Camera Direction: %.2lf, %.2lf, %.2lf\n",Focus.x()-Eye.x(),Focus.y()-Eye.y(),Focus.z()-Eye.z());
     549                printf("Vertical after: %.2lf, %.2lf, %.2lf\n",Vertical.x()-Eye.x(),Vertical.y()-Eye.y(),Vertical.z()-Eye.z());
    535550        }
    536551        else
     
    554569                                                                                0.0     );
    555570                vertices->push_back( tmpVec );
    556                 OSG_ALWAYS<<"Transfering mesh vertex : X:"<<tmpVec.x()<<" Y:"<<tmpVec.y()<<" Z:"<<tmpVec.z()<<std::endl;
     571                //OSG_ALWAYS<<"Transfering mesh vertex : X:"<<tmpVec.x()<<" Y:"<<tmpVec.y()<<" Z:"<<tmpVec.z()<<std::endl;
    557572
    558573                // Note texCoords
Note: See TracChangeset for help on using the changeset viewer.