Wednesday, October 31, 2012

3D GUI with SDT3D

A new 3D GUI menu item has been introduced under the View menu. CORE can now publish its topology to the SDT3D (Scripted Display Tool 3D) developed by NRL. The latitude, longitude, and altitude settings under the Canvas Size and Scale dialog will determine the coordinate mapping to a geographic location. SDT3D is based on NASA's WorldWind Java SDK. This is three-dimensional virtual globe software similar to Google Earth.
Node movements and links are drawn on the 3D map as depicted in the screenshot below.
In order to get this working, a /usr/local/bin/sdt3d.sh launcher script is made with the following contents:
#!/bin/sh
cd ~
/opt/sdt/sdt3d.sh $@
The following line is used in an ~/sdtConfig.txt file in the user's home directory; this causes SDT3D to receive commands on a local UDP port 5000 socket :
listen 5000
Here we have SDT3D installed to /opt/sdt, with a /opt/sdt/sdt3d.sh script as shown below:

#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/
THISDIR=`dirname $0`
export LD_LIBRARY_PATH=${THISDIR}/lib
java -jar -Dsun.java2d.noddraw=true -Xmx512m \ ${THISDIR}/jars/sdt3d.jar


For tips on building and install SDT3D under Ubuntu 12.04 x86_64, see this SDT3D wiki page. OpenJDK 1.7 is used, as the Oracle JDK did not seem to work.