Java 3D tutorial 1
key point: scene graph and some recipes.
before writing a Java 3D program, you'd draw a Scene Graph first.
Recipe for writing Java 3D programs:
- Create a Canvas3D object
- Create a VirtualUniverse object
- Create a Locale object, attaching it to the VirtualUniverse object
- Construct a view branch graph
- Create a View object
- Create a ViewPlatform object
- Create a PhysicalBody object
- Create a PhysicalEnvironment object
- Attach ViewPlatform, PhysicalBody, PhysicalEnvironment, and Canvas3D objects to View object
- Construct content branch graph(s)
- Compile branch graph(s)
- Insert subgraphs into the Locale
a simple version, with SimpleUniverse:
- Create a Canvas3D Object
- Create a SimpleUniverse object which references the earlier Canvas3D object
- Customize the SimpleUniverse object
- Construct content branch
- Compile content branch graph
- Insert content branch graph into the Locale of the SimpleUniverse
a recipe for creating an interpolation animation behavior:
- Create a target TransformGroup
Set the ALLOW_TRANSFORM_WRITE capability - Create an Alpha5 object
Specify the time parameters for the alpha - Create the interpolator object
Have it reference the Alpha and TransformGroup objects
Customize the behavior parameters - Specify a scheduling region
Set the scheduling region for the behavior - Make the behavior a child of the TransformGroup
Last modified on 2007-08-24