NASA World Wind Java SDK Tom Gaskins NWW Technical Director
Total Page:16
File Type:pdf, Size:1020Kb
NASA World Wind Java SDK Tom Gaskins NWW Technical Director http://worldwind.arc.nasa.gov TS-3489 2007 JavaOneSM Conference | Session TS-3489 | Today’s Agenda Build an Application • Deploy with Java™ Web Start software Build an Applet • (Deploy with Brute Force) Describe the Architecture and API What You Need and Where to Get It Q&A 2007 JavaOneSM Conference | Session TS-3489 | 2 Today’s Goal Able to Create 3D Geo-Info Applications and Applets with NASA World Wind for Java™ platform 2007 JavaOneSM Conference | Session TS-3489 | 3 Applet 2007 JavaOneSM Conference | Session TS-3489 | 4 Applications Multi-Frame Single Frame 2007 JavaOneSM Conference | Session TS-3489 | 5 Big Brother 2007 JavaOneSM Conference | Session TS-3489 | 6 Today’s Agenda Build an Application—Live Build an Applet—Live Describe the Architecture and API What You Need and Where to Get It Q&A 2007 JavaOneSM Conference | Session TS-3489 | 7 Build an Application—Live 2007 JavaOneSM Conference | Session TS-3489 | 8 Build an Application—Steps Add a WorldWindowGLCanvas to a JFrame: Class MyWorldWindFrame extends Jframe { WorldWindowGLCanvas wwc = new WorldWindowGLCanvas(); this.getConentPane().add(wwc, BorderLayout.CENTER); } Listen for World Wind Events: wwc.addSelectListener(new SelectListener() { public void selected(SelectEvent event) {…} }); 2007 JavaOneSM Conference | Session TS-3489 | 9 World Window and View Interfaces WorldWindow • View • set/getModel(Model) Fields • set/getView(View) Position, direction, fov, altitude, heading, pitch, • getSceneController(…) roll, … • pick(java.awt.Point) Actions • set/getInputHandler(…) apply() • add/remove listeners: goto(lat/lon/elev/altitude) – PositionListener project(Point 3Dpoint) – SelectListener Compute – RenderingListener horizon() • repaint() positionFromScreenPoint(…) rayFromScreenPoint(…) … 2007 JavaOneSM Conference | Session TS-3489 | 10 Today’s Agenda Build an Application Build an Applet Describe the Architecture and API What You Need and Where to Get It Q&A 2007 JavaOneSM Conference | Session TS-3489 | 11 Build an Applet—Live 2007 JavaOneSM Conference | Session TS-3489 | 12 Applet.html • <html><head><title>World Wind Java - Applet demo 3 Up</title></head> <applet code="com.sun.opengl.util.JOGLAppletLauncher" width=400 height=260 codebase="http://www.tomgaskins.net/applet" archive="jogl.jar,gluegen-rt.jar,Applet1Up.jar"> <param name="subapplet.classname" VALUE="worldwinddemo.Applet1Up"> <param name="subapplet.displayname" VALUE="WorldWind Applet Demo"> <param name="progressbar" value="true"> <param name="cache_archive“ VALUE="jogl.jar,gluegen-rt.jar,Applet1Up.jar"> <param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegen- rt.jar;preload,Applet1Up.jar;preload"> </applet> <applet code="com.sun.opengl.util.JOGLAppletLauncher" width=400 height=260 codebase="http://www.tomgaskins.net/applet" archive="jogl.jar,gluegen-rt.jar,Applet1Up.jar"> <param name="subapplet.classname" VALUE="worldwinddemo.Applet1Up"> <param name="subapplet.displayname" VALUE="WorldWind Applet Demo"> <param name="progressbar" value="true"> <param name="cache_archive" VALUE="jogl.jar,gluegen-rt.jar,Applet1Up.jar"> <param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegen- rt.jar;preload,Applet1Up.jar;preload"> </applet> <applet code="com.sun.opengl.util.JOGLAppletLauncher" width=800 height=260 codebase="http://www.tomgaskins.net/applet" archive="jogl.jar,gluegen-rt.jar,Applet1Up.jar"> <param name="subapplet.classname" VALUE="worldwinddemo.Applet1Up"> <param name="subapplet.displayname" VALUE="WorldWind Applet Demo"> <param name="progressbar" value="true"> <param name="cache_archive" VALUE="jogl.jar,gluegen-rt.jar,Applet1Up.jar"> <param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegen- rt.jar;preload,Applet1Up.jar;preload"> </applet></html> 2007 JavaOneSM Conference | Session TS-3489 | 13 Today’s Agenda Build an Application Build an Applet Describe the Architecture and API What You Need and Where to Get It Q&A 2007 JavaOneSM Conference | Session TS-3489 | 14 World Wind Architecture 2007 JavaOneSM Conference | Session TS-3489 | 15 World Wind System Architecture 2007 JavaOneSM Conference | Session TS-3489 | 16 World Wind API Features • Componentry to Embed in Applications • An Application’s Slave • Replaceable and Extensible ● Interface Emphasis • Operating System Independent • Cross-Toolkit (Swing, SWT, …) • Does the Hard Stuff • Dynamic Retrieval • Dynamic Image Selection • Uses OpenGL® Collaboratively with Application • Follows Modern Best Practices 2007 JavaOneSM Conference | Session TS-3489 | 17 Today’s Agenda Build an Application Build an Applet Describe the Architecture What You Need and Where to Get It Q&A 2007 JavaOneSM Conference | Session TS-3489 | 18 Where Is It? • http://worldwind.arc.nasa.gov/java • Root of All Information and Bits ● Source Code ● Binaries and Installers ● Documentation Link ● Forums Link ● Pretty Pictures 2007 JavaOneSM Conference | Session TS-3489 | 19 Summary • World Wind is a Component—Swing, SWT, etc. • Single Binary for Mac OS X, Windows, Linux, … • Open Source, Free and Unencumbered • Architecture Designed for Extension and Replacement • Use in Application or Applet • Collaborative Use of Java™ Binding for the OpenGL® API/OpenGL® 2007 JavaOneSM Conference | Session TS-3489 | 20 Progress and Future • We are here: E F • What we Plan (other than Faster and Prettier) • More data available • Planets, Moons, Stars • Weather, Sensor, Satellite, Time-series • More data formats natively supported • Useful Components • Layer manager, Animation player, D&D, UI helpers • RSS Feed support • Scripting/Extension APIs for JavaScript™ technology and Python • Eclipse and NetBeans™ RCP integration 2007 JavaOneSM Conference | Session TS-3489 | 21 Acknowledgments • NASA • United States Department of Energy • Sun Microsystems (www.sun.com) • Microsoft (www.microsoft.com) • I-cubed (www.i3.com) • The Team • Patrick Hogan—Visionary Leader • Dave Collins, Lado Garakanidze, Tom Gaskins, Chris Maxwell, Randy Kim, Vick Kelkar • Ken Russell 2007 JavaOneSM Conference | Session TS-3489 | 22 Q&A Tom Gaskins Ken Russell 2007 JavaOneSM Conference | Session TS-3489 | 23 NASA World Wind Java SDK Tom Gaskins NWW Technical Director http://worldwind.arc.nasa.gov TS-3489 2007 JavaOneSM Conference | Session TS-3489 | .