The Java 3DTM API Specification

Version 1.2, April 2000



 1 Introduction to Java 3D

1.1 Goals
1.2 Programming Paradigm
1.2.1 The Scene Graph Programming Model
1.2.2 Rendering Modes
1.2.3 Extensibility
1.3 High Performance
1.3.1 Layered Implementation
1.3.2 Target Hardware Platforms
1.4 Support for Building Applications and Applets
1.4.1 Browsers
1.4.2 Games
1.5 Overview of Java 3D Object Hierarchy
1.6 Structuring the Java 3D Program
1.6.1 Java 3D Application Scene Graph
1.6.2 Recipe for a Java 3D Program
1.6.3 HelloUniverse: A Sample Java 3D Program

 2 Java 3D Concepts

2.1 Basic Scene Graph Concepts
2.1.1 Constructing a Simple Scene Graph
2.1.2 A Place For Scene Graphs
2.1.3 SimpleUniverse Utility
2.1.4 Processing a Scene Graph
2.2 Features of Java 3D
2.2.1 Bounds
2.2.2 Nodes
2.2.3 Live and/or Compiled

 3 Scene Graph Basics

3.1 Scene Graph Structure
3.1.1 Spatial Separation
3.1.2 State Inheritance
3.1.3 Rendering
3.2 Scene Graph Objects
3.2.1 Node Objects
3.2.2 NodeComponent Objects
3.3 Scene Graph Superstructure Objects
3.3.1 VirtualUniverse Object
3.3.2 Locale Object
3.4 Scene Graph Viewing Objects
3.4.1 Canvas3D Object
3.4.2 Screen3D Object
3.4.3 View Object
3.4.4 PhysicalBody Object
3.4.5 PhysicalEnvironment Object

 4 Scene Graph Superstructure

4.1 The Virtual Universe
4.2 Establishing a Scene
4.3 Loading a Virtual Universe
4.4 Coordinate Systems
4.5 High-Resolution Coordinates
4.5.1 Java 3D High-Resolution Coordinates
4.5.2 Java 3D Virtual World Coordinates
4.5.3 Details of High-Resolution Coordinates
4.6 API for Superstructure Objects
4.6.1 VirtualUniverse Object
4.6.2 Locale Object
4.6.3 HiResCoord Object

 5 Group Node Objects

5.1 Group Node
5.2 BranchGroup Node
5.3 TransformGroup Node
5.4 OrderedGroup Node
5.5 DecalGroup Node
5.6 Switch Node
5.7 SharedGroup Node

 6 Leaf Node Objects

6.1 Leaf Node
6.2 Shape3D Node
6.2.1 OrientedShape3D Node
6.3 BoundingLeaf Node
6.4 Background Node
6.5 Clip Node
6.6 ModelClip Node
6.7 Fog Node
6.7.1 ExponentialFog Node
6.7.2 LinearFog Node
6.8 Light Node
6.8.1 AmbientLight Node
6.8.2 DirectionalLight Node
6.8.3 PointLight Node
6.8.4 SpotLight Node
6.9 Sound Node
6.9.1 BackgroundSound Node
6.9.2 PointSound Node
6.9.3 ConeSound Node
6.10 Soundscape Node
6.11 ViewPlatform Node
6.12 Behavior Node
6.13 Morph Node
6.14 Link Node
6.15 AlternateAppearance Node

 7 Reusing Scene Graphs

7.1 Sharing Subgraphs
7.1.1 SharedGroup Node
7.1.2 Link Leaf Node
7.2 Cloning Subgraphs
7.2.1 References to Node Component Objects
7.2.2 References to Other Scene Graph Nodes
7.2.3 Dangling References
7.2.4 Subclassing Nodes
7.2.5 NodeReferenceTable Object
7.2.6 Example User Behavior Node

 8 Node Component Objects

