|
j3d-vrml97-0.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.j3d.loaders.vrml97.impl.Browser
public class Browser
Browser J3D structure:
The browser has two kinds of J3D structures: permanent structures which are changed the current scene and reset for each URL, and a scene branchgraph which holds the J3D tree parsed from the current VRML url.
The permanent BranchGroup is called browserRoot. It holds:
Views:
There is one View, PhysicalBody and PhysicalEnvironment which are used by the currently active Viewpoint and NavigationInfo.
Each file Viewpoint defines a new ViewPlaform, which get associated with the view when the viewpoint is bound.
There are default Viewpoint, NavigationInfo, Fog and Background VRML nodes which are used if the file does not define them
The initial VP, NI, Fog and BG are the value first seen from the file. This value will be bound in loadFinalize().
The VP, NI, Fog and BG stacks are used after the file is loaded. When each node is bound, if it is already on the stack, it removed itself from the stack and then it pushes itself onto the stack. The top entry on the stack is the currently active value.
The browser also has an ambient light and a directional light (the headlight). These are added to the TransformGroup which holds the ViewPlatform associated with the current Viewpoint.
Constructor Summary | |
---|---|
Browser()
Constructor for the Browser object |
|
Browser(Canvas3D vc3d)
Constructor for the Browser object |
Method Summary | |
---|---|
void |
addCanvas3D(Canvas3D can)
Adds a feature to the Canvas3D attribute of the Browser object |
void |
addRoute(BaseNode fromNode,
String fromEventOut,
BaseNode toNode,
String toEventIn)
Adds a feature to the Route attribute of the Browser object |
protected void |
addViewpoint(Viewpoint viewpoint)
Adds a feature to the Viewpoint attribute of the Browser object |
void |
cleanUp()
Description of the Method |
protected void |
clear()
Description of the Method |
BaseNode[] |
createVrmlFromString(String vrmlSyntax)
Description of the Method |
void |
createVrmlFromURL(String[] url,
BaseNode node,
String event)
Description of the Method |
void |
deleteRoute(BaseNode fromNode,
String fromEventOut,
BaseNode toNode,
String toEventIn)
Description of the Method |
Canvas3D |
getCanvas3D()
Gets the canvas3D attribute of the Browser object |
float |
getCurrentFrameRate()
Gets the currentFrameRate attribute of the Browser object |
float |
getCurrentSpeed()
Gets the currentSpeed attribute of the Browser object |
String |
getDescription()
Gets the description attribute of the Browser object |
String |
getName()
Gets the name attribute of the Browser object |
URL |
getURL()
Gets the uRL attribute of the Browser object |
String |
getVersion()
Gets the version attribute of the Browser object |
String[] |
getViewpointDescriptions()
Gets the viewpointDescriptions attribute of the Browser object |
String |
getWorldURL()
Gets the worldURL attribute of the Browser object |
void |
loadStringAsVrml(String sourceVrml)
Description of the Method |
void |
loadURL(String[] urlString,
String[] parameter)
Description of the Method |
void |
outputTiming()
Description of the Method |
void |
processEvent(AWTEvent evt)
Description of the Method |
void |
removeCanvas3D(Canvas3D can)
Description of the Method |
void |
replaceWorld(BaseNode[] nodes)
Description of the Method |
void |
resetViewpoint()
Description of the Method |
void |
setAutoSmooth(boolean s)
Sets the autoSmooth attribute of the Browser object |
void |
setAWTContainer(Container container)
Sets the aWTContainer attribute of the Browser object |
protected void |
setDefTable(Hashtable t)
Sets the defTable attribute of the Browser object |
void |
setDescription(String description)
Sets the description attribute of the Browser object |
void |
setViewpoint(int vi)
Sets the viewpoint attribute of the Browser object |
void |
shutDown()
Description of the Method |
void |
startRender()
Description of the Method |
void |
stopRender()
Description of the Method |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Browser(Canvas3D vc3d)
vc3d
- Description of the Parameterpublic Browser()
Method Detail |
---|
public void loadURL(String[] urlString, String[] parameter) throws InvalidVRMLSyntaxException, IOException, MalformedURLException
urlString
- Description of the Parameterparameter
- Description of the Parameter
InvalidVRMLSyntaxException
- Description of the Exception
IOException
- Description of the Exception
MalformedURLException
- Description of the Exceptionpublic void loadStringAsVrml(String sourceVrml)
sourceVrml
- Description of the Parameterprotected void clear()
protected void addViewpoint(Viewpoint viewpoint)
viewpoint
- The feature to be added to the Viewpoint attributepublic void setViewpoint(int vi)
vi
- The new viewpoint valuepublic void resetViewpoint()
public String[] getViewpointDescriptions()
public void outputTiming()
public void shutDown()
public Canvas3D getCanvas3D()
public void createVrmlFromURL(String[] url, BaseNode node, String event) throws InvalidVRMLSyntaxException
url
- Description of the Parameternode
- Description of the Parameterevent
- Description of the Parameter
InvalidVRMLSyntaxException
- Description of the Exceptionpublic String getName()
public String getVersion()
public float getCurrentSpeed()
public float getCurrentFrameRate()
public String getWorldURL()
public void replaceWorld(BaseNode[] nodes)
nodes
- Description of the Parameterpublic BaseNode[] createVrmlFromString(String vrmlSyntax) throws InvalidVRMLSyntaxException
vrmlSyntax
- Description of the Parameter
InvalidVRMLSyntaxException
- Description of the Exceptionprotected void setDefTable(Hashtable t)
t
- The new defTable valuepublic void setDescription(String description)
description
- The new description valuepublic String getDescription()
public void addRoute(BaseNode fromNode, String fromEventOut, BaseNode toNode, String toEventIn)
fromNode
- The feature to be added to the Route attributefromEventOut
- The feature to be added to the Route attributetoNode
- The feature to be added to the Route attributetoEventIn
- The feature to be added to the Route attributepublic void deleteRoute(BaseNode fromNode, String fromEventOut, BaseNode toNode, String toEventIn)
fromNode
- Description of the ParameterfromEventOut
- Description of the ParametertoNode
- Description of the ParametertoEventIn
- Description of the Parameterpublic void processEvent(AWTEvent evt)
evt
- Description of the Parameterpublic void startRender()
public void stopRender()
public void cleanUp()
public URL getURL()
public void removeCanvas3D(Canvas3D can)
can
- Description of the Parameterpublic void addCanvas3D(Canvas3D can)
can
- The feature to be added to the Canvas3D attributepublic void setAWTContainer(Container container)
container
- The new aWTContainer valuepublic void setAutoSmooth(boolean s)
s
- The new autoSmooth value
|
j3d-vrml97-0.1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |