1.5 Some Java 3D Terminology
Before moving on to the topic of creating the content branch graph, two Java 3D terms are defined. The
terms live and compiled are defined in this section.
Inserting a branch graph into a Locale makes it live, and consequently, each of the objects in that branch
graph become live. There are some consequences when an object becomes live. Live objects are subject
to being rendered. Also, the parameters of live objects cannot be modified unless the corresponding width of 2
meters generally fit on the image plate.
After creating Canvas3D and Simple Universe objects, the next step is the creation of the content branch
graph. The regularity of structure found in the view branch graph (that leads to using the SimpleUniverse
class) does not exist for the content branch graph. The content branch graph varies from program to
program making it impossible to give details for construction in a recipe. It also means that there is no
“simple content” class for any universe you may want to assemble.
Creating a content branch graph is the subject of Sections 1.6, 1.7, and 1.9. Compiling the content
branch graph is discussed in Section 1.8. If you cannot wait to see some code, see Code Fragment 1-1 for
an example of using the SimpleUniverse class.
After creating the content branch graph, it is inserted into the universe using the addBranchGraph method
of SimpleUniverse. The addBranchGraph method takes an instance of BranchGroup as the only
parameter. This BranchGroup is added as a child of the Locale object created by the SimpleUniverse.
SimpleUniverse Methods (partial list)
Package: com.sun.j3d.utils.universe
void addBranchGraph(BranchGroup bg)
Used to add Nodes to the Locale object of the scene graph created by the SimpleUniverse. This is used
to add a content branch graph to the virtual universe.
ViewingPlatform getViewingPlatform()
Used to retrieve the ViewingPlatform object the SimpleUniverse instantiated. This method is used with
the setNominalViewingTransform() method of ViewingPlatform to adjust the location of the view
position