Java 3DTM API Specification

Version 1.1.2, June 1999



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 Scene Graph Basics

2.1 Scene Graph Structure
2.1.1 Spatial Separation
2.1.2 State Inheritance
2.1.3 Rendering
2.2 Scene Graph Objects
2.2.1 Node Objects
2.2.2 NodeComponent Objects
2.3 Scene Graph Superstructure Objects
2.3.1 VirtualUniverse Object
2.3.2 Locale Object
2.4 Scene Graph Viewing Objects
2.4.1 Canvas3D Object
2.4.2 Screen3D Object
2.4.3 View Object
2.4.4 PhysicalBody Object
2.4.5 PhysicalEnvironment Object

3 Scene Graph Superstructure

3.1 The Virtual Universe
3.2 Establishing a Scene
3.3 Loading a Virtual Universe
3.4 Coordinate Systems
3.5 High-resolution Coordinates
3.5.1 Java 3D High-resolution Coordinates
3.5.2 Java 3D Virtual World Coordinates
3.5.3 Details of High-resolution Coordinates
3.6 API for Superstructure Objects
3.6.1 VirtualUniverse Object
3.6.2 Locale Object
3.6.3 HiResCoord Object

4 Group Node Objects

4.1 Group Node
4.2 BranchGroup Node
4.3 TransformGroup Node
4.4 OrderedGroup Node
4.5 DecalGroup Node
4.6 Switch Node
4.7 SharedGroup Node

5 Leaf Node Objects

5.1 Leaf Node
5.2 Shape3D Node
5.3 BoundingLeaf Node
5.4 Background Node
5.5 Clip Node
5.6 Fog Node
5.6.1 ExponentialFog Node
5.6.2 LinearFog Node
5.7 Light Node
5.7.1 AmbientLight Node
5.7.2 DirectionalLight Node
5.7.3 PointLight Node
5.7.4 SpotLight Node
5.8 Sound Node
5.8.1 BackgroundSound Node
5.8.2 PointSound Node
5.8.3 ConeSound Node
5.9 Soundscape Node
5.10 ViewPlatform Node
5.11 Behavior Node
5.12 Morph Node
5.13 Link Node

6 Reusing Scene Graphs

6.1 Sharing Subgraphs
6.1.1 SharedGroup Node
6.1.2 Link Leaf Node
6.2 Cloning Subgraphs
6.2.1 References to Node Component Objects
6.2.2 References to Other Scene Graph Nodes
6.2.3 Dangling References
6.2.4 Subclassing Nodes
6.2.5 NodeReferenceTable Object
6.2.6 Example User Behavior Node

7 Node Component Objects

7.1 Node Component Objects: Attributes
7.1.1 Appearance Object
7.1.2 ColoringAttributes Object
7.1.3 LineAttributes Object
7.1.4 PointAttributes Object
7.1.5 PolygonAttributes Object
7.1.6 RenderingAttributes Object
7.1.7 TextureAttributes Object
7.1.8 TransparencyAttributes Object
7.1.9 Material Object
7.1.10 Texture Object
7.1.11 Texture2D Object
7.1.12 Texture3D Object
7.1.13 TexCoordGeneration Object
7.1.14 MediaContainer Object
7.1.15 AuralAttributes Object
7.1.16 ImageComponent Object
7.1.17 ImageComponent2D Object
7.1.18 ImageComponent3D Object
7.1.19 DepthComponent Object
7.1.20 DepthComponentFloat Object
7.1.21 DepthComponentInt Object
7.1.22 DepthComponentNative Object
7.1.23 Bounds Object
7.1.24 BoundingBox Object
7.1.25 BoundingSphere Object
7.1.26 BoundingPolytope Object
7.1.27 Transform3D Object
7.2 Node Component Objects: Geometry
7.2.1 GeometryArray Object
7.2.2 PointArray Object
7.2.3 LineArray Object
7.2.4 TriangleArray Object
7.2.5 QuadArray Object
7.2.6 GeometryStripArray Object
7.2.7 LineStripArray Object
7.2.8 TriangleStripArray Object
7.2.9 TriangleFanArray Object
7.2.10 IndexedGeometryArray Object
7.2.11 IndexedPointArray Object
7.2.12 IndexedLineArray Object
7.2.13 IndexedTriangleArray Object
7.2.14 IndexedQuadArray Object
7.2.15 IndexedGeometryStripArray Object
7.2.16 IndexedLineStripArray Object
7.2.17 IndexedTriangleStripArray Object
7.2.18 IndexedTriangleFanArray Object
7.2.19 CompressedGeometry Object
7.2.20 CompressedGeometryHeader Object
7.2.21 Raster Object
7.2.22 Font3D Object
7.2.23 FontExtrusion Object
7.2.24 Text3D Geometry Object
7.3 Math Component Objects
7.3.1 Tuple Objects
7.3.2 Matrix Objects

