The pseudo code for "Atomview" is as follows:
  1. Initialize the Performer/Cave environment before any performer data structures are allocated.
  2. A class is defined to handle the reading and the storage of commandline arguments for use within the program.
  3. Read the command-line arguments.
  4. Start the Cave Processes.
  5. Setup Root-Level DCS's.
  6. Load up the xyz datafiles.
  7. Create one geometric representation per atom type.
    1. get a list of atom DCS's.
    2. For each type of atom, either load in a custom atom geometry from disk (if it can be found and the -default flag was *not* used), or use NewAtom() to generate a custom geometry.
  8. Try to load custom atoms unless explictly told otherwise.
  9. If all attempts to load custom atom geometries fails...create a new atom geometry; append the new atom geometry to the list.
  10. For each atom, assign the proper atom geometry and location.
  11. Create a DCS for each atom so they can be moved independently.
  12. Add that DCS to the main model DCS.
  13. Create labels to identify the mode for the user interface.
  14. Set position for the label in the upper lefthand corner of the display.
  15. This is different depending on whether you are using a Cave, IWall, or Idesk.
  16. Identify the different modes of operation for the user interface.
  17. Change mode of operation if any button was pressed. The four modes are:
    1. Scale Atoms
    2. Scale Model
    3. Navigate
    4. Change Time
  18. If middle or right button is pressed, increment mode.
  19. If left button is pressed, decrement mode.
  20. Kill all of the CAVE subprocesses and Stop CAVE when Esc is pressed.


rectrectrectrectrectrectrectrect