Announcement

Collapse
No announcement yet.

strange behaviour with dragging shapes

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • strange behaviour with dragging shapes

    using the example DraggingShapes I found that if you drag a shape around the world and back to its original position the shape is now rotated.
    This is very noticeable with the long polyline at (-10, 170). Drag it around the globe once or twice and see the rotation. This is also the case for all the other shapes. I cannot see in the code why this is happening. Any ideas?

  • #2
    I haven't checked the code, but this sounds like the cumulative effects of small errors when recomputing a shape vertices positions on the globe after is has been moved.

    I think it is using a great circle method to keep each vertice at a fixed distance and heading from a reference point. When you move that point you have to recompute the positions, but it is not very accurate, and it may also have to do with the ellipsoidal nature of the globe.

    Edit: now looking at render.SurfaceShape.moveTo(), i can see that there is a special case when the shape comes to cross the date line. That alone may introduce a significant shift.
    Last edited by patmurris; 08-22-2008, 03:46 PM.
    My World Wind Java Blog & WW.net Plugins page

    Comment

    Working...
    X