Hi Nick,

I tried following your lead but I think I'm doing something wrong as I can see 
only a blank screen.

Here's my code for that part: (i've also attached my .cpp file in case you 
prefer going through it in its original form)

//Setting up the Viewer and attaching keyboard handler to the Viewer:
viewer.setSceneData(root);

// Add the handler to the viewer
osg::ref_ptr<KeyboardHandler> keh = new KeyboardHandler;
keh->setPAT(backhoe1PAT, backhoe2PAT);
keh->setTextBox(t1);
viewer.addEventHandler( keh.get() );    
//viewer.setCameraManipulator(new osgGA::TrackballManipulator());
osg::Camera* camera = new osg::Camera();
viewer.setCamera(camera);
osg::Vec3d eye = osg::Vec3d(0.0,0.0,0.0);
osg::Vec3d up = osg::Vec3d(0.0,0.0,1.0);
//camera->setViewMatrixAsLookAt(backhoe1PAT->getPosition(), eye, up);
viewer.setUpViewInWindow(20, 20, 1024, 768);
viewer.realize();

while( !viewer.done() )
{
   // fire off the cull and draw traversals of the scene.
   viewer.frame();
}

I'm hoping I can figure this out and move on to the next level.

Thanks for looking

Sanat

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=28053#28053




Attachments: 
http://forum.openscenegraph.org//files/main_wmultiplebackhoes_wkeyboardhandler_104.cpp


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to