Hi,

just out of interest: the source code for Viewer shows lots of TODOs in the
Constructor!? Why that? Not that I am in need of the features that are left to
do, but I was wondering if the class-files are missing this feature as well or
if it is implemented there.

 /**
  * Creates a default viewer object. The default values are used to create
  * the PhysicalEnvironment.  The View is created
  * with a front clip distance of 0.1f and a back clip distance of 10.0f.
  *
  * @param userCanvas The Canavs3D object to render to.  If this object is
  *  null a single RGB, double buffered and depth buffered Canvas3D
  *  object is created.
  * @param userConfig The URL of the user configuration file used to
  *  initialize the PhysicalBody object.  If null, the default PhysicalBody
  *  values are used.
  */
 public Viewer(Canvas3D userCanvas, URL userConfig) {

  // Only one PhysicalBody per Universe.
  if (physicalBody == null) {
   physicalBody = new PhysicalBody();
   if (userConfig != null) {
    // TODO:open config file and set PhysicalBody attr's here
   }
  }

  // Only one PhysicalEnvironment per Universe.
  if (physicalEnvironment == null) {
   physicalEnvironment = new PhysicalEnvironment();
   // TODO:open system config file and set PhysicalEnvironment here
  }

  // Create Canav3D object if none was passed in.
  if (userCanvas == null) {
   // Canvas3D should be array, determined by GraphicsEnvironment
   // and config files
     GraphicsConfiguration config =
  SimpleUniverse.getPreferredConfiguration();
     canvas = new Canvas3D(config);

   // If no canvas was provided need to also create the Frame
   // and Panel for the Canvas3D.
   j3dFrame = new Frame();
   j3dFrame.setLayout(new BorderLayout());
   // TODO: want config option to allow for full screen.
   j3dFrame.setSize(256, 256);

   // Put the Canvas3D into a Panel.
   j3dPanel = new Panel();
   j3dPanel.setLayout(new BorderLayout());
   j3dPanel.add("Center", canvas);

   j3dFrame.add("Center", j3dPanel);
   j3dFrame.show();

   // Add windowListener to detect window close event.
   j3dFrame.addWindowListener(new WindowAdapter()
   {
    public void windowClosing(WindowEvent winEvent)
    {
     System.exit(0);
    }
   });
  }
  else
   canvas = userCanvas;

  // Create a View and attach the Canvas3D and the physical
  // body and environment to the view.
  view = new View();

  view.addCanvas3D(canvas);
  view.setPhysicalBody(physicalBody);
  view.setPhysicalEnvironment(physicalEnvironment);
 }

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to