Changeset 73 for osgVisual/src/cluster


Ignore:
Timestamp:
Jul 24, 2010, 10:48:02 AM (14 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/src/cluster/dataIO_clusterENet.cpp

    r72 r73  
    125125                sendContainer->setFrameID(viewer->getFrameStamp()->getFrameNumber());
    126126                sendContainer->setViewMatrix(viewer->getCamera()->getViewMatrix());
    127                 sendContainer->setProjectionMatrix(viewer->getCamera()->getProjectionMatrix());
     127                osg::Vec3d eye, center, up;
     128                viewer->getCamera()->getViewMatrixAsLookAt(eye,center,up);
     129                sendContainer->setEye(eye);
     130                sendContainer->setCenter(center);
     131                sendContainer->setUp(up);
     132                //std::cout << "sending lookat: eye:"<<eye<<", center:"<<center<<", up:" << up << std::endl;
    128133
    129134                // Writing node to stream
     
    166171                //OSG_NOTIFY( osg::ALWAYS ) << "dataIO_clusterENet::readTO_OBJvaluesFromMaster() - Bytes received: " << bytes_received << std::endl;
    167172                OSG_NOTIFY( osg::ALWAYS ) << "Received: " << std::endl << receivedTransportContainer << std::endl;
     173               
    168174
    169175                // Unserialize data
     
    179185                                {
    180186                                        OSG_NOTIFY( osg::ALWAYS ) << "Received:: Settings Viewmatrix...FrameID is: " << sendContainer->getFrameID() << std::endl;
    181                                         // Restore Viewmatrix / Projectionmatrix 
     187                                        // Restore Viewmatrix
    182188                                        viewer->getCamera()->setViewMatrix(sendContainer->getViewMatrix());
    183                                         viewer->getCamera()->setProjectionMatrix(sendContainer->getProjectionMatrix());
     189                                        //viewer->getCamera()->setViewMatrixAsLookAt(sendContainer->getEye(),sendContainer->getCenter(),sendContainer->getUp());
     190                                        //std::cout << "receiving lookat: eye:"<<eye.x()<<", center:"<<center<<", up:" << up << std::endl;
    184191                                }
    185192                                else
Note: See TracChangeset for help on using the changeset viewer.