[osg-users] HeightField intersection
calin.hanchevici at gmail.com
Thu Nov 12 08:02:54 PST 2009
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
Read this topic online here:
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2134 bytes
Desc: not available
More information about the osg-users