HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
The Java 3D API, an exciting new part of the JavaMedia suite of APIs, enables the creation of three-dimensional graphics applications and Internet-based 3D applets. It gives developers high-level constructs for creating and manipulating 3D geometry and for building the structures used in rendering that geometry. With Java 3D, developers can efficiently define and render very large virtual worlds. Moreover, in line with Java's "write once, run anywhere" vision, applications written using Java 3D can run on a wide range of platforms and systems and are adapted for use on the Internet.
This book represents the definitive Java 3D API specification, providing authoritative and detailed descriptions of each element of the API. It offers an informative overview of Java 3D, comprehensive instructions for "scene graph" definition and construction, and a detailed description of the Java 3D View Model, an innovative model enabling applications to be displayed on a wide array of devices.
The book also covers: input devices, such as six-degrees-of-freedom trackers; picking mechanisms; behaviors and interpolators for animating objects; and audio capabilities. The Java 3D Execution and Rendering Model is described in depth, including the immediate, retained, and compiled-retained modes.
Comprehensive and definitive, this book is an essential reference for any Java programmer interested in entering the exciting world of three-dimensional Internet applications.
Preface.
1. Introduction to Java 3D.
Goals.
Programming Paradigm.
The Scene Graph Programming Model.
Rendering Modes.
Extensibility.
High Performance.
Layered Implementation.
Target Hardware Platforms.
Support for Building Applications and Applets.
Browsers.
Games.
Overview of Java 3D Object Hierarchy.
Structuring the Java 3D Program.
Java 3D Application Scene Graph.
Recipe for a Java 3D Program.
HelloUniverse: A Sample Java 3D Program.
Scene Graph Structure.
Spatial Separation.
State Inheritance.
Rendering.
Scene Graph Objects.
Node Objects.
NodeComponent Objects.
Scene Graph Superstructure Objects.
VirtualUniverse Object.
Locale Object.
Scene Graph Viewing Objects.
Canvas3D Object.
Screen3D Object.
View Object.
PhysicalBody Object.
PhysicalEnvironment Object.
The Virtual Universe.
Establishing a Scene.
Loading a Virtual Universe.
Coordinate Systems.
High-Resolution Coordinates.
Java 3D High-Resolution Coordinates.
Java 3D Virtual World Coordinates.
Details of High-Resolution Coordinates.
API for Superstructure Objects.
VirtualUniverse Object.
Locale Object.
HiResCoord Object.
Group Node.
BranchGroup Node.
TransformGroup Node.
OrderedGroup Node.
DecalGroup Node.
Switch Node.
SharedGroup Node.
Leaf Node.
Shape3D Node.
BoundingLeaf Node.
Background Node.
Clip Node.
Fog Node.
ExponentialFog Node.
LinearFog Node.
Light Node.
AmbientLight Node.
DirectionalLight Node.
PointLight Node.
SpotLight Node.
Sound Node.
BackgroundSound Node.
PointSound Node.
ConeSound Node.
Soundscape Node.
ViewPlatform Node.
Behavior Node.
Morph Node.
Link Node.
Sharing Subgraphs.
SharedGroup Node.
Link Leaf Node.
Cloning Subgraphs.
References to Node Component Objects.
References to Other Scene Graph Nodes.
Dangling References.
Subclassing Nodes.
NodeReferenceTable Object.
Example User Behavior Node.
Node Component Objects: Attributes.
Appearance Object.
ColoringAttributes Object.
LineAttributes Object.
PointAttributes Object.
PolygonAttributes Object.
RenderingAttributes Object.
TextureAttributes Object.
TransparencyAttributes Object.
Material Object.
Texture Object.
Texture2D Object.
Texture3D Object.
TexCoordGeneration Object.
MediaContainer Object.
AuralAttributes Object.
ImageComponent Object.
ImageComponent2D Object.
ImageComponent3D Object.
DepthComponent Object.
DepthComponentFloat Object.
DepthComponentInt Object.
DepthComponentNative Object.
Bounds Object.
BoundingBox Object.
BoundingSphere Object.
BoundingPolytope Object.
Transform3D Object.
Node Component Objects: Geometry.
GeometryArray Object.
PointArray Object.
LineArray Object.
TriangleArray Object.
QuadArray Object.
GeometryStripArray Object.
LineStripArray Object.
TriangleStripArray Object.
TriangleFanArray Object.
IndexedGeometryArray Object.
IndexedPointArray Object.
IndexedLineArray Object.
IndexedTriangleArray Object.
IndexedQuadArray Object.
IndexedGeometryStripArray Object.
IndexedLineStripArray Object.
IndexedTriangleStripArray Object.
IndexedTriangleFanArray Object.
CompressedGeometry Object.
CompressedGeometryHeader Object.
Raster Object.
Font3D Object.
FontExtrusion Object.
Text3D Geometry Object.
Math Component Objects.
Tuple Objects.
Matrix Objects.
Why a New Model?
The Physical Environment Influences the View.
Separation of Physical and Virtual.
The Virtual World.
The Physical World.
The Objects That Define the View.
ViewPlatform: A Place in the Virtual World.
Moving Through the Virtual World.
Dropping In on a Favorite Place.
View Attach Policy.
Associating Geometry with a ViewPlatform.
Generating a View.
Composing Model and Viewing Transformations.
Multiple Locales.
A Minimal Environment.
The View Object.
Projection Policy.
Clip Policies.
Projection and Clip Parameters.
Frame Start Time and Duration.
Scene Antialiasing.
Depth Buffer.
The Screen3D Object.
The Canvas3D Object.
Window SystemProvided Parameters.
Other Canvas3D Parameters.
The PhysicalBody Object.
The PhysicalEnvironment Object.
Behavior Object.
Code Structure.
WakeupCondition Object.
WakeupCriterion Object.
Composing WakeupCriterion Objects.
Composing Behaviors.
Scheduling.
How Java 3D Performs Execution Culling.
The Behavior API.
The Behavior Node.
WakeupCondition Object.
The WakeupCriterion Objects.
Interpolator Behaviors.
Mapping Time to Alpha.
Acceleration of Alpha.
The Alpha Class.
The Interpolator Base Class.
PositionInterpolator Object.
RotationInterpolator Object.
ColorInterpolator Object.
ScaleInterpolator Object.
SwitchValueInterpolator Object.
TransparencyInterpolator Object.
PositionPathInterpolator Object.
RotPosPathInterpolator Object.
RotPosScalePathInterpolator Object.
RotationPathInterpolator Object.
Level-of-Detail Behaviors.
LOD Object.
DistanceLOD Object.
Billboard Behavior.
InputDevice Interface.
The Abstract Interface.
Instantiating and Registering a New Device.
Sensors.
Using and Assigning Sensors.
Behind the (Sensor) Scenes.
The Sensor Object.
The SensorRead Object.
Picking.
SceneGraphPath Object.
BranchGroup Node and Locale Node Pick Methods.
PickShape Object.
PickPoint Object.
PickRay Object.
PickSegment Object.
AudioDevice Interface.
Initialization.
Audio Playback.
Device-Driver-Specific Data.
Instantiating and Registering a New Device.
Three Major Rendering Modes.
Immediate Mode.
Retained Mode.
Compiled-Retained Mode.
Instantiating the Render Loop.
An Application-Level Perspective.
Retained and Compiled-Retained Rendering Modes.
Two Styles of Immediate-Mode Rendering.
Pure Immediate-Mode Rendering.
Mixed-Mode Rendering.
Canvas3D Methods.
API for Immediate Mode.
GraphicsContext3D.
Tuple Objects.
Tuple2f Class.
Tuple3b Class.
Tuple3d Class.
Tuple3f Class.
Tuple4b Class.
Tuple4d Class.
Tuple4f Class.
AxisAngle4d Class.
AxisAngle4f Class.
GVector Class.
Matrix Objects.
Matrix3f Class.
Matrix3d Class.
Matrix4f Class.
Matrix4d Class.
GMatrix Class.
Compression.
Decompression.
Appendix Organization.
Generalized Triangle Strip.
Generalized Triangle Mesh.
Position Representation and Quantization.
Color Representation and Quantization.
Normal Representation and Quantization.
Normals as Indices.
Normal Encoding Parameterization.
Modified Huffman Encoding.
Geometry Compression Commands.
Bit Layout of Geometry Decompression Commands.
Geometry Decompression Command Bit Details.
NOP.
setState.
setTable.
meshBufferReference.
Position Subcommand.
Color Subcommand.
Normal Subcommand.
vertex.
normal.
color.
Semantics of Geometry Decompression Commands.
Header and Body to Variable-Length Command.
Variable-Length Command to Command.
Delta Position to Position.
Delta Color to Color.
Encoded Delta Normal to Encoded Normal.
Encoded Normal to Rectilinear Normal.
Semantics of Vertices.
Command to Vertex.
Vertex to Intermediate Triangle.
Intermediate Triangle to Final Triangle.
Outline of Geometry Process.
Compressing Geometry Data.
Convert to Generalized Mesh Format.
Position.
Normals.
Colors.
Collect Delta Code Statistics.
Position Delta Code Statistics.
Color Delta Code Statistics.
Normal Delta Code Statistics.
Assign Huffman Tags.
Assemble the Pieces into a Bit Stream.
An Overview of the Java 3D View Model.
Physical Environments and Their Effects.
A Head-Mounted Example.
A Room-Mounted Example.
Impact of Head Position and Orientation on the Camera.
The Coordinate Systems.
Room-Mounted Coordinate Systems.
Head-Mounted Coordinate Systems.
The ViewPlatform Object.
The View Object.
View Policy.
Screen Scale Policy.
Window Eyepoint Policy.
Monoscopic View Policy.
Sensors and Their Location in the Virtual World.
The Screen3D Object.
Screen3D Calibration Parameters.
Accessing and Changing Head Tracker Coordinates.
The Canvas3D Object.
Scene Antialiasing.
Accessing and Modifying an Eye¹s Image Plate Position.
Canvas Width and Height.
The PhysicalBody Object.
The PhysicalEnvironment Object.
Viewing in Head-Tracked Environments.
A Room-Mounted Display with Head Tracking.
A Head-Mounted Display with Head Tracking.
Compatibility Mode.
Overview of the Camera-Based View Model.
Using the Camera-Based View Model.
BadTransformException.
CapabilityNotSetException.
DanglingReferenceException.
IllegalSharingException.
MultipleParentException.
RestrictedAccessException.
SceneGraphCycleException.
SingularMatrixException.
SoundException.
Fog Equations.
Lighting Equations.
Sound Equations.
Headphone Playback Equations.
Speaker Playback Equations.
Texture Mapping Equations.
Texture Lookup.
Texture Application.
VRML 1.0.
Mapping VRML 1.0 Files onto Java 3D Objects.
A VRML 1.0 Browsing Environment.
VRML 2.0.
VRML Support Requires a VRML Runtime Environment.
An Approach.
A Browser.
Optimizing for Viewing versus Editing.
This document describes the Javao 3D API and presents some details on the implementation of the API. This specification is not intended as a programmeris guide. The programmeris guide will be written after the specification has been finalized.
This specification is written for 3D graphics application programmers. We assume that the reader has at least a rudimentary understanding of computer graphics. This includes familiarity with the essentials of computer graphics algorithms as well as familiarity with basic graphics hardware and associated terminology.
This specification is intended to be used in conjunction with the Java*3D reference guide, an online, browser-accessible, javadoc-generated API reference.
The following style conventions are used in this specification:
Java*3D uses the following programming conventions:
We gratefully acknowledge Warren Dale for writing the Sound API portion of this specification, Daniel Petersen for writing the scene graph sharing portion of the specification, and Bruce Bartlett for his assistance with the editing, formatting, and indexing of the specification.
We thank the Java*3D partners for their help in defining the Java*3D API. The Java*3D partner companies include Silicon Graphics, Inc., Intel Corporation, Apple Computer, Inc., and Sun Microsystems, Inc.
We also thank the many individuals and companies for their comments and suggestions on the successive drafts of this specification.
Henry Sowizral
Kevin Rushforth
Michael Deering
Sun Microsystems
November 1997