View pushReferenceCenter

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search

Asantiago (Talk | contribs)
(New page: From this thread [http://forum.worldwindcentral.com/showthread.php?t=10277]. == What does dc.getView().pushReferenceCenter(...) do? == The precision issue has to do with floating point v...)
Next diff →

Revision as of 06:57, 1 October 2008

From this thread [1].

[edit] What does dc.getView().pushReferenceCenter(...) do?

The precision issue has to do with floating point values and their decreasing precision when dealing with larger numbers. Everything in WW is at its real scale, in meters. So if you are at the globe surface, all your vertices will have coordinates in the order of the world radius in meter, which already streches the floating point precision quite a bit. So if you want more accuracy, you want to use values in a range closer to zero. So you simply substract a 'reference center' from all your coordinates, and translate the world accordingly before drawing.

Personal tools