viewer-geoX3d - geoviewpoint
Clement,
I have a simple example at http://tools.realism.com/x3d-examples/EarthNavigation/index.html. This does everything except the 2D rotation. I put this together in about 1 hour using existing stock X3D/X3DOM capabilities.
To reproduce the 2D rotation, the control+buttons event would need to be captured prior to the existing Navigation and the proper orientation algorithm applied. I don't have the time to work on this right now. I would start with seeing if jQuery could capture a button down event on the tag (id='x3dScene' in this example) prior to Navigation getting it. The it becomes a simple matter of applying the correct algorithm based on the starting position and the current cursor position in the X3D window.
At this time I am having a hard time trying to figure out the conditions when you would want to use the feature to change the ground-plane orientation. If you could describe a situation when this would be useful (or needed), I may be able to develop an alternative.
If you want to just be able to "straighten-up" the Earth so that North is vertical while keeping the same lat/long in the center of the screen, then an HTML button could be used to perform this reorientation. That would involve changing the 'orientation' field in the Viewpoint node (in EarthNavigator.x3d). The hardest part is figuring out the new rotation angle and vectors.
Leonard Daly
Hi Clément,
since X3DOM is not primarily a system for geospatial visualization, I
guess it will not be able to compete with Cesium or Google Earth for
this specific use case.
However, I am wondering if three.js would do any better, since it is
also not specialized in geospatial visualization, and I would really be
surprised if it would have a built-in navigation mode that does exactly
what you want...
With that said, it might be worth pointing out that you can always write
your own navigation, by disabling X3DOMs navigation (setting it to NONE)
and using standard DOM event handlers. You can access (and manipulate)
the view matrix via the runtime API:
http://doc.x3dom.org/author/runtime.html#viewMatrix
Best Regards,
Max