You are previewing Interactive Web-Based Virtual Reality with Java 3D.
O'Reilly logo
Interactive Web-Based Virtual Reality with Java 3D

Book Description

Interactive Web-Based Virtual Reality with Java 3D provides both advanced and novice programmers with comprehensive, detailed coverage of all of the important issues in Java 3D. This essential book delivers illustrations of essential keywords, syntax, and methods to provide an easy-to-read learning experience for the reader.

Table of Contents

  1. Copyright
  2. Preface
  3. Virtual Reality and Java 3D
    1. INTRODUCTION
    2. INTERACTIVE 3D COMPUTER GRAPHICS
    3. VIRTUAL REALITY
    4. WEB-BASED VIRTUAL REALITY
    5. VRML
    6. JAVA 3D
    7. MIXED REALITY
    8. SUMMARY
  4. REFERENCES
  5. Java 3D Overview
    1. INTRODUCTION
    2. GETTING STARTED
    3. A SIMPLE JAVA 3D PROGRAM FOR A RotatingCube
    4. SCENE GRAPH BASICS
    5. SCENE GRAPH FOR THE RotatingCube
    6. VIEW BRANCH FOR THE RotatingCube
    7. CONTENT BRANCH FOR THE RotatingCube
    8. BRANCH GROUP
    9. TRANSFORM GROUP
    10. SIMPLE UNIVERSE
    11. DIFFERENCE BETWEEN JAVA 3D APPLET AND APPLICATION
    12. SUMMARY
  6. REFERENCES
  7. Geometry Objects
    1. INTRODUCTION
    2. SHAPE3D
    3. GeometryArray CLASS
    4. GeometryStripArray
    5. IndexedGeometryArray
    6. IndexedStripArray
    7. CREATING AN OBJECT USING MULTIPLE GEOMETRY CLASSES
    8. UTILITY CLASS
    9. SUMMARY
  8. REFERENCES
  9. Appearance Objects
    1. INTRODUCTION
    2. PointAttributes
    3. LineAttributes
    4. PolygonAttributes
    5. ColoringAttributes
    6. TransparencyAttributes
    7. RenderingAttributes
    8. MATERIAL
    9. SUMMARY
  10. REFERENCES
  11. Textures
    1. INTRODUCTION
    2. TEXTURE LOADING
    3. TEXTURE COORDINATES
    4. TEXTURE PROPERTIES
    5. TEXTURE ATTRIBUTES
    6. TEXTURE COORDINATE GENERATION
    7. MULTILEVEL TEXTURING
    8. MultiTexture
    9. TEXTURE IN APPLETS
    10. SUMMARY
  12. REFERENCES
  13. Lighting, Fog, and Background
    1. INTRODUCTION
    2. MATERIAL
    3. AMBIENT LIGHT
    4. DIRECTIONAL LIGHT
    5. POINT LIGHT
    6. SPOT LIGHT OR CONE LIGHT
    7. LIGHT SCOPES
    8. FOG
    9. BACKGROUND
    10. SUMMARY
  14. REFERENCES
  15. Animation Objects
    1. INTRODUCTION
    2. BEHAVIOR AND ANIMATION
    3. ALPHA OBJECT
    4. INTERPOLATOR OBJECT
    5. PositionInterpolator
    6. PositionPathInterpolator
    7. RotationInterpolator
    8. RotationPathInterpolator
    9. RotPosPathInterpolator
    10. ScaleInterpolator
    11. RotPosScalePathInterpolator
    12. SwitchValueInterpolator
    13. TransparencyInterpolator
    14. ColorInterpolator
    15. BILLBOARD
    16. LEVEL OF DETAIL (LOD)
    17. MORPH
    18. SUMMARY
  16. REFERENCES
  17. Interaction
    1. INTRODUCTION
    2. BEHAVIOR CLASS
    3. BOUNDING REGION
    4. WAKEUP CONDITION AND CRITERION
    5. KEYBOARD AND MOUSE EVENTS
    6. POSTED EVENTS
    7. COLLISION EVENTS
    8. ELAPSED TIME AND FRAME EVENTS
    9. EVENTS DUE TO CHANGES IN POSITIONS AND TRANSFORMS
    10. PLATFORM ENTRY AND EXIT EVENTS
    11. SENSOR ENTRY AND EXIT EVENTS
    12. COMBINING DIFFERENT WAKEUP CRITERIA
    13. SUMMARY
  18. REFERENCES
  19. Chapter Picking
    1. INTRODUCTION
    2. PickRotateBehavior, PickTranslateBehavior, AND PickZoomBehavior
    3. PICKING CLASSES IN GENERAL
    4. CUSTOMIZING PICKING BEHAVIOR CLASS
    5. PICKTOOL
    6. POINT AND RAY PICKING SHAPE
    7. RAY SEGMENT PICKING SHAPE
    8. CONE PICKING SHAPE
    9. CYLINDER PICKING SHAPE
    10. PICKING OBJECTS WITHIN A SPECIFIED BOUND FROM A CERTAIN POSITION
    11. PICKING IN A VIRTUAL INSTRUMENT PANEL
    12. SUMMARY
  20. REFERENCES
  21. Navigation, Input Devices, and Collision
    1. INTRODUCTION
    2. KEYBOARD NAVIGATION USING KeyBoardBehavior
    3. USER DEFINED KEYBOARD NAVIGATION
    4. NAVIGATION USING MOUSE UTILITY CLASS
    5. USER-DEFINED MOUSE NAVIGATION
    6. INPUT DEVICE
    7. SENSORS
    8. COLLISIONS
    9. SUMMARY
  22. REFERENCES
  23. Multiple Views
    1. INTRODUCTION
    2. VIEW MODEL
    3. SINGLE VIEW
    4. MULTIPLE VIEWS
    5. VIEW ATTACH POLICY AND ACTIVATION RADIUS
    6. PROJECTION POLICY
    7. CLIP DISTANCE
    8. WINDOW EYEPOINT POLICY AND FIELD OF VIEW
    9. CONVENTIONAL CAMERA-BASED VIEW
    10. VISIBILITY, SCREEN SCALE, WINDOW MOVEMENT, AND FRAME CYCLE TIME
    11. Canvas3D
    12. PhysicalBody AND PhysicalEnvironment
    13. EXAMPLE APPLICATIONS
    14. SUMMARY
  24. REFERENCES
  25. Audio
    1. INTRODUCTION
    2. BackgroundSound
    3. PointSound
    4. CONESOUND
    5. AURAL ENVIRONMENT
    6. SUMMARY
  26. REFERENCES
  27. A Web-Based 3D Real Time Oscilloscope Experiment
    1. INTRODUCTION
    2. SYSTEM REFERENCE MODEL AND WORKING PRINCIPLE
    3. SCENE GRAPH AND MAIN APPLET
    4. CONTROL BUTTONS, SLIDERS, KNOBS, AND OTHER OBJECTS
    5. CUSTOM BEHAVIOR
    6. NAVIGATION BEHAVIOR
    7. COLLISION DETECTION BEHAVIOR
    8. PICKING BEHAVIOR
    9. SUMMARY
  28. REFERENCES
  29. Downloading Software
    1. STEP 1: JDK BUNDLE
    2. STEP 2: JCREATOR
    3. STEP 3: JAVA 3D API
  30. Running the Rotating Cube Program
    1. STEP 1: LAUNCH JCREATOR
    2. STEP 2: CREATE WORKSPACE AND PROJECT
    3. STEP 3: ADD JAVA FILES
    4. STEP 4: COPY AND EDIT CODES AND COMPILING
    5. STEP 5: BUILD AND EXECUTE PROGRAM
  31. ViewManager
    1. SWING COMPONENTS
    2. ADDING Canvas3D
    3. ADDING CONTROL PANEL
    4. ADDING CONTROLS
    5. GETTING OPTIMUM WIDTH AND HEIGHT
    6. FRAME CENTERING
    7. GETTING CONFIGURATION FOR Canvas3D
  32. Main Applet for Web-Based 3D Experiment
    1. IMPORTING LIBRARIES
    2. MAIN APPLET FOR CREATING ALL OBJECTS IN LABORATORY
    3. INITIALIZATION FUNCTION FOR MAIN APPLET
    4. DESTROYING FUNCTION FOR MAIN APPLET
    5. LOADING VRML BASED CIRCUIT BOARD OBJECT FOR MAIN APPLET
    6. LOADING PICTURES FOR 3D WALLS AND ENVIRONMENT FOR MAIN APPLET
    7. DEFINIG USUAL FUNCTION FOR KEYBOARD AND MOUSE INPUTS FOR MAIN APPLET
    8. LOADING PICTURES FOR DEFINING TEXTURE ON INSTRUMENTS FOR MAIN APPLET
    9. DEFINING COUNTDOWN TIMER OBJECT FOR GIVING REMAINING TIME FOR MAIN APPLET
    10. ENTRY FOR MAIN APPLET
  33. Scene Graph Implementation for Web-Based 3D Experiment
    1. IMPORTING LIBRARIES
    2. DEFINING CLASS
    3. DEFINING CONSTRUCTOR
    4. OBTAINING HANDLES TO GUI CONTROL
    5. OBTAINING HANDLES TO APPEARANCE
    6. CLEARING PICKING BEHAVIOR OBJECT AFTER SYSTEM EXIT
    7. MAIN SCENE GRAPH CREATION FUNCTION
    8. SETTING UP OF LIGHT SOURCES
    9. ROTATING A TRANSFORM GROUP BY A SPECIFIC ANGLE RELATIVE TO Z-AXIS
    10. MOVING A TRANSFORM GROUP TO SPECIFIC POINT
    11. SCALING A TRNASFORM GROUP WITH SPECIFIC VALUE
  34. Knob Class for Web-Based 3D Experiment
    1. IMPORTING LIBRARIES
    2. DEFINING CLASS FOR CONTROL KNOB
    3. FUNCTION FOR CHANGING ORIENTATION OF KNOB
    4. FUNCTION FOR CHANGING POSITION OF KNOB
  35. Navigation and Collision Detection for Web-Based 3D Experiment
    1. IMPORTING LIBRARIES
    2. DEFINING CLASS FOR NAVIGATION AND COLLISION DETECTION
    3. CONSTRUCTOR OF NAVIGATION AND COLLISION DETECTION FUNCTION
    4. VIEW PLATFORM POSITION INITIALIZATION
    5. SETTING REFERENCE FOR OUTSIDE SCENE
    6. SETTING REFERENCE FOR SPEED CONTROL SLIDER FOR NAVIGATION
    7. PARAMETER INITIALIZATION
    8. FUNCTION FOR CALCULATION OF ROTATION MATRIX FROM ROTATION ANGLE
    9. FUNCTION FOR IMPLEMENTATION OF ROTATION FOR VIEW PLATFORM
    10. FUNCTION FOR IMPLEMENTATION OF TRANSLATION FOR VIEW PLATFORM
    11. FUNCTION FOR IMPLEMENTATION OF TRANSLATION AND ROTATION FOR TRANSFORM GROUP
    12. EVENT INITIALIZATION FUNCTION
    13. KEY EVENTS RESPONSE FUNCTION FOR KEYBOARD NAVIGATION
    14. MAIN EVENTS RESPONSE FUNCTION FOR NAVIGATING AND COLLISION DETECTION
    15. EVENTS FUNCTION FOR NAVIGATION CONTROL PANEL
    16. MOUSE RELEASE EVENTS FUNCTION
    17. FUNCTION FOR MOUSE PRESSED EVENTS FOR IDENTIFYING ICONS ON NAVIGATING PANEL
    18. FUNCTION FOR MOUSE EXIT EVENT
    19. FUNCTION FOR MOUSE ENTRY EVENT
    20. FUNCTION FOR MOUSE CLICK EVENT
    21. FUNCTION FOR MOUSE MOVE EVENT
    22. FUNCTION FOR MOUSE DRAG EVENT
    23. FUNCTION FOR DRAGGING OF SPEED CONTROL SLIDER PANEL
    24. FUNCTION FOR CLICKING MODE BUTTONS ON NAVIGATION PANEL
    25. ANIMATION THREAD CLASS FOR CONTINUOUS MOVEMENT WHILE NAVIGATING ICONS IS HELD OR ANIMATION MODE BUTTON IS CLICKED
  36. Picking for Web–Based 3D Experiment
    1. IMPORTING LIBRARIES
    2. DEFINING CLASS FOR PICKING BEHAVIOR
    3. CONSTRUCTOR FOR PICKING BEHAVIOR
    4. OBTAINING HANDLES TO DISPLAYS OF OSCILLOSCOPE, SIGNAL GENERATOR AND DOOR PANEL
    5. OBTAINING HANDLE TO NAVIGATION PANEL
    6. OBTAINING HANDLES FOR SHOWING REAL-TIME VIDEO ON OSCILLOSCOPE DISPLAY
    7. OBTAINING INITIAL POSITIONS OF CONTROLS ON OSCILLOSCOPE
    8. OBTAINING INITIAL POSITIONS OF CONTROLS ON SIGNAL GENERATOR
    9. OBTAINING INITIAL POSITIONS OF CONTROLS ON DOOR CONTROL
    10. OBTAINING INITIAL KNOB ORIENTATION ANGLES ON OSCILLOSCOPE AND SIGNAL GNERATOR
    11. OBTAINING INITIAL CONNECTING STATUS OF CLIPS
    12. OBTAINING DOOR OPENING OR CLOSING STATUS
    13. CLOSE FUNCTION FOR DISCONNECTING TCP/IP LINKS
    14. INITIALIZING ORIENTATONS AND POSITIONS OF ALL CONTROLS
    15. MAIN INITIALIZATION FUNCTION FOR EVENT DETECTIONS
    16. FUNCTION FOR DETECTING EXISTENCE OF PICKABLE CONTROL WHEN MOUSE IS MOVED
    17. FUNCTION FOR DETERMINING ID OF CONTROL OBJECT BEING PICKED
    18. FUNCTION FOR DETERMINING NEXT KNOB POSITION AFTER MOUSE DRAG AND RELEASE
    19. FUNCTION FOR DETERMINING NEXT SLIDER POSITION AFTER MOUSE DRAG AND RELEASE
    20. CALCULATING MOUSE ANGLE RELATIVE TO KNOB
    21. CALCULATING CHANGE IN MOUSE ANGLE
    22. NORMALIZATING MOUSE ANGLE TO RANGE FROM 0 TO 2PI
    23. LIMITING KNOB ANGLE TO WITHIN A SPECIFIC RANGE
    24. LIMITING CLIP ANGLE TO WITHIN A SPECIFIC RANGE
    25. FUNCTION FOR BUTTON PRESS OR RELEASE EVENTS
    26. MAIN MOUSE RELEASE EVENT FUNCTIONS FOR KNOBS, CLIPS, SLIDERS AND BUTTONS
    27. FUNCTION FOR CLIP CONNECTION EVENT FOR OSCILLOSCOPE TERMINALS
    28. FUNCTION FOR CLIP CONNECTING EVENT FOR SIGNAL GENERATOR TERMINALS
    29. FUNCTION FOR TRIGGER SLIDER FOR OSCILLOSCOPE
    30. GENERAL FUNCTION FOR SETTING POSITION OF TRANSFORMGROUP
    31. GENERAL ROTATION FUNCTION FOR ROTATING TRANSFORMGROUP RELATIVE TO Z-AXIS
    32. MAIN EVENT RESPONSE FUNCTION
    33. FUNCTION FOR TRIGGER POINT OF OSCILLOSCOPE
  37. Program Summary and Screen Capture
  38. About the Authors
  39. Index