8 View Model

8.1 Why a New Model?
8.1.1 The Physical Environment Influences the View
8.2 Separation of Physical and Virtual
8.2.1 The Virtual World
8.2.2 The Physical World
8.3 The Objects That Define the View
8.4 ViewPlatform: A Place in the Virtual World
8.4.1 Moving Through the Virtual World
8.4.2 Dropping In on a Favorite Place
8.4.3 View Attach Policy
8.4.4 Associating Geometry with a ViewPlatform
8.5 Generating a View
8.5.1 Composing Model and Viewing Transformations
8.5.2 Multiple Locales
8.6 A Minimal Environment
8.7 The View Object
8.7.1 Projection Policy
8.7.2 Clip Policies
8.7.3 Projection and Clip Parameters
8.7.4 Frame Start Time, Duration, and Number
8.7.5 View Traversal and Behavior Scheduling
8.7.6 Scene Antialiasing
8.7.7 Depth Buffer
8.8 The Screen3D Object
8.9 The Canvas3D Object
8.9.1 Window System-Provided Parameters
8.9.2 Other Canvas3D Parameters
8.9.3 GraphicsConfig-Temp-late-3D Object
8.10 The PhysicalBody Object
8.11 The PhysicalEnvironment Object

9 Behaviors and Interpolators

9.1 Behavior Object
9.1.1 Code Structure
9.1.2 WakeupCondition Object
9.1.3 WakeupCriterion Object
9.1.4 Composing WakeupCriterion Objects
9.2 Composing Behaviors
9.3 Scheduling
9.4 How Java 3D Performs Execution Culling
9.5 The Behavior API
9.5.1 The Behavior Node
9.5.2 WakeupCondition Object
9.5.3 The WakeupCriterion Objects
9.6 Interpolator Behaviors
9.6.1 Mapping Time to Alpha
9.6.2 Acceleration of Alpha
9.6.3 The Alpha Class
9.6.4 The Interpolator Base Class
9.6.5 PositionInterpolator Object
9.6.6 RotationInterpolator Object
9.6.7 ColorInterpolator Objectpl
9.6.8 ScaleInterpolator Object
9.6.9 SwitchValueInterpolator Object
9.6.10 TransparencyInterpolator Object
9.6.11 PathInterpolator Object
9.6.12 PositionPathInterpolator Object
9.6.13 RotPosPathInterpolator Object
9.6.14 RotPosScalePathInterpolator Object
9.6.15 RotationPathInterpolator Object
9.7 Level-of-Detail Behaviors
9.7.1 LOD Object
9.7.2 DistanceLOD Object
9.8 Billboard Behavior

10 Input Devices and Picking

10.1 InputDevice Interface
10.1.1 The Abstract Interface
10.1.2 Instantiating and Registering a New Device
10.2 Sensors
10.2.1 Using and Assigning Sensors
10.2.2 Behind the (Sensor) Scenes
10.2.3 The Sensor Object
10.2.4 The SensorRead Object
10.3 Picking
10.3.1 SceneGraphPath Object
10.3.2 BranchGroup Node and Locale Node Pick Methods
10.3.3 PickShape Object
10.3.4 PickBounds Object
10.3.5 PickPoint Object
10.3.6 PickRay Object
10.3.7 PickSegment Object

11 Audio Devices

11.1 AudioDevice Interface
11.1.1 Initialization
11.1.2 Audio Playback
11.1.3 Device-Driver-Specific Data
11.2 AudioDevice3D Interface
11.3 Instantiating and Registering a New Device

12 Execution and Rendering Model

12.1 Three Major Rendering Modes
12.1.1 Immediate Mode
12.1.2 Retained Mode
12.1.3 Compiled-retained Mode
12.2 Instantiating the Render Loop
12.2.1 An Application-level Perspective
12.2.2 Retained and Compiled-retained Rendering Modes

13 Immediate-Mode Rendering

13.1 Two Styles of Immediate-Mode Rendering
13.1.1 Pure Immediate-Mode Rendering
13.1.2 Mixed-Mode Rendering
13.2 Canvas3D Methods
13.3 API for Immediate Mode
13.3.1 GraphicsContext3D

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 Tuple4b Class
A.1.7 Tuple4d Class
A.1.8 Tuple4f Class
A.1.9 AxisAngle4d Class
A.1.10 AxisAngle4f Class
A.1.11 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
B.12.2 setState
B.12.3 setTable
B.12.4 mbr (meshBufferReference)
B.12.5 Position Sub-instruction
B.12.6 Color Sub-instruction
B.12.7 Normal Sub-instruction
B.12.8 vertex
B.12.9 setNormal
B.12.10 setColor
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 Camera
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 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 Position
C.7.3 Canvas Width and Height
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


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