About this book
_______________________________________________________________
Java 3D is a client-side Java application programming interface (API) developed at Sun Microsystems for rendering interactive 3D graphics using Java. Using Java 3D you will be able to develop richly interactive 3D applications, ranging from immersive games to scientific visualization applications.
Who should read it?
Java 3D Programming is aimed at intermediate to experienced Java developers. Previous experience in graphics programming (OpenGL and Swing, for example) will be very useful, but it's not a prerequisite. No book stands alone and you should make good use of the many online resources and books listed in appendix B and the bibliography. Readers new to Java 3D should definitely download Sun's excellent (free) Java 3D tutorial. This book is intended to serve as a companion to the Sun API documentation and the Java 3D tutorial.
How is it organized?
The book has 18 chapters, plus three appendices and a bibliography. Each chapter is fairly self-contained or explicitly references related chapters, allowing you to focus quickly on relevant material for your problem at hand. I have ordered the material so that, if you were starting a project from scratch, progressing in the book would mirror the design questions you would face as you worked through your design study and development efforts. More commonly used material is, in general, closer to the beginning of the book.
Chapter 1 focuses on getting started with Java 3D, system requirements, running the examples in the book, plus a look at the strengths and weaknesses of Java 3D.
Chapter 2 introduces some of the fundamentals of 3D graphics programming, such as projection of points from 3D to 2D coordinates, lighting, and hidden surface removal.
Chapter 3 gets you started with Java 3D programming, from setting up your development environment and resources to running your first application.
Chapter 4 explains the fundamental data structure in Java 3D, the scenegraph. Aspects of good scenegraph design are described using an example application for discussion.
Chapter 5 is a reference to Java 3D's scenegraph nodes, along with usage instructions and examples.
Chapter 6 explains the elements of the Java 3D scenegraph rendering model and guides you in your choice of VirtualUniverse configuration.
Chapter 7 takes a step back and examines data models for 3D applications. Choosing a suitable data model involves understanding your interaction and performance requirements.
Chapter 8 is a reference to creating geometry to be rendered by Java 3D.
Chapter 9 covers the elements of the Java 3D Appearance class, used to control the rendered appearance of the geometric primitives in your scene.
Chapter 10 illuminates the Java 3D lighting model and shows you how to create powerful lighting for your scene.
Chapter 11 introduces the Java 3D behavior model, which allows you to attach code to the objects in your scene. Examples illustrate both keyboard and mouse behaviors for graphical user interfaces.
Chapter 12 expands upon the discussion of behaviors, covering the Interpolator behaviors, used to control geometry attributes using the Alpha class.
Chapter 13 describes how to write your own custom behaviors and register them with Java 3D for invocation. Example behaviors for debugging and complex physical animation as well as others are presented.
Chapter 14 explains how to increase the realism of your scenes by applying bitmaps to your geometry using the process of texture mapping.
Chapter 15 highlights some of the utility classes provided with Java 3D for operations such as triangulation and loading of input data.
Chapter 16 delves into more techniques valuable for interacting with 3D scenes, object interaction using the mouse for selection of 3D objects, and performing collision detection between 3D objects.
Chapter 17 shows, through example, how to build Java 3D applications that use the Swing packages for 2D user interface elements, and can be distributed as Java applets for use from a web browser.
Chapter 18 goes low-level to explain some of the implementation details of the Java 3D API. The aim is to give you a greater appreciation for what is going on behind the scenes and help you optimize your applications.
Appendix A cross-references all the examples by chapter and includes instructions for downloading, installing, and running the example code from the publisher's web site.
Appendix B includes a comprehensive listing of programming and graphics resources online. Print references are provided in the bibliography.
Appendix C explains the Primitive utility class, its geometry cache, and the GeomBuffer class, along with tips and caveats.
Source code
The book contains over 30,000 lines of example code, including some reusable library code that I hope will contribute to the collective understanding of the Java 3D community. Code of particular interest is shown in boldface. Appendix A contains a list of the example Java 3D applications and applets developed for this book, as well as detailed instructions for running the examples. The code itself is identified in the text by an initial reference to its location at http://www.manning.com/selman, the Manning web site for this book.
Typographical conventions
Italic typeface is used to introduce new terms.
Courier typeface is used to denote code samples as well as elements and attributes, method names, classes, interfaces, and other identifiers.
Courier bold typeface is used to denote code of special interest. Code line continuations are indented.
How to use the book
I have tried to organize many of the topics in the book in an order appropriate for developers designing and building a new Java 3D application. I would suggest initially reading or skimming the chapters sequentially to get an overall feel for the design of your application, and then returning to specific chapters and examples for reference material as required. Please note that the example source code for the book is provided under the GNU General Public License (GPL) (http://www.gnu.org/licenses/licenses.html). I encourage you to modify and distribute the source code in accordance with the spirit of open source and the GPL license.
If you still need help or have questions for the author, please read about the unique Author Online support that is offered from the publisher's web site.
Author Online
Purchase of Java 3D Programming includes free access to a private web forum run by Manning Publications where you can make comments about the book, ask technical questions, and receive help from the author and from other users. To access the forum and subscribe to it, point your web browser to http://www.manning.com/selman. This page provides information on how to get on the forum once you are registered, what kind of help is available, and the rules of conduct on the forum.
Manning's commitment to readers is to provide a venue where a meaningful dialog between individual readers and between readers and the author can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the AO remains voluntary (and unpaid). We suggest you try asking the author some challenging questions, lest his interest stray!
The Author Online forum and the archives of previous discussions will be accessible from the publisher's web site as long as the book is in print.