Hello,

I'm a little bit confused about the frustum of the camera node. I set the
position of the camera with the viewmatrix:

osg::MatrixTransform* mt = new MatrixTransform;
mt->setMatrix(::osg::Matrix::translate(0, 0, 25));
((::osg::Camera*)_root.get())->setViewMatrix(mt->getInverseMatrix());

After this, I create a projectionmatrix with the static function frustum
from the class osg::Matrix:

projectionMatrix = ::osg::Matrix::frustum(-2.0,2.0,-1.5,1.5,0.01,4.0);

But I don't see anything. When I swap the values of zNear and zFar, I can
see my scene. I don't know why? I think it is illogical that the distance of
the near plane is bigger as the distance of the far plane?!
What is my mistake?

Cheers,

Martin

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

Reply via email to