Building the Model s Scene Graph


Managing the Model

Figure 16-21 shows PropManager's methods.

Figure 16-21. PropManager methods


There are four main tasks carried out by a PropManager object (indicated in Figure 16-21 with the same numbering scheme):

  1. It loads the specified model, scales to a standard size, and rotates the model if it's been saved as a 3D Studio Max (3DS) file.

  2. It loads a coords datafile if requested and applies the translations, rotations, and scaling values in that file to the model.

  3. It makes the top-level transformGroup for the model available.

    In this program, the subgraph is added to the scene by WrapLoader3D.


  4. At runtime, the PropManager object accepts commands to modify the model's position, orientation, and size, causing alterations to the model's scene graph.

    In this application, these commands come from the GUI, via WrapLoader3D.




Killer Game Programming in Java
Killer Game Programming in Java
ISBN: 0596007302
EAN: 2147483647
Year: 2006
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net