On 5/21/06, tim hartter <[EMAIL PROTECTED]> wrote:
Ehh you know you pasted the same link in twice...
Hi I'm trying to pick an Object in my Scene which is rendered into a MFC
Picture Control.
I'm using osg1.0_setup_2005-12-09.exe
< http://www.openscenegraph.org:/downloads/binaries/osg1.0_setup_2005-12-09.exe>.
My codel looks like this:
<http://www.openscenegraph.org:/downloads/binaries/osg1.0_setup_2005-12-09.exe >OnInit
I do the following:
Ehh you know you pasted the same link in twice...
...
m_pViewer->setSceneData( m_rpSceneRoot.get() );
m_pViewer->getCamera(0)->getRenderSurface()->setWindow( m_ctrPicture );
m_pViewer->realize();
...
OnLButtonDown I'd like to pick an object in the scene with:
osgUtil::IntersectVisitor::HitList HList;
// pick i.e. at the screen scenter
if (m_pViewer->computeIntersections( 0.0, 0.0, 0,m_rpSceneRoot.get(),
HList ))
{
... do something ...
}
But the HList stayes empty and there shure is an Object in the middle of
the scene.
Did I forget anything ? Do I have to use a pick visitor ?
- greatful for any suggestions -
Do you have these same problems with non MFC integrated code?
Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
