Hi,

osgpick is able to pick a camera within a camera.  It might be your
use of an explict nodepath that is causing problems.

I can't say whether the your nested Camera is best managed via a
Camera in the scene graph, or a Camera as a Slave in a Viewer, or as
separate View in CompositeViewer, I'd need more info.  In general
Camera in the scene graph is best kept for things like render to
texture effects.

Robert.

On 6/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
hi,all
  I use "camera in camera" in osg2.0 under windowsxp.
          |cameraB
   root-- |
          |cameraC
   The cameraC uses relate cf.  The main camera(viewer.getCamera())'s near_far_mode uses  
"COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES".
   The cameraC's near_far_mode and viewport are not assigned explicitly.
   Th  cameraC's viewMatrix and projectMatrix is set to E.

   The Pseudo code:
           osgViewer::Viewer viewer;
           viewer.setSceneData(root);
            ...
           osg::NodePath np = cameraC->getParentalNodePaths()[0];
           bool result = viewer.computeIntersections(x,y,np, ...);

    I found the result = false sometime. I debuged it found that because 
"COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES",
    the projection matrix was auto changed when the eyepoint was changed.

          How can I do right computeIntersections with "camera in camera "?  Or 
I missing somthing?
          Or I should use slave camera , not "camera in camera"?










_______________________________________________
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/

Reply via email to