|
Welcome to the Java 3D Explorer, a companion to the Prentice Hall
book Java 3D API
Jump-Start by Aaron E. Walsh and Doug Gehringer. Using these
programs you can explore all of the basic features of Java 3D. Many of the
images in the book were created using these programs.
These programs require Java 3D. To run these in your browser, you'll
need to install the Java Plug-in (JPI) and Java 3D(TM). See the installation
notes for more details. You'll need Java 3D version 1.2.1 or later.
Also, be sure that you have the latest driver for your graphics card.
Click on any of the links below to run that example program in your
browser using the Java Plug-in. The programs are pretty wide, so be sure
that your screen size is set to at least 1024x768 and set your browser
window wide enough to see the entire applet. If you have trouble fitting
the applets in your browser window you can download the programs and run
them as applications. See the download section
below.
All of these programs allow the view to be moved around the object
using the mouse. Dragging the mouse while pressing the main mouse button
rotates the viewer around the object. Dragging the mouse while pressing
the second mouse button (or the main mouse button while holding down the
Alt key) moves the viewer closer or further from the object. Dragging the
mouse while pressing the third mouse button (or the main mouse button
while holding down the Shift key) moves the viewer sideways.
AppearanceExplorer
- The AppearanceExplorer shows
the attributes which are included in an Appearance object. The Setup
panel controls the object being displayed, the background and the
active lights. Select an object to display using the Data menu
(there are a lot of entries). All of the primitives shown in Chapter
3, "Creating and Loading Geometry" are included in the
Data menu.
Each of the appearance components that makes up an Appearance has
a panel in the program. See Chapter 4, "Appearances" for
descriptions of the appearance components. The default appearance
has lighting and texture mapping disabled. Use Material: Enable
Lighting to enable lighting and Texture2D: Enable Texture to
enable texture mapping.
PolygonOffset
- The PolygonOffset program shows
the effect of polygon offset. The dynamic and static offset can be
changed. The red sphere encloses a hidden sphere which is scaled by
the "inner scale" slider. This simulates the effect of
thin models, where the offset edges of hidden surfaces pop through
the visible surfaces. Polygon offsetting is discussed in Chapter 4,
"Appearances".
EnvironmentExplorer
- The EnvironmentExplorer
allows the aspects of environment nodes to be edited. There are
panels for Light, Background, Fog and Sound nodes. Environment nodes
are discussed in Chapter 5, "Environment Nodes"
TransformExplorer
- The TransformExplorer shows
the effects of translation, scaling and rotation transformation
components. It also shows how to do transformations around a
reference point. Transformations are discussed in Chapter 6,
"Tools: Transformation, Viewing and Picking".
Human
- The Human model shows the effect of
hierarchical transformations. Changing the transformation for the
shoulder changes the orientation of the arm and wrist, while
changing the transform for the elbow changes only the wrist.
Hierarchical transformations are discussed in Chapter 6,
"Tools: Transformation, Viewing and Picking".
Perspective View Projection Z mapping
- The ViewProj program shows the effect
of perspective view projections on the depth buffer. A sphere is
shown along with overhead views of the view in world space and clip
space. The default clip distances of 0.1, 10.0 are used initially,
resulting in the sphere being squished into the back of the depth
buffer. Increasing the back/front ratio results in further
distortion. Viewing is discussed in Chapter 6, "Tools:
Transformation, Viewing and Picking".
Download and run locally
The source to these programs is included in the zip file available here.
Unpack the zip file and see the README file for more details on running the
programs as applications and how to build the programs. |