본문 바로가기
연구/X3D-Earth

simple nasa worldwind java example

by fermi 2008. 8. 29.
출처 http://i.document.m05.de/?p=313

the sdk is very easy to use but the examples are horrible. three classes with a lot of swing and awt garbage. only 10 lines of code are really needed to get it working in processing.

import gov.nasa.worldwind.*;
import gov.nasa.worldwind.awt.*;

void setup()
{
size(500, 500, JAVA2D);

WorldWindowGLCanvas wwd = new WorldWindowGLCanvas();
wwd.setSize(width, height);
this.add(wwd);

Model m = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME);
m.setShowWireframeExterior(true);
m.setShowWireframeInterior(false);
m.setShowTessellationBoundingVolumes(false);
wwd.setModel(m);
}

you have to get the worldwind sdk and extract it. create the folders worldwind/library in processing’s libraries folder and copy the file worldwind.jar into it:
libraries/worldwind/library/worldwind.jar

'연구 > X3D-Earth' 카테고리의 다른 글

Hello World Wind Java SDK  (0) 2008.09.12
Dynamic KML  (0) 2008.08.30
Real time cloud data in x3d  (0) 2008.08.29
NASA World Wind Tile Structure  (1) 2008.08.29
OGC Mailing list  (0) 2008.08.23