![]() ![]() If that’s not possible, the 3D Renderable must detect when it spans the anti-meridian, split itself accordingly and draw the split portions separately. Surface shapes automatically handle this case, so one method of adapting 3D Renderables is to draw them with a corresponding surface shape when in 2D mode. Renderables must be programmed to explicitly handle spanning the anti-meridian. In 2D mode a globe’s Cartesian coordinates are not continuous at the anti-meridian. This works well because Cartesian coordinates are continuous at the anti-meridian, unlike geographic coordinates. 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. This method calls that method after verifying that the layer isenabled, the eye point is within this layer's active altitudes and the layer is in view.ĭocumentation generated by JSDoc 3.6.Custom shapes (Renderables) should display correctly in both 3D and 2D modes. Subclasses should generally not override this method but should instead override the doRender method. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |