|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvrml.Browser
public class Browser
Java binding for the Browser object, which represents capabilities to create and manage content.
| Constructor Summary | |
|---|---|
Browser()
|
|
| Method Summary | |
|---|---|
void |
addRoute(BaseNode fromNode,
java.lang.String fromEventOut,
BaseNode toNode,
java.lang.String toEventIn)
Add a route between two nodes, from an eventOut to an eventIn. |
BaseNode[] |
createVrmlFromString(java.lang.String vrmlSyntax)
Parse the given string and turn this into a list of VRML nodes. |
void |
createVrmlFromURL(java.lang.String[] url,
BaseNode node,
java.lang.String event)
Create and load VRML from the given URL and place the returned values as nodes into the given VRML node in the scene. |
void |
deleteRoute(BaseNode fromNode,
java.lang.String fromEventOut,
BaseNode toNode,
java.lang.String toEventIn)
Delete a route between two nodes. |
float |
getCurrentFrameRate()
Get the current frame rate of the browser in frames per second. |
float |
getCurrentSpeed()
Get the current velocity of the bound viewpoint in meters per second. |
java.lang.String |
getDescription()
Get the description string currently used by the world. |
java.lang.String |
getName()
Get the name of the browser. |
java.lang.String |
getVersion()
Get the version of the browser. |
java.lang.String |
getWorldURL()
Get the fully qualified URL of the currently loaded world. |
void |
loadURL(java.lang.String[] url,
java.lang.String[] parameter)
Load the URL as the new root of the scene. |
void |
replaceWorld(BaseNode[] nodes)
Replace the current world with the given nodes. |
void |
setDescription(java.lang.String description)
Set the description of the current world. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Browser()
| Method Detail |
|---|
public java.lang.String getDescription()
public java.lang.String getName()
public java.lang.String getVersion()
public float getCurrentSpeed()
public float getCurrentFrameRate()
public java.lang.String getWorldURL()
loadURL then the string will reflect the new URL. If
replaceWorld is called then the URL still represents the
original world.
loadURL(String[], String[]),
replaceWorld(BaseNode[])public void replaceWorld(BaseNode[] nodes)
Calling this method causes a SHUTDOWN event followed by an INITIALIZED event to be generated.
nodes - The list of nodes to use as the new root of the world
public BaseNode[] createVrmlFromString(java.lang.String vrmlSyntax)
throws InvalidVRMLSyntaxException
At the point that this method returns, external files such as textures, sounds and inlines may not have been loaded.
The string may contain all legal VRML syntax. The VRML header line is not required to be present in the string.
vrmlSyntax - The string containing VRML string syntax
InvalidVRMLSyntaxException - If the string does not contain legal
VRML syntax or no node instantiations
public void createVrmlFromURL(java.lang.String[] url,
BaseNode node,
java.lang.String event)
throws InvalidVRMLSyntaxException
url - The list of URLs in decreasing order of preference as defined
in the VRML97 specification.node - The destination node for the VRML code to be sent to.event - The name of the MFNode eventIn to send the nodes to.
InvalidVRMLSyntaxException - If the string does not contain legal
VRML syntax or no node instantiations
public void addRoute(BaseNode fromNode,
java.lang.String fromEventOut,
BaseNode toNode,
java.lang.String toEventIn)
fromNode - The source node for the routefromEventOut - The eventOut source of the routetoNode - The destination node of the routetoEventIn - The eventIn destination of the route
public void deleteRoute(BaseNode fromNode,
java.lang.String fromEventOut,
BaseNode toNode,
java.lang.String toEventIn)
fromNode - The source node for the routefromEventOut - The eventOut source of the routetoNode - The destination node of the routetoEventIn - The eventIn destination of the route
public void loadURL(java.lang.String[] url,
java.lang.String[] parameter)
throws InvalidVRMLSyntaxException
Generates an immediate SHUTDOWN event and then when the new contents are ready to be loaded, sends an INITIALIZED event.
url - The list of URLs in decreasing order of preference as defined
in the VRML97 specification.parameter - The list of parameters to accompany the load call as
defined in the Anchor node specification of VRML97
InvalidVRMLSyntaxException - If the string does not contain legal
VRML syntax or no node instantiationspublic void setDescription(java.lang.String description)
description - The description string to set.
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||