Hi Nelson,
On 7/3/07, Cysneros, Nelson SPAWAR <[EMAIL PROTECTED]> wrote:
by replacing this line:
// set the view
sceneView->setViewMatrix(kbmcb->getViewMatrix());
With my own calculated matrix based on the kbmcb values.
You can still do this with osgViewer::Viewer :
osgViewer::Viewer viewer;
viewer.setSceneData(osgDB::readNodeFile("cow.osg"));
viewer.realize();
while(!viewer.done())
{
viewer.getCamera()->setViewMatrix(myViewMatrix);
viewer.frame();
}
Note, no Camera Manipulator is registered, so nobody is setting the
view matrix other than your setViewMatrix call.
I'm also confused about the billboard examples ( and other examples simular
to it). Looks like they never added anytype of Manipulator to the camera.
and I'm wondering how the camera manipulation is being done? Is their a
default manipulator that comes with the osgViewer::Viewer?
viewer.run() used my main of the examples is great short hand for
writing a quick example, but it does hide a bit of what's going under
the hood, run is effectively (psudo code here)
viewer.run() is equivilant to :
viewer.realize();
if (viewer doesn't have a camera manipulator)
{
viewer.addCameraManipulator(new TrackballBall)
}
while(!viewer.done())
{
viewer.frame();
}
Robert.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/