WorldWindAndroid icon indicating copy to clipboard operation
WorldWindAndroid copied to clipboard

Fix/placemark rotation and tilt

Open EMaksymenko opened this issue 3 years ago • 0 comments

Description of the Change

  1. Change order of unitSquareTransform matrix operations to fix image stretching on rotation and apply correct pivot point. Original code stretched texture instead of rotation and made rotation around texture center instead of specified offset point.
  2. Normalize unitSquareTransform matrix Z-range to prevent texture clipping on tilting. Original code had incorrect tilting approach.
  3. Change Placemark default depth offset from -0.1 to -0.015 to prevent texture from protruding through the terrain.
  4. Fix placemarks altitude mode in PlacemarksMilStd2525Activity to be correctly rendered on the top of the surface. Original code had absolute 0 altitude which was under the surface.
  5. Use billboarding approach of MilStd2525 placemarks rendering to prevent clipping them by terrain (as described in MIL-STD-2525C APPENDIX F.5.1.1.2).
  6. Add missed Placemark label functionality the same way as in JS codebase.

Why Should This Be In Core?

Original code had incorrect placemark orientation processing logic and should be fixed.

Benefits

Now Placemarks are correctly rotated, tilted and located related to the terrain. Partially implemented Placemark label code is now complete and can be used.

Potential Drawbacks

None

Applicable Issues

https://github.com/WorldWindEarth/WorldWindAndroid/issues/31

EMaksymenko avatar Mar 27 '22 13:03 EMaksymenko