Really basic implementation at the moment, just enough to understand the concept.
Use the mouse to zoom in/out and change the view position/angles in each mode:
The scroll wheel zooms in/out.
Hold the left mouse button and drag to move around on the map.
In Line Edit Mode, hold the Ctrl key and press the left mouse button then drag to move around on the map.
In Driving Mode, press the left mouse button then drag to change the view angles.
Browse the world map, just like in regular World Wind.
Drive an awesome car box! Use Arrow keys to turn left/right and accelerate forward/backward. It looks jittery at high speeds because there is no movement animation yet.
Add lines (barrier walls) one at a time. Start a new line on an existing line to begin the new line at the nearest end of the already existing line. Hold the Ctrl key and click on a line to erase it. If you want to save your changes then use the menu File->Save Edits. If you want to erase your edits then use the menu File->Delete Edits. Warning: All edits will be deleted if you change to a different mode before saving!!!
The red outline you see in this mode indicates the maximum distance you can place the end of the current line.
The green outline indicates the current editing area, lines can only be created inside this green outline. To create lines in other places, move the view of the map (with the mouse).
World Box Driving
The World Box Driving project is being developed with the Eclipse IDE for Java Developers
http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/junorc3
The WorldBoxDriving project depends upon the World Wind Java SDK and JBox2D.
The World Wind Java SDK can be download from this webpage
http://worldwind.arc.nasa.gov/java/index.html
JBox2D can be downloaded from this webpage
http://code.google.com/p/jbox2d/
The project is currently using World Wind Java SDK verion 1.4.0 and JBox2D version 2.1.2.2, later versions of each should also work properly.
Preparing files/directories
The following explanations use the directory D:\coding\ for simplicity.
Unzip World Wind Java SDK to
D:\coding\worldwind-1.4.0
Unzip JBox2D to
D:\coding\jbox2d-2.1.2.2
Unzip WBD to
D:\coding\WBD
Creating WBD project in Eclipse
Start Eclipse Juno, use the default workspace or create a new workspace (eg. D:\coding\WBD Workspace).
File->New->Java Project
Uncheck 'Use default location'.
Set 'Project name' to
WorldBoxDriving
Set 'Location' to
D:\coding\WBD
Click the 'Finish' button.
The project is created, although little red Xs are all over the place, dealing with them is the next step.
Project->Properties
Select 'Java Build Path'.
Select the 'Libraries' tab.
Click the 'Add External JARs...' button.
Browse to the directory
D:\coding\jbox2d-2.1.2.2\jbox2d-library\target
Select the file
jbox2d-library-2.1.2.2-jar-with-dependencies.jar
Click the 'Open' button.
Click the 'Add External JARs...' button.
Browse to the directory
D:\coding\worldwind-1.4.0
Select the files
gluegen-rt.jar
jogl.jar
worldwind.jar
gdal.jar
Click the 'Open' button.
Expand the entry for
jbox2d-library-2.1.2.2-jar-with-dependencies.jar
Select 'Source attachment' and click the 'Edit' button.
Select 'External location' and click the 'External File...' button.
Browse to the directory
D:\coding\jbox2d-2.1.2.2\jbox2d-library\target
Select the file
jbox2d-library-2.1.2.2-sources.jar
Click the 'Open' button.
Click 'OK' (in the 'Source Attachment Configuration' window).
Expand the entry for
worldwind.jar
Select 'Source attachment', click the 'Edit' button.
Select 'External location' and set 'Path' to
D:/coding/worldwind-1.4.0/src
Click the 'OK' button.
Expand the entry for
gdal.jar
Select 'Native library location' and click the 'Edit' button.
Set 'Location path' to
D:\coding\worldwind-1.4.0
Expand the entry for
gluegen-rt.jar
Select 'Native library location' and click the 'Edit' button.
Set 'Location path' to
D:\coding\worldwind-1.4.0
Expand the entry for
jogl.jar
Select 'Native library location' and click the 'Edit' button.
Set 'Location path' to
D:\coding\worldwind-1.4.0
Click the 'OK' button (in the Properties for WorldBoxDriving window).
All the red Xs in the WorldBoxDriving project should be gone.
Compiling/running WBD
In the WorldBoxDriving project, expand the 'src' folder and then the 'worldboxdriving.director' folder, open the DirectorTestMain.java file.
Run->Run
Problem
The program won't run and this error shows in the console:
Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\coding\worldwind-1.4.0\jogl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
Solution
The default Native Libraries in World Wind Java SDK are for the Intel platform, replace them with AMD Native Libraries, also packaged with the World Wind Java SDK:
Change the extension from .jar to .zip on the file
D:\coding\worldwind-1.4.0\gluegen-rt-natives-windows-amd64.jar
Open the .zip file and extract the file
gluegen-rt.dll
To the directory
D:\coding\worldwind-1.4.0
Change the extension from .jar to .zip on the file
D:\coding\worldwind-1.4.0\jogl-natives-windows-amd64.jar
Open the .zip file and extract the files
jogl.dll
jogl_awt.dll
jogl_cg.dll
To the directory
D:\coding\worldwind-1.4.0
Last edit: David Loucks 2012-09-07