[osg-users] Setting my ZNear and ZFar clipping planes?

2009-08-26 Thread Andy Lundell
Hi,

I'm trying to set up my system so that I can manually specify the clipping 
planes.
In past projects I would use the SceneView object and the SetComputeNearFarMode 
method.  This project I'm not using a SceneView (Just a viewer) and I have no 
idea how to get at this functionality.

(I'm also looking for a way to override the code that creates the 
left-eye,right-eye matrices.) 

Thank you!


Andy

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16746#16746





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Setting my ZNear and ZFar clipping planes?

2009-08-26 Thread Jason Daly

Andy Lundell wrote:

Hi,

I'm trying to set up my system so that I can manually specify the clipping 
planes.
In past projects I would use the SceneView object and the SetComputeNearFarMode method.  
This project I'm not using a SceneView (Just a viewer) and I have no idea how 
to get at this functionality.
  


All the functionality is still there, you just have to follow the 
composition and inheritance hierarchy.


Viewer is-a ViewerBase and an osgViewer::View
osgViewer::View is-a osg::View
osg::View has-a Camera
Camera is-a CullSettings

The setComputeNearFar() method is now a part of CullSettings, so:

viewer-getCamera()-setComputeNearFar(...)


It's a long (and fairly winding) road to travel, but it makes sense once 
you get there  :-)



(I'm also looking for a way to override the code that creates the left-eye,right-eye matrices.) 
  


A ComputeStereoMatricesCallback  in osgUtil::SceneView is probably what 
you're looking for.  You can get to the SceneView object through 
osgViewer::Renderer (just a different inheritance road to travel).


--J

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Setting my ZNear and ZFar clipping planes?

2009-08-26 Thread Andy Lundell

Jason Daly wrote:
 Andy Lundell wrote:
 Viewer is-a ViewerBase and an osgViewer::View
 osgViewer::View is-a osg::View
 osg::View has-a Camera
 Camera is-a CullSettings
 [...]
 It's a long (and fairly winding) road to travel, but it makes sense once 
 you get there  :-)
 Thank you. I've got it now.  



 A ComputeStereoMatricesCallback  in osgUtil::SceneView is probably what 
 you're looking for.  You can get to the SceneView object through 
 osgViewer::Renderer (just a different inheritance road to travel).

I thought that osg::Util::SceneView was being deprecated?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16762#16762





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Setting my ZNear and ZFar clipping planes?

2009-08-26 Thread Jason Daly

Andy Lundell wrote:
 Thank you. I've got it now.  
  


Glad I could help.


A ComputeStereoMatricesCallback  in osgUtil::SceneView is probably what 
you're looking for.  You can get to the SceneView object through 
osgViewer::Renderer (just a different inheritance road to travel).



I thought that osg::Util::SceneView was being deprecated?
  


Robert has indicated that he intends to replace it at some point.  This 
is the only way I could find to handle it right now (though I could 
certainly be missing something).  If you're worried about it going away, 
you could just create the split view manually using slave cameras.


Are you sure you can't get the results you want by using the controls in 
osg::DisplaySettings and/or osgViewer::View?


--J

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org