Hi Alberto,

I don't think so. Because I create this simple example:

int main()
{
        // scene
        osg::ref_ptr<osg::Camera> root = new osg::Camera;

        // frustum
      // root->setProjectionMatrixAsFrustum(-2,2,-1.5,1.5,0.01,4); // it
doesn't work
        root->setProjectionMatrixAsFrustum(-2,2,-1.5,1.5,4,0.01); // it
works

        // load object
        Root->addChild(osgDB::readNodeFile("misc.osg"));

        // viewer
        osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer;
        viewer->setSceneData(root.get());
        viewer->realize();
        viewer->run();
        
        return (0);
}

Without the frustum definition, it works fine. With the definition, it works
only when the value of zNear    greater is than the value of zFar. Or is it
normal?

Cheers, Martin

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Alberto
Luaces
Gesendet: Montag, 24. November 2008 12:24
An: OpenSceneGraph Users
Betreff: Re: [osg-users] camera settings frustum

Hi Martin,

El Lunes 24 Noviembre 2008ES 11:52:01 Martin Großer escribió:
> mt->setMatrix(::osg::Matrix::translate(0, 0, 25));

I think you have placed the scene behind the camera. Try (0, 0, -25)
instead.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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

Reply via email to