x3dom/x3dom — pull request #428 by andreasplesch (2014-10-05 04:51:16+00:00)
Title: Geospatial component: GeoViewpoint node implementation

This pull request adds the GeoViewpoint node to x3dom. All fields are supported, including the deprecated headlight and navType fields. These two fields are by default "undefined". If used, they take precedence over the currently bound NavigationInfo node fields. One additional field of type SFBool called elevationScaling is introduced. It controls the use of navigation speed scaling by avatar elevation above ground and is turned on (true) by default as the spec. suggests. Elevation scaled speed is not used for examine and examine like navigation modes. Even when elevation scaling of speed is turned on users still can modify their speeds by a user speed factor. The implementation of elevation scaling relies on getViewMatrix() being called from Viewarea.js during navigation.

Proper calculation of elevation above the ellipsoid required a function transforming geocentric to geodetic coordinates which was added to GeoCoordinate.js. In turn, this function is used now by the GeoLocation node for slightly improved orientations.

Other details include resetting the center of rotation when the viewpoint is reset, and support of the rotateYUp field if a GeoOrigin child node is used.

Here is an example scene:

https://googledrive.com/host/0BwIhFzkLaQ9XbVRFek4wQW9xdFk/GeoviewpointExample_GeospatialCoordinateAxesNsew.html