View pushReferenceCenter

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 06:57, 1 October 2008 (edit)
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...)
← Previous diff
Current revision (06:59, 1 October 2008) (edit) (undo)
Asantiago (Talk | contribs)

 
Line 1: Line 1:
 +[[Category:WWJ Dev Documentation]]
 +
From this thread [http://forum.worldwindcentral.com/showthread.php?t=10277]. From this thread [http://forum.worldwindcentral.com/showthread.php?t=10277].

Current revision


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