|
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.Objectorg.web3d.vrml.renderer.norender.browser.NRUniverse
public class NRUniverse
Representation of a Null renderer universe object suitable for use in single screen, stereo and walled environments.
Apart from the VirtualUniverse, this also holds all of the view information
model. In particular, this is shared between multiple
org.web3d.vrml.renderer.j3d.browser.VRMLBrowserCanvas instances to
enable multiple views of the same scenegraph or for stereo viewing.
The universe is responsible for handling the management of the viewpoints within a scene. VRML defines a single viewpoint model for multiple canvases. If we want to set this environment up for stereo rendering or CAVE type environments, the renderer will need to use a single view for all of them. If you are trying to perform multiple views of the scenegraph, such as an editor environment, this universe is not suitable as it uses a single View object and attaches all canvases to that view and hence the underlying currently bound viewpoint.
The universe is not responsible for loading more VRML content. To handle anchors, it delegates to the supplied listener.
| Constructor Summary | |
|---|---|
NRUniverse(EventModelEvaluator eme)
Construct a default, empty universe that contains no scenegraph. |
|
| 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 |
changeWorld()
Notification that its safe to clear the world. |
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. |
VRMLScene |
getScene()
Get the scene that this universe is currently holding. |
void |
getUserPosition(javax.vecmath.Vector3f pos,
javax.vecmath.AxisAngle4f ori)
Get the user's location and orientation. |
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 navigation mode selected from the user interface. |
void |
setNavigationStateListener(NavigationStateListener l)
Set the listener for navigation state change notifications. |
void |
setRenderingStyle(int style)
Change the rendering style that the browser should currently be using for all layers. |
void |
setScene(VRMLScene scene,
java.lang.String viewpoint)
Set the scene to use within this universe. |
void |
syncUIUpdates()
Sync UI updates with the Application thread. |
void |
worldInitComplete()
Notification from the event model evaluator that the initialization phase is now complete. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NRUniverse(EventModelEvaluator eme)
eme - The event model evaluation processor| Method Detail |
|---|
public void worldInitComplete()
worldInitComplete in interface EventModelInitListenerpublic void changeWorld()
changeWorld in interface EventModelInitListenerpublic int getRendererType()
getRendererType in interface BrowserCorepublic java.lang.String getIDString()
getIDString in interface BrowserCorepublic void setErrorReporter(ErrorReporter reporter)
setErrorReporter in interface BrowserCorereporter - The instance to use or null
public void setRenderingStyle(int style)
throws java.lang.IllegalArgumentException
setRenderingStyle in interface BrowserCorestyle - One of the RENDER_* constants
java.lang.IllegalArgumentException - A style constant that is not recognized
by the implementation was providedpublic int getRenderingStyle()
getRenderingStyle in interface BrowserCore
public void setMinimumFrameInterval(int millis,
boolean userSet)
setMinimumFrameInterval in interface BrowserCoremillis - The minimum time in milleseconds.userSet - true if this is an end-user set minimumpublic int getMinimumFrameInterval()
getMinimumFrameInterval in interface BrowserCorepublic VRMLClock getVRMLClock()
getVRMLClock in interface BrowserCorepublic java.util.Map getDEFMappings()
getDEFMappings in interface BrowserCorepublic VRMLExecutionSpace getWorldExecutionSpace()
getWorldExecutionSpace in interface BrowserCorepublic java.lang.String getDescription()
getDescription in interface BrowserCorepublic void setDescription(java.lang.String desc)
setDescription in interface BrowserCoredesc - The description string to set.public float getCurrentSpeed()
getCurrentSpeed in interface BrowserCorepublic float getCurrentFrameRate()
getCurrentFrameRate in interface BrowserCorepublic void setLastRenderTime(long lastTime)
setLastRenderTime in interface BrowserCorelastTime - The time it took to render the last frame in milliseconds.public void setEventModelStatusListener(EventModelStatusListener l)
setEventModelStatusListener in interface BrowserCorel - The listener. Null will clear it.public void addNavigationStateListener(NavigationStateListener l)
addNavigationStateListener in interface BrowserCorel - The listener to addpublic void removeNavigationStateListener(NavigationStateListener l)
removeNavigationStateListener in interface BrowserCorel - The listener to removepublic void addSensorStatusListener(SensorStatusListener l)
addSensorStatusListener in interface BrowserCorel - The listener to addpublic void removeSensorStatusListener(SensorStatusListener l)
removeSensorStatusListener in interface BrowserCorel - The listener to removepublic void addViewpointStatusListener(ViewpointStatusListener l)
addViewpointStatusListener in interface BrowserCorel - The listener to addpublic void removeViewpointStatusListener(ViewpointStatusListener l)
removeViewpointStatusListener in interface BrowserCorel - The listener to remove
public void addNodeObserver(int nodeType,
NodeObserver obs)
addNodeObserver in interface BrowserCorenodeType - The type identifier of the node being observedobs - The observer instance to add
public void removeNodeObserver(int nodeType,
NodeObserver obs)
removeNodeObserver in interface BrowserCorenodeType - The type identifier of the node being observedobs - The observer instance to removepublic void dispose()
dispose in interface BrowserCorepublic 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.
getWorldURL in interface BrowserCore
public void setScene(VRMLScene scene,
java.lang.String viewpoint)
setScene in interface BrowserCorescene - The new scene to load, or nullviewpoint - The viewpoint.description to bind to or null for defaultpublic void changeViewpoint(VRMLViewpointNodeType vp)
changeViewpoint in interface BrowserCorevp - The new viewpoint instance to bind topublic void addCoreListener(BrowserCoreListener l)
addCoreListener in interface BrowserCorel - The listener to addpublic void removeCoreListener(BrowserCoreListener l)
removeCoreListener in interface BrowserCorel - The listener to removepublic void addProfilingListener(ProfilingListener l)
addProfilingListener in interface BrowserCorel - The listenerpublic void removeProfilingListener(ProfilingListener l)
removeProfilingListener in interface BrowserCorel - The listenerpublic void setNavigationMode(java.lang.String mode)
setNavigationMode in interface BrowserCoremode - The new mode
public void getUserPosition(javax.vecmath.Vector3f pos,
javax.vecmath.AxisAngle4f ori)
pos - The current user positionori - The current user orientationpublic void fitToWorld(boolean animated)
fitToWorld in interface BrowserCoreanimated - Should the transistion be animated. Defaults to FALSE.public void syncUIUpdates()
syncUIUpdates in interface BrowserCorepublic void setNavigationStateListener(NavigationStateListener l)
l - The listener to use for change updatespublic void sendURLFailEvent(java.lang.String msg)
sendURLFailEvent in interface BrowserCoremsg - The message to sendpublic VRMLScene getScene()
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||