Hi Dimitrios,

I wrote a function in FFTOceanSurface passing the x,y of a point. That function finds the corresponding ocean tile and retrives the closest vertice using the getVertex of OceanTile function.

That's good. We could add another function that would return a weighted average of the closest 4 points, which would be more accurate but also slower.

Finally we could also add a function that returns a 2D array of heights given an axis-aligned bounding box which is the (x1, y1, x2, y2) of where on the grid your object is. This would allow the collision detection to do what it wants with the points.

Those 3 functions would flesh out the API for one-way interaction (water -> object).

As I told Jan, I'm not working on this right now, but will in the near future. Let me know if you get something working, we can share the workload that way :-)

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to