8.1 Node Component Objects: Attributes
8.1.1 Alpha Object
8.1.2 Appearance Object
8.1.3 ColoringAttributes Object
8.1.4 LineAttributes Object
8.1.5 PointAttributes Object
8.1.6 PolygonAttributes Object
8.1.7 RenderingAttributes Object
8.1.8 TextureAttributes Object
8.1.9 TransparencyAttributes Object
8.1.10 Material Object
8.1.11 Texture Object
8.1.12 Texture2D Object
8.1.13 Texture3D Object
8.1.14 TexCoordGeneration Object
8.1.15 TextureUnitState Object
8.1.16 MediaContainer Object
8.1.17 AuralAttributes Object
8.1.18 ImageComponent Object
8.1.19 ImageComponent2D Object
8.1.20 ImageComponent3D Object
8.1.21 DepthComponent Object
8.1.22 DepthComponentFloat Object
8.1.23 DepthComponentInt Object
8.1.24 DepthComponentNative Object
8.1.25 Bounds Object
8.1.26 BoundingBox Object
8.1.27 BoundingSphere Object
8.1.28 BoundingPolytope Object
8.1.29 Transform3D Object
8.2 Node Component Objects: Geometry
8.2.1 GeometryArray Object
8.2.2 GeometryUpdater Interface
8.2.3 PointArray Object
8.2.4 LineArray Object
8.2.5 TriangleArray Object
8.2.6 QuadArray Object
8.2.7 GeometryStripArray Object
8.2.8 LineStripArray Object
8.2.9 TriangleStripArray Object
8.2.10 TriangleFanArray Object
8.2.11 IndexedGeometryArray Object
8.2.12 IndexedPointArray Object
8.2.13 IndexedLineArray Object
8.2.14 IndexedTriangleArray Object
8.2.15 IndexedQuadArray Object
8.2.16 IndexedGeometryStripArray Object
8.2.17 IndexedLineStripArray Object
8.2.18 IndexedTriangleStripArray Object
8.2.19 IndexedTriangleFanArray Object
8.2.20 CompressedGeometry Object
8.2.21 CompressedGeometryHeader Object
8.2.22 Raster Object
8.2.23 Font3D Object
8.2.24 FontExtrusion Object
8.2.25 Text3D Geometry Object
8.3 Math Component Objects
8.3.1 Tuple Objects
8.3.2 Matrix Objects

 9 View Model

9.1 Why a New Model?
9.1.1 The Physical Environment Influences the View
9.2 Separation of Physical and Virtual
9.2.1 The Virtual World
9.2.2 The Physical World
9.3 The Objects That Define the View
9.4 ViewPlatform: A Place in the Virtual World
9.4.1 Moving through the Virtual World
9.4.2 Dropping in on a Favorite Place
9.4.3 View Attach Policy
9.4.4 Associating Geometry with a ViewPlatform
9.5 Generating a View
9.5.1 Composing Model and Viewing Transformations
9.5.2 Multiple Locales
9.6 A Minimal Environment
9.7 The View Object
9.7.1 Projection Policy
9.7.2 Clip Policies
9.7.3 Projection and Clip Parameters
9.7.4 Frame Start Time, Duration, and Number
9.7.5 View Traversal and Behavior Scheduling
9.7.6 Scene Antialiasing
9.7.7 Depth Buffer
9.8 The Screen3D Object
9.8.1 Off-Screen Rendering
9.9 The Canvas3D Object
9.9.1 Window System-Provided Parameters
9.9.2 Off-Screen Rendering
9.9.3 Other Canvas3D Parameters
9.9.4 GraphicsConfigTem-plate3D Object
9.10 The PhysicalBody Object
9.11 The PhysicalEnvironment Object

 10 Behaviors and Interpolators

10.1 Behavior Object
10.1.1 Code Structure
10.1.2 WakeupCondition Object
10.1.3 WakeupCriterion Object
10.1.4 Composing WakeupCriterion Objects
10.2 Composing Behaviors
10.3 Scheduling
10.4 How Java 3D Performs Execution Culling
10.5 The Behavior API
10.5.1 The Behavior Node
10.5.2 WakeupCondition Object
10.5.3 The WakeupCriterion Objects
10.6 Interpolator Behaviors
10.6.1 Mapping Time to Alpha
10.6.2 Acceleration of Alpha
10.6.3 The Alpha Class
10.6.4 The Interpolator Base Class
10.6.5 PositionInterpolator Object
10.6.6 RotationInterpolator Object
10.6.7 ColorInterpolator Object
10.6.8 ScaleInterpolator Object
10.6.9 SwitchValueInterpolator Object
10.6.10 TransparencyInterpolator Object
10.6.11 PathInterpolator Object
10.6.12 PositionPathInterpolator Object
10.6.13 RotPosPathInterpolator Object
10.6.14 RotPosScalePathInterpolator Object
10.6.15 RotationPathInterpolator Object
10.7 Level-of-Detail Behaviors
10.7.1 LOD Object
10.7.2 DistanceLOD Object
10.8 Billboard Behavior

 11 Input Devices and Picking

