vrml.external
Class Browser

java.lang.Object
  |
  +--netscape.plugin.Plugin
        |
        +--vrml.external.Browser

public class Browser
extends Plugin


Constructor Summary
Browser()
           
 
Method Summary
 void addRoute(Node fromNode, java.lang.String fromEventOut, Node toNode, java.lang.String toEventIn)
          Add a route between the specified eventOut and eventIn of the given nodes.
 Node[] createVrmlFromString(java.lang.String vrmlSyntax)
          Parse STRING into a VRML scene and return the list of root nodes for the resulting scene.
 void createVrmlFromURL(java.lang.String[] url, Node node, java.lang.String event)
          Tells the browser to load a VRML scene from the passed URL or URLs.
 void deleteRoute(Node fromNode, java.lang.String fromEventOut, Node toNode, java.lang.String toEventIn)
          Delete a route between the specified eventOut and eventIn of the given nodes.
static Browser getBrowser(java.applet.Applet pApplet)
          Return an instance of the Browser class.
static Browser getBrowser(java.applet.Applet pApplet, java.lang.String frameName, int index)
          Return an instance of the Browser class.
 float getCurrentFrameRate()
          Get the current frame rate of the browser, or 0.0 if not available.
 float getCurrentSpeed()
          Get the current velocity of the bound viewpoint in meters/sec, if available, or 0.0 if not.
 java.lang.String getName()
          Get the name of the VRML browser.
 Node getNode(java.lang.String name)
          Get a DEFed node by name.
 java.lang.String getVersion()
          Get the version of the VRML browser.
 java.lang.String getWorldURL()
          Get the URL for the root of the current world, or an empty string if not available.
 void loadURL(java.lang.String[] url, java.lang.String[] parameter)
          Load the given URL with the passed parameters (as described in the Anchor node).
 void replaceWorld(Node[] nodes)
          Replace the current world with the passed array of nodes.
 void setDescription(java.lang.String description)
          Set the description of the current world.
static void startVRwave(Scene scene)
           
static void stopVRwave(Scene scene)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Browser

public Browser()
Method Detail

getName

public java.lang.String getName()
Get the name of the VRML browser.

getVersion

public java.lang.String getVersion()
Get the version of the VRML browser.

getCurrentSpeed

public float getCurrentSpeed()
Get the current velocity of the bound viewpoint in meters/sec, if available, or 0.0 if not.

getCurrentFrameRate

public float getCurrentFrameRate()
Get the current frame rate of the browser, or 0.0 if not available.

getWorldURL

public java.lang.String getWorldURL()
Get the URL for the root of the current world, or an empty string if not available.

replaceWorld

public void replaceWorld(Node[] nodes)
                  throws java.lang.IllegalArgumentException
Replace the current world with the passed array of nodes.

loadURL

public void loadURL(java.lang.String[] url,
                    java.lang.String[] parameter)
Load the given URL with the passed parameters (as described in the Anchor node).

setDescription

public void setDescription(java.lang.String description)
Set the description of the current world. To clear the description, pass an empty string as argument.

createVrmlFromString

public Node[] createVrmlFromString(java.lang.String vrmlSyntax)
                            throws InvalidVrmlException
Parse STRING into a VRML scene and return the list of root nodes for the resulting scene.

createVrmlFromURL

public void createVrmlFromURL(java.lang.String[] url,
                              Node node,
                              java.lang.String event)
Tells the browser to load a VRML scene from the passed URL or URLs. After the scene is loaded, an event is sent to the MFNode eventIn in node NODE named by the EVENT argument.

getNode

public Node getNode(java.lang.String name)
             throws InvalidNodeException
Get a DEFed node by name. Nodes given names in the root scene are available to this method, DEFed nodes in inlines, as well as DEFed nodes returned from createVrmlFromString/URL are not.

addRoute

public void addRoute(Node fromNode,
                     java.lang.String fromEventOut,
                     Node toNode,
                     java.lang.String toEventIn)
              throws java.lang.IllegalArgumentException
Add a route between the specified eventOut and eventIn of the given nodes.

deleteRoute

public void deleteRoute(Node fromNode,
                        java.lang.String fromEventOut,
                        Node toNode,
                        java.lang.String toEventIn)
                 throws java.lang.IllegalArgumentException
Delete a route between the specified eventOut and eventIn of the given nodes.

getBrowser

public static Browser getBrowser(java.applet.Applet pApplet)
Return an instance of the Browser class.

getBrowser

public static Browser getBrowser(java.applet.Applet pApplet,
                                 java.lang.String frameName,
                                 int index)
Return an instance of the Browser class.

startVRwave

public static void startVRwave(Scene scene)

stopVRwave

public static void stopVRwave(Scene scene)