[osg-users] Ortho Clipping

Rogers, Shane Shane_Rogers at mentor.com
Fri Sep 28 09:14:27 PDT 2007


We are having some Ortho Clipping problems and I was wondering if anyone
had some insight on this. We are using and older version of OSG. Version
0.9.9, we are using a camera and two types of lenses. Ortho and
Perspective. You can switch between the lenses and use either or.  The
problem we are having is, in Perspective you can zoom in on an object
and look at it very closely and inspect it and it does not disappear.
In the Ortho view when you try to zoom in real close it disappears
before you zoom in close enough to inspect it.  I have noticed a couple
of cases where I can zoom into something in Ortho and have it not
disappear, but in general it will disappear before I get really close to

This is how we are getting our lens's and switching between them.

float dist = m_KMCallback->getTrackBall()->getDistance();
switch( pt ) {
case Perspective: m_camera->getLens()->convertToPerspective( dist );
m_projection = pt; break;
case Orthographic: m_camera->getLens()->convertToOrtho( dist );
m_projection = pt; break;
I have tried to set the Ortho lens clip near and far by using 
Where the last two values being passed to set Ortho are the near and far
clip.  I have also tried setting the Frustum and that did not work
either.  I try to get the Frustum or get the Ortho so I can see what the
values are set to, but GetFrustum and GetOrtho are protected.  Any ideas
on how I can make the Ortho clipping better?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070928/fc10572f/attachment-0002.htm>

More information about the osg-users mailing list