Code Organisation

There is no one strict architecture to the code library. It really consists of a number of separable parts. Should you choose, you can take one piece, two pieces or all of it. There are many different things that you might want to do with Java 3D other than just geometry. Here we'll outline the basic functional components of what you can find. After that, we refer you to the lower level usage documentation (no written yet!) or the javadoc.



Package: org.j3d.geom

For a 3D application, a collection of pre-built geometrical objects is an extremely useful tool. Simple primitives like boxes, spheres and cylinders can make life so much more pleasent.

This section features a collection of geometry generators as well as primitives that can be used in the application. Each generator gives you a collection of options on exactly what data is needed (coordinates, normals, texture coords etc) and also the type of geometry to be created (triangles, indexed quads etc). The collection is extremely versatile and is aimed at high-speed generation, zero garbage generation and reuse of your allocated memory.

There are subsections of geometry in various stages of development:

Terrain Rendering Implementations

Package: org.j3d.terrain

Terrain rendering is a large part of many 3D applications - from games to simulation systems. Almost always, this covers very large sets of data, that cannot be loaded into memory all at once. Currently there is only a ROAM algorithm implemented, but future plans include VPIM and imposters.

File Loader/Input Device Implementations

Package: org.j3d.loaders

A constant query on the j3d-interest list is for details on XYZ file loader or and implementation for some esoteric input device. Well, we try to do everything here and give you a collection of the more useful ones. Should you be currently writing an InputDevice or Loader implementation, consider contributing it to the collection. It will be used by many others and also if you don't have time to maintain it, plenty of others will.

Device Management

Package: Sub-packages of org.j3d.device

One thing that is sorely lacking in Java3D is any form of abstract management capabilities for the abstract interfaces for InputDevices, AudioDevices and file loaders. This means that they get included in an adhoc manner. It is almost impossible for an application to dynamically support devices on machines other than the one they were written on. This collection of code is devoted to providing an abstract management system so that all you need to do is import the manager and it will tell you what is available on that machine when your application loads.


Package: org.j3d.ui.navigation

Most applications will need some form of navigation code for the world. To add to the collection in the Sun utility classes, we present a larger and more dynamic set of capabilities. These include pieces for the user interface to show the current navigation state, handlers for mouse and keyboard input and one of the most requested features - terrain following and collision avoidance.

User Interface

Package: org.j3d.ui

Almost all Java3D applications have a user interface. A lot of people seem to want the ability to capture screen shots to file. We have a collection of these basic capabilities here. We need to do more work on this to get a greater range of capabilities though.

Texture Handling

Package: org.j3d.texture

Texturing is used to provide realistic looking surfaces to objects. However, most applications don't use them properly, or do it inefficiently. This package and sub-packages includes some standard capabilities to provide the texture management capabilities for your application. A couple of people are also working on a video texture implementation using JMF that we hope to incorporate shortly.

Utility Classes

Package: org.j3d.util

Of course, no library is complete without a collection of utility classes. Plenty to find here - including a large collection of interpolators that do not need the Java 3D behaviour system in order to run. Utilities cover many areas, some with their own packages: