I need to build a data structure of some kind, that stores a bunch of FVectors that represent world-space locations on a Landscape. I need to basically build an approximation of the Landscapes terrain in Vertex form, with say a 10-meter spread between vertices, and then ultimately render that as a wireframe.
I haven’t got as far as the rendering yet, since I still need an efficient way to get the points themselves. I want to be able to do a fast range-based lookup on the points, so that I can return all vertices within a specified range of a world location. Speed is fairly key to this, the data can be a singleton as can the manager that creates it. The problem is, I have no idea what the best way is to actually generate the vertex buffer in the first place, since I want an equal density of points, I can’t simply access the Landscapes’ vertex data.
So, is there a fast and easy way for me to be able to get the interpolated Z-location on a Landscape, at World location X-Y? If I can do that, I can feed the algorithm an X-Y location in world space and have it return the final Z-component, which is what I need to be able to render a 3D wireframe with equal spacing.
Any suggestions on how to do this? I’d like to be able to get the Landscape, access the Heightfield, translate that to World-Space then get an altitude from it based on X-Y. Any ideas how to do that?