On 28/07/10 16:00, Vipin Panwar wrote:
Hi,
i m working with 3-D point data. After displaying the point data on osg screen,
i need to retrieve the 3-D co-ordinates of the point on mouse click. Till now,
i am able to retrieve
x, y co-ordinates of mouse click.
After getting x, y, i tried with PolyTopeIntersector... but this code is not
working...
void PickHandler :: pick( const osgGA::GUIEventAdapter& ea, osgViewer::Viewer*
viewer )
{
double w, h, x, y;
x = ea.getX();
y = ea.getY();
if (!viewer->getSceneData())
osg::notify(osg::NOTICE)< accept( iv );
^^ doesn't make sense.
Can you post more code on how you set up the intersector.
jp
if (picker->containsIntersections()){
const osg::NodePath& nodePath = picker->getFirstIntersection().nodePath;
unsigned int idx = nodePath.size();
std::cout<<"\nvalue of idx :"<<idx;}
else
std::cout<<"doesn't contain intersection ";
}
Can somebody please help me regarding this.
Thank you!
Cheers,
vipin
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30351#30351
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org