11.1 InputDevice Interface
11.1.1 The Abstract Interface
11.1.2 Instantiating and Registering a New Device
11.2 Sensors
11.2.1 Using and Assigning Sensors
11.2.2 Behind the (Sensor) Scenes
11.2.3 The Sensor Object
11.2.4 The SensorRead Object
11.3 Picking
11.3.1 SceneGraphPath Object
11.3.2 BranchGroup Node and Locale Node Pick Methods
11.3.3 PickShape Object
11.3.4 PickBounds Object
11.3.5 PickPoint Object
11.3.6 PickRay Object
11.3.7 PickSegment Object
11.3.8 PickCone Object
11.3.9 PickConeRay Object
11.3.10 PickConeSegment Object
11.3.11 PickCylinder Object
11.3.12 PickCylinderRay Object
11.3.13 PickCylinderSegment Object

 12 Audio Devices

12.1 AudioDevice Interface
12.1.1 Initialization
12.1.2 Audio Playback
12.1.3 Device-Driver-Specific Data
12.2 AudioDevice3D Interface
12.3 Instantiating and Registering a New Device

 13 Execution and Rendering Model

13.1 Three Major Rendering Modes
13.1.1 Immediate Mode
13.1.2 Retained Mode
13.1.3 Compiled-Retained Mode
13.2 Instantiating the Render Loop
13.2.1 An Application-Level Perspective
13.2.2 Retained and Compiled-Retained Rendering Modes

 14 Immediate-Mode Rendering

14.1 Two Styles of Immediate-Mode Rendering
14.1.1 Pure Immediate-Mode Rendering
14.1.2 Mixed-Mode Rendering
14.2 Canvas3D Methods
14.3 API for Immediate Mode
14.3.1 GraphicsContext3D
14.3.2 J3DGraphics2D

 A Math Objects

A.1 Tuple Objects
A.1.1 Tuple2d Class
A.1.2 Tuple2f Class
A.1.3 Tuple3b Class
A.1.4 Tuple3d Class
A.1.5 Tuple3f Class
A.1.6 Tuple3i Class
A.1.7 Tuple4b Class
A.1.8 Tuple4d Class
A.1.9 Tuple4f Class
A.1.10 Tuple4i Class
A.1.11 AxisAngle4d Class
A.1.12 AxisAngle4f Class
A.1.13 GVector Class
A.2 Matrix Objects
A.2.1 Matrix3f Class
A.2.2 Matrix3d Class
A.2.3 Matrix4f Class
A.2.4 Matrix4d Class
A.2.5 GMatrix Class

 B 3D Geometry Compression

B.1 Compression
B.2 Decompression
B.3 Appendix Organization
B.4 Generalized Triangle Strip
B.5 Generalized Triangle Mesh
B.6 Position Representation and Quantization
B.7 Color Representation and Quantization
B.8 Normal Representation and Quantization
B.8.1 Normals as Indices
B.8.2 Normal Encoding Parameterization
B.8.3 Special Warping Rules for Delta Normals
B.9 Modified Huffman Encoding
B.10 Compressed Geometry Instructions
B.11 Bit Layout of Compressed Geometry Instructions
B.12 Compressed Geometry Instruction Bit Details
B.12.1 nop Instruction
B.12.2 setState Instruction
B.12.3 setTable Instruction
B.12.4 mbr (meshBufferReference) Instruction
B.12.5 Position Subinstruction
B.12.6 Color Subinstruction
B.12.7 Normal Subinstruction
B.12.8 vertex Instruction
B.12.9 setNormal Instruction
B.12.10 setColor Instruction
B.13 Semantics of Compressed Geometry Instructions
B.13.1 Header and Body to Variable-Length Instruction
B.13.2 Variable-Length Instruction to Instruction
B.13.3 Delta Position to Position
B.13.4 Delta Color to Color
B.13.5 Encoded Delta Normal to Encoded Normal
B.13.6 Encoded Normal to Rectilinear Normal
B.14 Semantics of Vertices
B.14.1 Instruction to Vertex
B.14.2 Vertex to Intermediate Triangle
B.14.3 Intermediate Triangle to Final Triangle
B.15 Outline of Geometry Process
B.15.1 Compressing Geometry Data
B.15.2 Convert to Generalized Mesh Format
B.15.3 Position
B.15.4 Normals
B.15.5 Colors
B.15.6 Collect Delta Code Statistics
B.15.7 Position Delta Code Statistics
B.15.8 Color Delta Code Statistics
B.15.9 Normal Delta Code Statistics
B.15.10 Assign Huffman Tags
B.15.11 Assemble the Pieces into a Bit Stream
B.16 Compressed Geometry Assembly Syntax
B.17 Compressed Geometry Instruction Verifier

 C View Model Details

