![]() In 3D mode, Renderables spanning the anti-meridian typically draw themselves by transforming their geographic locations to Cartesian points and computing their dimensions and shape in Cartesian coordinates. Some projections, such as polar projections, do not require multiple adjacent globes. The number of times a Renderable is drawn is also governed by the geographic projection in effect. Renderables can assume that when they are called to pick or render themselves that the current globe in the draw context is configured with the appropriate Cartesian coordinate mapping, and that their render and pick methods will be called once for each adjacent globe. The difference is that the mapping to Cartesian and thus screen coordinates is different for each adjacent flat globe. In 2D mode Renderables continue to use these methods this way. These locations are subsequently transformed to screen coordinates by OpenGL. ![]() Renderables currently use putePointFromPosition and putePositionFromPoint to determine their Cartesian locations in the scene. Each time a Renderable’s pick or render method is called it can assume that it’s dealing with one full globe, but these methods might be called more than once per frame. Renderables determine whether they are in view and draw themselves when they are. WorldWind has always had the model that each display frame draws the Renderables for a single full globe. Typically they are rendered only once or twice, depending on the user’s view and the geographic projection in effect, but they may be rendered up to three times per frame. Renderables must therefore be programmed to pick and render themselves potentially several times per frame using different flat globes. ![]() This entails that Renderables render themselves in multiple passes per frame, each pass corresponding to one of those globes. To achieve the effect that allows continuous scrolling, WorldWind renders several adjacent flat globes in a single display frame. In 2D mode there are multiple globes, each corresponding to one 180 degree x 360 degree view of the globe (with latitudes between plus and minus 90 degrees and longitudes between plus and minus 180 degrees). In 3D mode there is one globe and all Renderables in the model are rendered in a single display frame. How WorldWind Achieves Continuous 2D Scrolling It may even lie in several different screen locations if the user’s view encompasses more than 360 degrees. Additionally, the anti-meridian – the +/- 180 degree meridian – may lie at any point on the screen. Renderables at those geographic locations must therefore draw themselves at two or more different places on the screen. If the view encompasses more than 360 degrees, some geographic locations will be visible in two or more different screen locations. In 2D mode the user can view more than 360 degrees of longitude in a single frame. Before reading this document we strongly advise that you read the custom-shape tutorial and examine the example code for that tutorial. It first describes the necessary background and requirements of 2D mode, then presents steps for achieving correct behavior. This document describes how custom 3D renderables must be implemented to display correctly in 2D mode. Java API (.Custom shapes (Renderables) should display correctly in both 3D and 2D modes.for applets that are not currently used). Shutting down NASA World Wind is non-trivial and has its own beginner's example: Shutdown.java.Īpparently the WorldWindow class does have a shutdown method and the class WorldWind has a static shutDown method to reset WorldWind to its initial state in order to conserve memory (e.g. The program HelloWorldWind.java is only slightly more complex and instantiates a BasicModel.ĪpplicationTemplate ĪpplicationTemplate.java provides a template for applications based on NASA World Wind and is used by several other programs in the examples directory. It creates a WorldWindowGLCanvas window inside a frame. ![]() The SimplestPossibleExample.java is a tiny program with about thirty lines of code. The application is licensed under the NASA Open Source Agreement.Įxamples for beginners SimplestPossibleExample NASA World Wind Java is a Java virtual globe application with an extensive set of APIs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |