JAVA3D uses its own definition of scene map and observation mode to construct 3D upper layer structure, which realizes the use of three-dimensional technology in Java platform. This paper focuses on the principles of JAVA3D's unique two important concepts: Scene map (Scene graph), observation mode (view model). The introduction to interface usage is divided into two parts: an example shows how to use the Java3d interface, and describes how to combine the JAVA3D technology with Java's original web technology (JSP, Serverlet) to achieve a three-dimensional display on a Web page.
1. About JAVA3D
1.1 Java3d Introduction
The Java3d API is a sun-defined interface for implementing 3D display. 3D technology is the underlying display technology, JAVA3D provides a Java-based upper layer interface. Java3d the underlying technologies of OpenGL and DirectX in the Java interface. This new design makes 3D technology no longer cumbersome and can be added to the J2SE, Java-ee suite of features that ensure a strong scalability of the JAVA3D technology.
Java3d is based on JAVA2 (JAVA1.2), the simplicity of the Java language makes it possible to promote JAVA3D. It implements the functions that the following three-dimensional display can use:
To produce simple or complex forms (or to invoke existing three-dimensional forms)
The body has color, transparent effect, texture.
Generate lights and move lights in three-dimensional environments.
Ability to handle behavioral judgments (keyboard, mouse, timing, etc.).
Create fog, background, sound.
So that the body deformation, movement, generation of three-dimensional animation.
Write very complex applications for a variety of areas such as VR (virtual reality).
J2SE does not provide JAVA3D in its standard development Kit API,JAVA3D is a stand-alone optional component that can be downloaded separately. Java3d now (as of May 2003) the official version is 1.3.0, which can be downloaded from the http://java.sun.com/products/java-media/3D/download.html in the development kit.
The JAVA3D 1.3 has 7 different downloadable versions:
Java3d for Windows (DirectX version) SDK for JDK (include Runtime);
Java3d for Windows (OpenGL version) SDK for JDK (include Runtime);
Java3d for Solaris/sparc Runtime for JDK (include Runtime);
Java3d for Windows (DirectX version) Runtime for JRE;
Java3d for Windows (OpenGL version) Runtime for JRE;
Java3d for Solaris/sparc SDK for JRE;
Java3d for Solaris Runtime bit support;
The first three versions are development packages. The 4th, 5, and 6 versions are JAVA3D runtime support packages. The last one is a package that supports running JAVA3D on the Solaris-bit operating platform. The first three development packages contain their corresponding runtime support packages. The Java language itself has cross-platform features, and the concept and implementation code will remain exactly the same regardless of which version of the development package is used. Here we use the Java3d for Windows (OpenGL version) SDK for JDK (include Runtime), the version as a toolkit for our discussion and implementation of JAVA3D. Note that the following environments are guaranteed prior to installing this version of the SDK:
Java 2 (Runtime or SDK) version 1.3.1 or later
OpenGL 1.1 or later version, and is a Microsoft-supported graphics manufacturer
Windows NT 4.0 only:service Pack 3 or later version (Window2000, WINDOWXP)