Other Java 3D Approaches
The particle systems in this chapter were coded with BY_REFERENCE geometries and GeometryUpdater, but what other ways are there of writing particle systems?
One possibility is to represent each particle by a separate TransformGroup and Shape3D pair and have the particle system move the shapes by adjusting the TransformGroups. This coding style is utilized in an example by Peter Palombi and Chris Buckalew, which is part of Buckalew's CSc 474 Computer Graphics course (http://www.csc.calpoly.edu/~buckalew/474Lab5-W03.html). It has the advantage of being simple to understand but isn't scaleable to large numbers of particles.
Another technique is to store all the particles in a GeometryArray as before, but do the updates directly without the involvement of a GeometryUpdater. Synchronization problems can be avoided by detaching the Shape3D from the scene graph before the updates are made and reattaching it afterward. The detachment of the shape removes it from the rendering cycle, so synchronization problems disappear. There seems little advantage to this approach since the overhead of removing and restoring scene graph nodes is large.
If the application uses mixed mode or immediate mode rendering, then the programmer gains control of when rendering is carried out and can avoid synchronization problems.
The excellent Yaarq demo by Wolfgang Kienreich (downloadable from http://www.ascendancy.at/downloads/yaarq.zip) is a mixed mode Java3D example showing off a range ...