net.jinx.physics.util
Class Main

java.lang.Object
  extended by net.jinx.physics.util.Main
All Implemented Interfaces:
PhysicsGUI

public class Main
extends java.lang.Object
implements PhysicsGUI


Constructor Summary
Main()
           
 
Method Summary
 void displayGUI(Hierarchy h, Scene scene)
           
 java.lang.String[] getVersion()
          Provides the application's current version and the JOGL version used as two Strings.
static java.lang.String getVersionString()
          Provides a String representation of the current version of Vertex Modeler.
static void loadScene(java.io.InputStream in, Scene scene)
          Builds a SceneFactory from a Java source describing a class with the name "SceneFactoryImpl" that is an implementation of VisibleFactory.
static void loadScene(java.lang.String filename, Scene scene)
           
static void loadScene(java.lang.String filename, Scene scene, boolean isResource)
          Builds a SceneFactory from a Java source describing a class with the name "SceneFactoryImpl" that is an implementation of VisibleFactory.
static void main(PhysicsGUI gui, java.lang.String[] args)
          The configurable entry point for the application.
static void main(java.lang.String[] args)
          The main entry point for the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Main

public Main()
Method Detail

getVersionString

public static java.lang.String getVersionString()
Provides a String representation of the current version of Vertex Modeler. This is used by getApplicationTitle().

Returns:
the String describing the version.

getVersion

public java.lang.String[] getVersion()
Provides the application's current version and the JOGL version used as two Strings.

Specified by:
getVersion in interface PhysicsGUI
Returns:
the version String array.

displayGUI

public void displayGUI(Hierarchy h,
                       Scene scene)
Specified by:
displayGUI in interface PhysicsGUI

loadScene

public static void loadScene(java.lang.String filename,
                             Scene scene)
                      throws java.io.IOException,
                             org.codehaus.janino.Scanner.LocatedException,
                             java.lang.ClassNotFoundException,
                             java.lang.InstantiationException,
                             java.lang.IllegalAccessException
Throws:
java.io.IOException
org.codehaus.janino.Scanner.LocatedException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

loadScene

public static void loadScene(java.lang.String filename,
                             Scene scene,
                             boolean isResource)
                      throws java.io.IOException,
                             org.codehaus.janino.Scanner.LocatedException,
                             java.lang.ClassNotFoundException,
                             java.lang.InstantiationException,
                             java.lang.IllegalAccessException
Builds a SceneFactory from a Java source describing a class with the name "SceneFactoryImpl" that is an implementation of VisibleFactory. The configureScene(Scene) method is called and the result is returned. This method uses (and requires) Janino to compile the source.

Parameters:
filename - the name of a file to read the source from.
scene - the Scene that new object should be deposited into.
Throws:
java.io.IOException
org.codehaus.janino.Scanner.LocatedException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

loadScene

public static void loadScene(java.io.InputStream in,
                             Scene scene)
                      throws java.io.IOException,
                             org.codehaus.janino.Scanner.LocatedException,
                             java.lang.ClassNotFoundException,
                             java.lang.InstantiationException,
                             java.lang.IllegalAccessException
Builds a SceneFactory from a Java source describing a class with the name "SceneFactoryImpl" that is an implementation of VisibleFactory. The configureScene(Scene) method is called and the result is returned. This method uses (and requires) Janino to compile the source.

Parameters:
in - the InputStream to read the source from.
scene - the Scene that new object should be deposited into.
Throws:
java.io.IOException
org.codehaus.janino.Scanner.LocatedException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
The main entry point for the application. This is the same as main(new Main(), args).

Throws:
java.lang.Exception

main

public static void main(PhysicsGUI gui,
                        java.lang.String[] args)
                 throws java.lang.Exception
The configurable entry point for the application. This allows you to provide a custom PhysicsGUI object for constructing the GUI components while still using this class to parse the command line arguments. The very end of this method calls the displayGUI method of gui with the resulting Hierarchy configuration data and Scene object.

Parameters:
gui - the PhysicsGUI object to use.
args - the commandline arguments to parse.
Throws:
java.lang.Exception