[osg-users] HeightField intersection

Teodor Hanchevici calin.hanchevici at gmail.com
Thu Nov 12 08:02:54 PST 2009


Hi,

I am trying to modify the values of a height field based on specific events. The height field is loaded from a TIFF file and rendered. Each pixel in the file represents 30 units (as set using setXInterval() and setYInterval()). I would like to be able to select the value based on the mouse movement but it does not seem to work the way I think it should.

In the event handler I get the view and compute the intersections using computeIntersections(). I get the coordinates from getLocalIntersectionNormal() and I try to convert them to row and columns. Is there another way to get these values from mouse position?

I have attached the code I'm using, the code I'm describing is in eventhandler.cpp

Thank you!

Cheers,
Teodor

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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: sources.zip
Type: application/zip
Size: 2134 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20091112/27109b4f/attachment-0001.zip>


More information about the osg-users mailing list