|
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.ogl.browser.OGLStandardBrowserCore
public class OGLStandardBrowserCore
Representation of a core of a browser implemented using the OpenGL rendering APIs.
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 VRML/X3D content. To handle anchors, it delegates to the supplied listener.
| Constructor Summary | |
|---|---|
OGLStandardBrowserCore(EventModelEvaluator eme,
org.j3d.aviatrix3d.management.RenderManager sgm,
org.j3d.aviatrix3d.management.DisplayCollection dc)
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 |
captureScreenEnd()
Stop capturing the screen on each render. |
void |
captureScreenOnce(ScreenCaptureListener listener,
int width,
int height)
Capture the screen on the next render. |
void |
captureScreenStart(ScreenCaptureListener listener,
int width,
int height)
Capture the screen on each render. |
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 |
clear()
Force clearing all currently managed layers from this manager now. |
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. |
org.j3d.aviatrix3d.management.DisplayCollection |
getDisplayManager()
Return the display manager |
org.j3d.aviatrix3d.pipeline.graphics.GraphicsResizeListener[] |
getGraphicsResizeListeners()
Get the graphics resize listener instance used by this universe, when managing layers. |
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. |
int |
getRenderingStyle(int layerId)
Get the currently set rendering style for a specific layer. |
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. |
VRMLViewpointNodeType |
getViewpoint()
Get the currently selected viewpoint in the active navigation layer. |
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 |
setActiveLayers(LayerManager[] layers,
int numLayers)
Set the list of current layers that should be rendered. |
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 |
setHardwareFOV(float fov)
Override the file field of view values with a value that suits the given output device. |
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 for all layers. |
void |
setRenderingStyle(int style,
int layerId)
Change the rendering style that the browser should currently be using for for a specific layer. |
void |
setRenderOrder(int[] order,
int numValid)
Set the rendering order for all the layers on this manager |
void |
setScene(VRMLScene scene,
java.lang.String viewpoint)
Set the scene to use within this universe. |
void |
setStereoEnabled(boolean enabled)
Set whether stereo is enabled for all layers. |
void |
shutdown()
Shutdown the node manager now. |
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 OGLStandardBrowserCore(EventModelEvaluator eme,
org.j3d.aviatrix3d.management.RenderManager sgm,
org.j3d.aviatrix3d.management.DisplayCollection dc)
eme - The class used to evaluate the event modelsgm - The manager of the scene graph| 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 BrowserCoresetErrorReporter in interface LayerRenderingManagerreporter - The instance to use or null
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 sendURLFailEvent(java.lang.String msg)
sendURLFailEvent in interface BrowserCoremsg - The message to sendpublic void setNavigationMode(java.lang.String mode)
setNavigationMode in interface BrowserCoremode - The requested 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 BrowserCore
public void setRenderingStyle(int style)
throws java.lang.IllegalArgumentException
setRenderingStyle in interface BrowserCoresetRenderingStyle in interface LayerRenderingManagerstyle - One of the RENDER_* constants
java.lang.IllegalArgumentException - A style constant that is not recognized
by the implementation was providedXj3DConstantspublic int getRenderingStyle()
getRenderingStyle in interface BrowserCoregetRenderingStyle in interface LayerRenderingManagerXj3DConstants
public void setRenderingStyle(int style,
int layerId)
throws java.lang.IllegalArgumentException
setRenderingStyle in interface LayerRenderingManagerstyle - One of the RENDER_* constantslayerId - The ID of the layer that should have the style changed
java.lang.IllegalArgumentException - A style constant that is not recognized
by the implementation was providedXj3DConstantspublic int getRenderingStyle(int layerId)
getRenderingStyle in interface LayerRenderingManagerXj3DConstants
public void setActiveLayers(LayerManager[] layers,
int numLayers)
setActiveLayers in interface LayerRenderingManagerlayers - The list of layer managers to be renderednumLayers - The number of active items in the list
public void setRenderOrder(int[] order,
int numValid)
setRenderOrder in interface LayerRenderingManagerorder - The index of the list of rendered layers idsnumValid - The number of valid items in the order listpublic void shutdown()
shutdown in interface LayerRenderingManagerpublic void clear()
clear in interface LayerRenderingManagerpublic org.j3d.aviatrix3d.management.DisplayCollection getDisplayManager()
public void captureScreenOnce(ScreenCaptureListener listener,
int width,
int height)
listener - Listener for capture resultswidth - The screen widthheight - The screen height
public void captureScreenStart(ScreenCaptureListener listener,
int width,
int height)
listener - Listener for capture resultswidth - The screen widthheight - The screen heightpublic void captureScreenEnd()
public org.j3d.aviatrix3d.pipeline.graphics.GraphicsResizeListener[] getGraphicsResizeListeners()
public void setHardwareFOV(float fov)
fov - The fov in degrees.public void setStereoEnabled(boolean enabled)
public VRMLScene getScene()
public VRMLViewpointNodeType getViewpoint()
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||