May I be of assistance? the trampoline and the relevant hook were surely out of my knowledge, but the rest I am pretty confident I can be helpful with. If you need/want, just let me know
Be my guest. The code is there at Bitbucket.
As of now, the FilterElevation function uses the static example for Canaveral, but already puts the relevant shape declaration into a fake vector (which should come out of the cascading unordered map). There is some commented code at the top of FilterElevation that shows how it goes through the map to find the shape definitions for the tile at hand.
My approach would be to get that map filled by the vPlanet class by means of iterating over the appropriate /Texture/<planet>/Flat folder to find *.flt files, then load them, parse them for definitions and create FlatShape objects on the heap. Perhaps first into a vector, then after the complete planet finished, copy them to array for stable pointers and create the map out of it.
The map creation should be so that the tentative tile coverage should be generated, i.e. which tile at which level is touched by the shape. I'd do so by means of calculating lat/lng of the corner points of the shape (this could be a simple worst case guess like e.g. using hypotenuse of the 2 shape dimensions for square coverage). Then follow all corner points up to sub-pixel level of the shape size. At each level, for all tiles between the corner points, generate the map path for the shape.
We should be able to get away with this sloppiness, because the brute-force shape drawing will take care of the finer details. Worst case is that we iterate over all tile pixels for nothing. Still it should sufficiently rule out no-matches pretty fast. This way, even big shape-lists all over a planet will not hamper tile-loading too much.
The shape object holds pre-processed values. E.g. the dimensions are converted to lat/lng via a decimal degrees guess, <phi> is converted to appropriate sin/cos values, falloff is in double fracture (not percent), type is 1 for ellipse, 4 for "rectangle".
---------- Post added at 18:49 ---------- Previous post was at 18:45 ----------
PS: A curiosity-> I made a test with Cape Canaveral. Of course it works amazingly. What was curious is that I tried to jump from the cliff with the DG, running at full speed on its gear towards the platform edge, but when I got there the vessel tried to follow the terrain under the cliff and did not jump but tried to go down like on a rollercoaster. :lol:
Observed that, too! Two idiots, one thought... off the cliff! Yuppeeeeeh :rofl:
I guess it has something to do with the algorithm that calculates collision plane according to elevation data. If it is something with bsplines, it could well overshoot by the sudden elevation jump between two data-points.
---------- Post added at 19:25 ---------- Previous post was at 18:49 ----------
Hmm. Perhaps it is not a good idea to do it in the vPlanet class. AFAIK, those objects are created for visuals only, and could be destroyed if they go out of visibility. I think it is best to stick to the client class itself, then.