Hi Rémy,
If you are using osgProducer/Producer then use the Producer methods
for setting the Camera's projection matrix (the lends in Producer
speak).
The OSG in SVN has a new viewer library (osgViewer) that replaces
osgProducer, it uses osg::Camera directly, osg::Camera is just
CameraNode renamed. Since it uses osg::Camera directly there isn't
any clashes in naming or setting of values like there was with the
internal implementation of osgProducer::OsgSceneHandler.
Robert.
On 3/8/07, Rémy Deslignes <[EMAIL PROTECTED]> wrote:
Hi all,
Probably a stupi quetsion, but I a m trying to set up the projection
matrix of the display using the following code :
// realize the viewer
pViewer->realize();
osgProducer::Viewer::SceneHandlerList &shl = pViewer->getSceneHandlerList();
for (osgProducer::Viewer::SceneHandlerList::iterator i=shl.begin();
i!=shl.end(); ++i)
{
osgUtil::SceneView* sv =(*i)->getSceneView() ;
osg::CameraNode* camNode = new osg::CameraNode ;
// stupid projection matrix
camNode->setProjectionMatrixAsOrtho(-10,10,-10,10,-10,10);
sv->setCamera(camNode);
}
//Run the viewer ( sync update frame )
pViewer->run();
And it seems that whatever the projection is, there is no difference to
the display ( always a standard camera , with none of my exotic
projections ) ...
Any hints or help ? Am I doing something wrong ?
Thanks for ANY help
--
Remy Deslignes
Ingenieur Developement / Software Engineer
Tel: +33 (0)1.53.90.11.19
===========================================
Silicon Worlds S.A.
224, rue Saint Denis
75002 Paris France
Tel: +33 (0)1.53.90.11.11
Fax: +33 (0)1.53.90.11.12
http://www.silicon-worlds.fr
===========================================
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/