|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BrowserCore
Abstract representation of the core requirements of a browser implementation regardless of the renderer used.
| Method Summary | |
|---|---|
void |
addCoreListener(BrowserCoreListener l)
Add a listener for browser core events. |
void |
addNavigationStateListener(NavigationStateListener l)
Add a listener for navigation state changes. |
void |
addNodeObserver(int nodeType,
NodeObserver obs)
Add an observer for a specific node type. |
void |
addProfilingListener(ProfilingListener l)
Request notification of profiling information. |
void |
addSensorStatusListener(SensorStatusListener l)
Add a listener for sensor state changes. |
void |
addViewpointStatusListener(ViewpointStatusListener l)
Add a listener for viewpoint status changes. |
void |
changeViewpoint(VRMLViewpointNodeType vp)
Request that this viewpoint object is bound at the start of the next frame. |
void |
dispose()
Notify the core that it can dispose all resources. |
void |
fitToWorld(boolean animated)
Move the user's location to see the entire world. |
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.util.Map |
getDEFMappings()
Get the mapping of DEF names to the node instances that they represent. |
java.lang.String |
getDescription()
Get the description string currently used by the world. |
java.lang.String |
getIDString()
Get the ID string for this renderer. |
int |
getMinimumFrameInterval()
Get the currently set minimum frame cycle interval. |
int |
getRendererType()
Get the type of renderer that implements the browser core. |
int |
getRenderingStyle()
Get the currently set rendering style. |
VRMLClock |
getVRMLClock()
Get the clock instance in use by the core. |
VRMLExecutionSpace |
getWorldExecutionSpace()
Convenience method to ask for the execution space that the world is currently operating in. |
java.lang.String |
getWorldURL()
Get the fully qualified URL of the currently loaded world. |
void |
removeCoreListener(BrowserCoreListener l)
Remove a browser core listener. |
void |
removeNavigationStateListener(NavigationStateListener l)
Remove a navigation state listener. |
void |
removeNodeObserver(int nodeType,
NodeObserver obs)
Remove the given node observer instance for the specific node type. |
void |
removeProfilingListener(ProfilingListener l)
Remove notification of profiling information. |
void |
removeSensorStatusListener(SensorStatusListener l)
Remove a sensor state listener. |
void |
removeViewpointStatusListener(ViewpointStatusListener l)
Remove a viewpoint state listener. |
void |
sendURLFailEvent(java.lang.String msg)
Send to the core listeners the error message that a URL failed to load for some reason. |
void |
setDescription(java.lang.String desc)
Set the description of the current world. |
void |
setErrorReporter(ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. |
void |
setEventModelStatusListener(EventModelStatusListener l)
Set the eventModelStatus listener. |
void |
setLastRenderTime(long lastTime)
Set the last frame render time used for FPS calculations. |
void |
setMinimumFrameInterval(int millis,
boolean userSet)
Set the minimum frame interval time to limit the CPU resources taken up by the 3D renderer. |
void |
setNavigationMode(java.lang.String mode)
Set the desired navigation mode. |
void |
setRenderingStyle(int style)
Change the rendering style that the browser should currently be using. |
void |
setScene(VRMLScene scene,
java.lang.String viewpoint)
Set the scene to use within this universe with the specifically named viewpoint. |
void |
syncUIUpdates()
Sync UI updates with the Application thread. |
| Method Detail |
|---|
int getRendererType()
Xj3DConstants.
java.lang.String getIDString()
Xj3DConstants.
void setErrorReporter(ErrorReporter reporter)
reporter - The instance to use or null
void setMinimumFrameInterval(int millis,
boolean userSet)
millis - The minimum time in milleseconds.userSet - true if this is an end-user set minimumint getMinimumFrameInterval()
void setRenderingStyle(int style)
throws java.lang.IllegalArgumentException
style - One of the RENDER_* constants
java.lang.IllegalArgumentException - A style constant that is not recognized
by the implementation was providedint getRenderingStyle()
VRMLClock getVRMLClock()
void setScene(VRMLScene scene,
java.lang.String viewpoint)
scene - The new scene to load, or nullviewpoint - The viewpoint.description to bind to or null for defaultjava.util.Map getDEFMappings()
VRMLExecutionSpace getWorldExecutionSpace()
java.lang.String getDescription()
void setDescription(java.lang.String desc)
desc - The description string to set.float getCurrentSpeed()
float getCurrentFrameRate()
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.
void sendURLFailEvent(java.lang.String msg)
msg - The message to sendvoid setNavigationMode(java.lang.String mode)
mode - The requested mode.void fitToWorld(boolean animated)
animated - Should the transistion be animated. Defaults to FALSE.void changeViewpoint(VRMLViewpointNodeType vp)
vp - The new viewpoint instance to bind tovoid setLastRenderTime(long lastTime)
lastTime - The time it took to render the last frame in milliseconds.void addCoreListener(BrowserCoreListener l)
l - The listener to addvoid removeCoreListener(BrowserCoreListener l)
l - The listener to removevoid setEventModelStatusListener(EventModelStatusListener l)
l - The listener. Null will clear it.void addNavigationStateListener(NavigationStateListener l)
l - The listener to addvoid removeNavigationStateListener(NavigationStateListener l)
l - The listener to removevoid addSensorStatusListener(SensorStatusListener l)
l - The listener to addvoid removeSensorStatusListener(SensorStatusListener l)
l - The listener to removevoid addViewpointStatusListener(ViewpointStatusListener l)
l - The listener to addvoid removeViewpointStatusListener(ViewpointStatusListener l)
l - The listener to remove
void addNodeObserver(int nodeType,
NodeObserver obs)
nodeType - The type identifier of the node being observedobs - The observer instance to add
void removeNodeObserver(int nodeType,
NodeObserver obs)
nodeType - The type identifier of the node being observedobs - The observer instance to removevoid dispose()
void syncUIUpdates()
void addProfilingListener(ProfilingListener l)
l - The listenervoid removeProfilingListener(ProfilingListener l)
l - The listener
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||