C.1 An Overview of the Java 3D View Model
C.2 Physical Environments and Their Effects
C.2.1 A Head-Mounted Example
C.2.2 A Room-Mounted Example
C.2.3 Impact of Head Position and Orientation on the
C.3 The Coordinate Systems
C.3.1 Room-Mounted Coordinate Systems
C.3.2 Head-Mounted Coordinate Systems
C.4 The ViewPlatform Object
C.5 The View Object
C.5.1 View Policy
C.5.2 Screen Scale Policy
C.5.3 Window Eyepoint Policy
C.5.4 Monoscopic View Policy
C.5.5 Visibility Policy
C.5.6 Coexistence Centering Enable
C.5.7 Eyepoint in Coexistence
C.5.8 Sensors and Their Location in the Virtual World
C.6 The Screen3D Object
C.6.1 Screen3D Calibration Parameters
C.6.2 Accessing and Changing Head Tracker Coordinates
C.7 The Canvas3D Object
C.7.1 Scene Antialiasing
C.7.2 Accessing and Modifying an Eye's Image Plate
C.7.3 Canvas Width and Height
C.7.4 Monoscopic View Policy
C.8 The PhysicalBody Object
C.9 The PhysicalEnvironment Object
C.10 Viewing in Head-Tracked Environments
C.10.1 A Room-Mounted Display with Head Tracking
C.10.2 A Head-Mounted Display with Head Tracking
C.11 Compatibility Mode
C.11.1 Overview of the Camera-Based View Model
C.11.2 Using the Camera-Based View Model

 D Exceptions

D.1 BadTransformException
D.2 CapabilityNotSetException
D.3 DanglingReferenceException
D.4 IllegalRenderingStateException
D.5 IllegalSharingException
D.6 MismatchedSizeException
D.7 MultipleParentException
D.8 RestrictedAccessException
D.9 SceneGraphCycleException
D.10 SingularMatrixException
D.11 SoundException

 E Equations

E.1 Fog Equations
E.2 Lighting Equations
E.3 Sound Equations
E.3.1 Headphone Playback Equations
E.3.2 Speaker Playback Equations
E.4 Texture Mapping Equations
E.4.1 Texture Lookup
E.4.2 Texture Application

 F The Utility Packages

F.1 The Utility Packages
F.2 Package Overview
F.3 audioengines Package
F.4 audioengines.javasound Package
F.5 loaders Package
F.5.1 Interfaces
F.5.2 Classes
F.5.3 Exceptions
F.6 loaders.lw3d Package
F.7 loaders.objectfile Package
F.8 utils.applet Package
F.9 utils.behaviors.interpolators Package
F.10 utils.behaviors.keyboard Package
F.11 utils.behaviors.mouse Package
F.11.1 Interfaces
F.11.2 Classes
F.12 utils.compression Package
F.13 utils.geometry Package
F.14 utils.image Package
F.15 utils.picking Package
F.16 utils.picking.behaviors Package
F.16.1 Interfaces
F.16.2 Classes
F.17 utils.universe Package

 G The Example Programs

G.1 Introduction
G.2 Running the Example Programs
G.2.1 Running within a Browser
G.2.2 Running within Appletviewer
G.3 Program Descriptions
G.3.1 AWT_Interaction
G.3.2 AlternateAppearance
G.3.3 Appearance
G.3.4 AppearanceMixed
G.3.5 Background
G.3.6 Billboard
G.3.7 ConicWorld
G.3.8 FourByFour
G.3.9 GearTest
G.3.10 GeometryByReference
G.3.11 GeometryCompression
G.3.12 HelloUniverse
G.3.13 LOD
G.3.14 Lightwave
G.3.15 ModelClip
G.3.16 Morphing
G.3.17 ObjLoad
G.3.18 OffScreenCanvas3D
G.3.19 OrientedShape3D
G.3.20 PackageInfo
G.3.21 PickTest
G.3.22 PickText3D
G.3.23 PlatformGeometry
G.3.24 PureImmediate
G.3.25 ReadRaster
G.3.26 Sound
G.3.27 SphereMotion
G.3.28 SplineAnim
G.3.29 Text2D
G.3.30 Text3D
G.3.31 TextureByReference
G.3.32 TextureTest
G.3.33 TickTockCollision
G.3.34 TickTockPicking
G.3.35 VirtualInputDevice



Copyright © 2000, Sun Microsystems, Inc. All rights reserved.