createPlacerMatrix ignores ground altitude

classic Classic list List threaded Threaded
6 messages Options
AStef AStef
Reply | Threaded
Open this post in threaded view
|

createPlacerMatrix ignores ground altitude

Hi,

I may be wrong, but createPlacerMatrix doc says the height parameter is measured above the terrain, so I assumed it doesn't mean absolute altitude, but altitude relative to ground...
And all my tests (with geodetic map) shows it plainly ignores the terrain altitude.
What am I missing? Either the doc or the code needs a fix.

BTW, the actual behavior is what I was after anyway :)

Thanks.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: createPlacerMatrix ignores ground altitude

Stef,

The ObjectPlacer constructor argument "clamp" determines whether the terrain height is considered during placement. It defaults to false.

HTH, Glenn
Glenn Waldron / Pelican Mapping
AStef AStef
Reply | Threaded
Open this post in threaded view
|

Re: createPlacerMatrix ignores ground altitude

Oh right! I guess I missed the topmost doc..

Anyway, just to play with the clamp value, I set it to true and all I get was
*** glibc detected *** ./main: double free or corruption (out): 0x411750b0 ***
(Actual error varies.)
This error only happens in createPlacerMatrix, and only when calling it once per frame inside a node Update callback. Changing clamp back to false removes this error.

Now, I'm pretty new on OSG+OsgEarth, but what am I doing wrong?

Thx
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: createPlacerMatrix ignores ground altitude

Stef,

Never seen that one... try:

http://ubuntuforums.org/showthread.php?t=175050
Glenn Waldron / Pelican Mapping
AStef AStef
Reply | Threaded
Open this post in threaded view
|

Re: createPlacerMatrix ignores ground altitude

Nice try... but it does not help :(
My app still crashes, albeit without any error messages this time...
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: createPlacerMatrix ignores ground altitude

Stef,
No idea then. I don't use Linux that often. All I can recommend is using the debugger to try and track it down.

Glenn
Glenn Waldron / Pelican Mapping