Kokomope Java Viewer Documentation ================================== By Ara Knaian, 2/13/08, ara@mit.edu This is a very simple Java application that displays a binary STL file in a window and allows it to be spun, zoomed, and panned on. The goal is to allow 3D viewing of objects from a web application. It watches the files it is displaying for changes to their modification time, and redownloads them as changed, giving a dynamic update behavior. It can also display a KAF (Kokompe Assembly File) file, which is a simple text file listing a set of STL file URL's, each with it's own modelview matrix and color. It is smart about only downloading each STL file once, even if it shown multiple times, and about only re-downloading files when they are updated. How to Use ========== Left-click and drag to rotate. Right-click and drag to pan. Spin the mouse wheel to zoom. Alternately, Press + and - on the keyboard to zoom, if you dont have a mousewheel. How to Install / Integrate ========================== This application is meant to be called using Java Web Start. A sample jnlp file is checked into this directory. If you place javaviewer.jar and Viewer.jnlp into a directory on a webserver. when you go to Viewer.jnlp in a web browser, the application should start. The first thing it does it to load the binary STL file, via HTTP. The URL it uses is set by the property jnlp.stlurl, defined in the jnlp file. You can also give the URL as the first argument on the command line, for standalone use independent of java web start. e.g. java -classpath javaviewer.jar javaviewer.Viewer file://c:/foo.stl To-Do ----- * Help tab to display a screen indicating how to pan/zoom, etc. * Buttons to click to snap to orthographic views * A more compressed format to store trimeshes than binary STL, to accelerate file loading over network. Store vertex list and then integer references to verticies instead. (Make it check file extension / header to see what kind of file.) Also needs support in trimesh class that generates these. Ideally, this format would be designed to be compatible with GL vertex arrays, so we could just load the data and go with minimal manipulation on the client. * Accleration of drawing using VBO's, if supported by graphics card * Reworking internals to be faster --- could just take STL file straight out and set GL on it, possibly, using ByteBuffers