Class SAIBrowser
- All Implemented Interfaces:
BrowserCoreListener,ScreenCaptureListener,SensorStatusListener,Browser,ExternalBrowser,Xj3DBrowser
Browser interface, largely by
translating and interfacing between the wrapper classes and the
implementation class represented by {org.web3d.vrml.scripting.CommonBrowser}.
To function correctly, SAIBrowser needs to be constructed using CommonBrowser and BrowserCore instances. The SAIBrowser then registers as a listener so that BrowserCoreListener BrowserInitialized and browserShutdown messages. The BrowserCore instance is necessary mainly for the global namespace and VRMLExecutionSpace information.
- Version:
- $Revision: 1.64 $
- Author:
- Brad Vender, Rex Melton, Justin Couch
-
Field Summary
Fields inherited from interface org.web3d.browser.SensorStatusListener
TYPE_ANCHOR, TYPE_DRAG_SENSOR, TYPE_TOUCH_SENSORFields inherited from interface org.xj3d.sai.Xj3DBrowser
RENDER_FLAT, RENDER_LINES, RENDER_POINTS, RENDER_SHADED -
Constructor Summary
ConstructorsConstructorDescriptionSAIBrowser(BrowserCore browserCore, X3DCommonBrowser browserImpl, RouteManager rm, FrameStateManager fsm, ContentLoadManager clm, ExternalEventQueue eventQueue, CursorManager cm, org.j3d.util.ErrorReporter reporter) Construct an SAIBrowser for the given VrmlDisplayPanel -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBrowserListener adds the specified listener to the set of listeners for this browser.voidAdd a listener for status messages.voidLock the output from the external interface to the browser as the code is about to begin a series of updates.voidThe browser has been disposed, all resources may be freed.voidbrowserInitialized(VRMLScene scene) The browser has been initialised with new content.voidThe browser has been shut down and the previous content is no longer valid.voidcaptureFrames(int n) Request that the browser capture the next n number of frames as images.createScene(ProfileInfo profile, ComponentInfo[] components) Create a new, empty scene that can be used to programmatically fill in new scenes.createX3DFromStream(String fileParent, InputStream is) Parse the contents of the stream and interpret it as X3D content.createX3DFromString(String string) Parse the given string and turn this into a list of X3D nodes.createX3DFromURL(String[] url) Create and load X3D from the given URL.voiddeviceActivated(int type) Invoked when a tracker activates the sensor.voiddeviceNotOver(int type) Invoked when a tracker leaves contact with a sensor.voiddeviceOver(int type, String desc) Invoked when a sensor/anchor is in contact with a tracker capable of picking.voiddispose()Dispose the resources that are used by this instance.voidRelease the output of events from the external interface into the VRML browser.voidBind the first viewpoint in the list.voidfirstViewpoint(int layer) Bind the first viewpoint in the list.Get the collection of browser properties that the browser provides.Fetch the component-specific interface for managing a CAD scene.getComponentInfo(String name, int level) Get specific component info at the requested support level.floatGet the current frame rate of the browser in frames per second.floatGet the current velocity of the bound viewpoint in meters per second.Fetch the interface that allows an external application to implement their own cursor user interface.Get the description of the current world.Get the information about the current scene.intGet the currently set minimum frame cycle interval.getName()Returns the name of the Browser.Fetch the interface that allows an external application to implement their own navigation user interface.getProfile(String name) Get a specific profile.Get the collection of rendering properties that the browser provides.intGet the currently set rendering style.Get a listing of all the components that this browser implementation is capable of supporting.Get a listing of the profiles that this browser implementation is capable of supporting.Returns the version string for this Browser.importDocument(Node aDocument) A utility request to import a W3C DOM document or document fragment and convert it to an X3D scene.voidInitialize the world to a known state.voidBind the last viewpoint in the list.voidlastViewpoint(int layer) Bind the last viewpoint in the list.voidlinkActivated(String[] urls, String[] params, String desc) Invoked when a tracker selects an object that represents a link to an external source.voidLoad the URL as the new root of the scene.voidBind the next viewpoint in the list.voidnextViewpoint(int layer) Bind the next viewpoint in the list.voidPause the render and event cascade evaluation system.voidBind the previous viewpoint in the list.voidpreviousViewpoint(int layer) Bind the previous viewpoint in the list.voidPrint the message to the browser console without wrapping a new line onto it.voidPrint the message to the browser console and append a new line onto it.voidremoveBrowserListener removes the specified listener from the set of listeners for this browser.voidRemove a listener for status messages.voidreplaceWorld(X3DScene scene) Replace the current world with the given nodes.voidscreenCaptured(Buffer buffer, int width, int height) Notification of a new screen capture.voidSet the interceptor for the anchor node handling.voidsetDescription(String newDescription) Set the description of the current world.voidsetErrorReporter(Xj3DErrorReporter reporter) Set the handler for error messages.voidsetMinimumFrameInterval(int millis) Set the minimum frame interval time to limit the CPU resources taken up by the 3D renderer.voidsetRenderingStyle(int style) Change the rendering style that the browser should currently be using.voidSet the handler for processing screen captures.voidStart the render and event cascade evaluation system again after a pause or stop.voidStop the render and event cascade evaluation system completely.voidurlLoadFailed(String msg) The browser tried to load a URL and failed.
-
Constructor Details
-
SAIBrowser
public SAIBrowser(BrowserCore browserCore, X3DCommonBrowser browserImpl, RouteManager rm, FrameStateManager fsm, ContentLoadManager clm, ExternalEventQueue eventQueue, CursorManager cm, org.j3d.util.ErrorReporter reporter) Construct an SAIBrowser for the given VrmlDisplayPanel- Parameters:
browserCore- The BrowserCore to use as the implementation.browserImpl- The delegated browser implementationrm- The route managerfsm- The frame state managerclm- The content load managereventQueue- The buffer to send events to.cm- The cursor managerreporter- The ErrorReporter to use. If null, will use DefaultErrorReporter's default.
-
-
Method Details
-
setErrorReporter
Set the handler for error messages. This can be used to replace the stock console. Passing a value of null removes the currently registered reporter. Setting this will replace the current reporter with this instance. If the current reporter is the default system console, then the console will not receive any further messages.- Specified by:
setErrorReporterin interfaceXj3DBrowser- Parameters:
reporter- The error reporter instance to use
-
addStatusListener
Add a listener for status messages. Adding the same listener instance more than once will be silently ignored. Null values are ignored.- Specified by:
addStatusListenerin interfaceXj3DBrowser- Parameters:
l- The listener instance to add
-
removeStatusListener
Remove a listener for status messages. If this listener is not currently registered, the request will be silently ignored.- Specified by:
removeStatusListenerin interfaceXj3DBrowser- Parameters:
l- The listener instance to remove
-
getCursorManager
Fetch the interface that allows an external application to implement their own cursor user interface.- Specified by:
getCursorManagerin interfaceXj3DBrowser- Returns:
- An interface allowing end-user code to manipulate the cursor.
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
getCADView
Fetch the component-specific interface for managing a CAD scene. This interface exposes CAD structures- Specified by:
getCADViewin interfaceXj3DBrowser- Returns:
- An interface allowing end-user code to manipulate the the CAD-specific structures in the scene.
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
setMinimumFrameInterval
Set the minimum frame interval time to limit the CPU resources taken up by the 3D renderer. By default it will use all of them.- Specified by:
setMinimumFrameIntervalin interfaceXj3DBrowser- Parameters:
millis- The minimum time in milliseconds.- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
getMinimumFrameInterval
Get the currently set minimum frame cycle interval. Note that this is the minimum interval, not the actual frame rate. Heavy content loads can easily drag this down below the max frame rate that this will generate.- Specified by:
getMinimumFrameIntervalin interfaceXj3DBrowser- Returns:
- The cycle interval time in milliseconds
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
setRenderingStyle
Change the rendering style that the browser should currently be using. Various options are available based on the constants defined in this interface.- Specified by:
setRenderingStylein interfaceXj3DBrowser- Parameters:
style- One of the RENDER_* constants- Throws:
IllegalArgumentException- A style constant that is not recognized by the implementation was providedInvalidBrowserException- The dispose method has been called on this browser reference.
-
getRenderingStyle
Get the currently set rendering style. The default style is RENDER_SHADED.- Specified by:
getRenderingStylein interfaceXj3DBrowser- Returns:
- one of the RENDER_ constants
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
setAnchorListener
Set the interceptor for the anchor node handling. This can be used to process the clicks on Anchor nodes and replace or supplement the existing behaviour. See documentation of the listener for more specific details on usage patterns.Only one interceptor instance can be registered. Setting a new item will replace an existing registered instance. Setting a null value will clear the current set instance.
- Specified by:
setAnchorListenerin interfaceXj3DBrowser- Parameters:
l- The interceptor instance to register or null to clear- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
captureFrames
Request that the browser capture the next n number of frames as images. This will begin from the frame after this method is called. If no screen capture listener is registered at the time this is called, the request is ignored.- Specified by:
captureFramesin interfaceXj3DBrowser- Parameters:
n- The number of frames to capture- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
setScreenCaptureListener
Set the handler for processing screen captures. This can be used to process images for saving to disc, processing or other task.Only one listener instance can be registered. Setting a new item will replace an existing registered instance. Setting a null value will clear the current set instance.
- Specified by:
setScreenCaptureListenerin interfaceXj3DBrowser- Parameters:
l- The processing instance to register or null to clear- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
addBrowserListener
addBrowserListener adds the specified listener to the set of listeners for this browser.- Specified by:
addBrowserListenerin interfaceExternalBrowser- Parameters:
l- The listener to add to the list of listeners for this browser- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
beginUpdate
Description copied from interface:ExternalBrowserLock the output from the external interface to the browser as the code is about to begin a series of updates. No events will be passed to the VRML world. They will be buffered pending release due to a subsequent call to endUpdate.This call is a nesting call which means subsequent calls to beginUpdate are kept on a stack. No events will be released to the VRML browser until as many endUpdates have been called as beginUpdate.
- Specified by:
beginUpdatein interfaceExternalBrowser- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.- See Also:
-
endUpdate
Description copied from interface:ExternalBrowserRelease the output of events from the external interface into the VRML browser. All events posted to this point from the last time that beginUpdate was called are released into the VRML browser for processing at the next available opportunity.This call is a nesting call which means subsequent calls to beginUpdate are kept on a stack. No events will be released to the VRML browser until as many endUpdates have been called as beginUpdate.
If no beginUpdate has been called before calling this method, it has no effect.
- Specified by:
endUpdatein interfaceExternalBrowser- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.- See Also:
-
removeBrowserListener
removeBrowserListener removes the specified listener from the set of listeners for this browser.- Specified by:
removeBrowserListenerin interfaceExternalBrowser- Parameters:
l- The listener to remove from the list.- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.- See Also:
-
startRender
public void startRender()Description copied from interface:Xj3DBrowserStart the render and event cascade evaluation system again after a pause or stop. If this is a start after a stop, it should be treated as the world having just been loaded. All scripts and sensors should be told to initialise again. If it is after a pause, the world continues as before as though nothing has happened, except TimeSensors will have their time values updated to reflect the current time and the fraction adjusted accordingly.- Specified by:
startRenderin interfaceXj3DBrowser- See Also:
-
pauseRender
public void pauseRender()Description copied from interface:Xj3DBrowserPause the render and event cascade evaluation system.- Specified by:
pauseRenderin interfaceXj3DBrowser- See Also:
-
stopRender
public void stopRender()Description copied from interface:Xj3DBrowserStop the render and event cascade evaluation system completely. This will trigger the proper shutdown notifications being sent to all nodes and scripts.- Specified by:
stopRenderin interfaceXj3DBrowser- See Also:
-
dispose
Description copied from interface:ExternalBrowserDispose the resources that are used by this instance. Should be called just prior to leaving the application. When this method is called, the event queue will be processed, the browser will shut down, and any subsequent calls to browser methods will result in InvalidBrowserException's being generated.- Specified by:
disposein interfaceExternalBrowser- Throws:
InvalidBrowserException
-
createScene
public X3DScene createScene(ProfileInfo profile, ComponentInfo[] components) throws InvalidBrowserException Description copied from interface:BrowserCreate a new, empty scene that can be used to programmatically fill in new scenes. This scene has the give profile and/or component information set, and is not currently being rendered. Either argument may be null, but not both arguments. If the profile is null, then the default profile of "NONE" is used, and only the components are used. The scene version is set to the highest supported version of the specification that this browser currently implements.- Specified by:
createScenein interfaceBrowser- Parameters:
profile- The profile to use for this scene or null for nonecomponents- The list of components to use or null- Returns:
- A new empty scene to work with
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
createX3DFromString
public X3DScene createX3DFromString(String string) throws InvalidBrowserException, InvalidX3DException Description copied from interface:BrowserParse the given string and turn this into a list of X3D nodes. Method is a blocking call that won't return until all of the top level nodes defined in the string have been returned.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 X3D syntax - either UTF8 or XML encoding. The X3D header line is not required to be present in the string if UTF8 syntax.
- Specified by:
createX3DFromStringin interfaceBrowser- Parameters:
string- The string containing VRML string syntax- Returns:
- The scene that was created from the string.
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.InvalidX3DException- If the string does not contain legal X3D/VRML syntax or no node instantiations
-
createX3DFromStream
public X3DScene createX3DFromStream(String fileParent, InputStream is) throws InvalidBrowserException, InvalidX3DException, IOException Description copied from interface:BrowserParse the contents of the stream and interpret it as X3D content. The browser shall interpret the content using the initial characters of the stream to determine which encoding and file format is used.- Specified by:
createX3DFromStreamin interfaceBrowser- Parameters:
fileParent- the parent directory to form our base URLis- The input stream that contains the content to parse- Returns:
- The scene that was created from the string.
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.InvalidX3DException- If the string does not contain legal X3D/VRML syntax or no node instantiationsIOException- An I/O Error occurred while reading the stream
-
createX3DFromURL
public X3DScene createX3DFromURL(String[] url) throws InvalidBrowserException, InvalidURLException, InvalidX3DException Description copied from interface:BrowserCreate and load X3D from the given URL. The call will not return until the basic top-level scene has been processed or an error has occurred. Inlines, textures, sound and externprotos are not guaranteed to be loaded at this time. If the caller needs to know what the final URL was that loaded, use the getWorldURL() call from the returned scene.- Specified by:
createX3DFromURLin interfaceBrowser- Parameters:
url- The list of URLs in decreasing order of preference as defined in the VRML97/X3D specification.- Returns:
- The scene that was created from the URLs.
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.InvalidURLException- All of the URLs passed to this method are bogus and cannot be translated to usable valuesInvalidX3DException- If the string does not contain legal X3D/VRML syntax or no node instantiations
-
getComponentInfo
public ComponentInfo getComponentInfo(String name, int level) throws InvalidBrowserException, NotSupportedException Description copied from interface:BrowserGet specific component info at the requested support level.- Specified by:
getComponentInfoin interfaceBrowser- Parameters:
name- The component namelevel- The minimum component level- Returns:
- The specified component info
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.NotSupportedException- The requested profile is not supported
-
getCurrentSpeed
Description copied from interface:BrowserGet the current velocity of the bound viewpoint in meters per second. The velocity is defined in terms of the world values, not the local coordinate system of the viewpoint.- Specified by:
getCurrentSpeedin interfaceBrowser- Returns:
- The velocity in m/s or 0.0 if not supported
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.- See Also:
-
getCurrentFrameRate
Description copied from interface:BrowserGet the current frame rate of the browser in frames per second.- Specified by:
getCurrentFrameRatein interfaceBrowser- Returns:
- The current frame rate or 0.0 if not supported
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.- See Also:
-
getExecutionContext
Description copied from interface:BrowserGet the information about the current scene. If no scene has been set then this will return null.- Specified by:
getExecutionContextin interfaceBrowser- Returns:
- The current scene data
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.- See Also:
-
getName
Returns the name of the Browser.- Specified by:
getNamein interfaceBrowser- Returns:
- The name of the Browser
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.- See Also:
-
getProfile
Description copied from interface:BrowserGet a specific profile.- Specified by:
getProfilein interfaceBrowser- Parameters:
name- The profile name- Returns:
- The specified profile
- See Also:
-
getSupportedComponents
Description copied from interface:BrowserGet a listing of all the components that this browser implementation is capable of supporting.- Specified by:
getSupportedComponentsin interfaceBrowser- Returns:
- The listing of all supported components
- See Also:
-
getSupportedProfiles
Description copied from interface:BrowserGet a listing of the profiles that this browser implementation is capable of supporting.- Specified by:
getSupportedProfilesin interfaceBrowser- Returns:
- The listing of all supported profiles
- See Also:
-
getVersion
Returns the version string for this Browser.- Specified by:
getVersionin interfaceBrowser- Returns:
- The version string for this Browser
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.- See Also:
-
importDocument
Description copied from interface:BrowserA utility request to import a W3C DOM document or document fragment and convert it to an X3D scene. The method only performs a conversion process and does not display the resulting scene. The scene may then be used as the argument for the replaceWorld service. When the conversion is made, there is no lasting connection between the DOM and the generated scene. Each request shall be a one-off conversion attempt (the conversion may not be successful if the DOM does not match the X3D scene graph structure).- Specified by:
importDocumentin interfaceBrowser- Parameters:
aDocument- The root element to convert- Returns:
- A scene representation corresponding to the document
-
loadURL
public void loadURL(String[] urls, Map<String, Object> params) throws InvalidBrowserException, InvalidURLExceptionDescription copied from interface:BrowserLoad the URL as the new root of the scene. Replaces all the current scene graph with the new world. A non-blocking call that will change the contents at some time in the future.Generates an immediate SHUTDOWN event and then when the new contents are ready to be loaded, sends an INITIALIZED event.
- Specified by:
loadURLin interfaceBrowser- Parameters:
urls- The list of URLs in decreasing order of preference as defined in the VRML97 specification.params- The list of parameters to accompany the load call as defined in the Anchor node specification of VRML97- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.InvalidURLException- All of the URLs passed to this method are bogus and cannot be translated to usable values
-
replaceWorld
Description copied from interface:BrowserReplace the current world with the given nodes. Replaces the entire contents of the VRML world with the new nodes. Any node references that belonged to the previous world are still valid but no longer form part of the scene graph (unless it is these nodes passed to this method). The URL of the world still represents the just unloaded world.Calling this method causes a SHUTDOWN event followed by an INITIALIZED event to be generated.
- Specified by:
replaceWorldin interfaceBrowser- Parameters:
scene- The new scene to render in the browser- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.IllegalArgumentException- See Also:
-
getDescription
Get the description of the current world.- Specified by:
getDescriptionin interfaceBrowser- Returns:
- A description string or null if none set
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.ConnectionException- An error occurred in the connection to the browser.
-
setDescription
Description copied from interface:BrowserSet the description of the current world. If the world is operating as part of a web browser then it shall attempt to set the title of the window. If the browser is from a component then the result is dependent on the implementation- Specified by:
setDescriptionin interfaceBrowser- Parameters:
newDescription- The description string to set.- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
getRenderingProperties
public Map<String,Object> getRenderingProperties() throws InvalidBrowserException, InvalidOperationTimingExceptionGet the collection of rendering properties that the browser provides. Rendering properties are key/value pairs, as defined in table 9.2 of ISO/IEC 19775-1. Keys are instances of Strings, while the value is dependent on the property. If the property is not defined in the returned map, treat it as not being supported by the browser.- Specified by:
getRenderingPropertiesin interfaceBrowser- Returns:
- A read-only map of the list of properties defined by the browser
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.ConnectionException- An error occurred in the connection to the browser.InvalidOperationTimingException- This was not called during the correct timing during a script (may be called at any time from external)
-
getBrowserProperties
public Map<String,Object> getBrowserProperties() throws InvalidBrowserException, InvalidOperationTimingExceptionGet the collection of browser properties that the browser provides. Rendering properties are key/value pairs, as defined in table 9.2 of ISO/IEC 19775-1. Keys are instances of Strings, while the value is dependent on the property. If the property is not defined in the returned map, treat it as not being supported by the browser.- Specified by:
getBrowserPropertiesin interfaceBrowser- Returns:
- A read-only map of the list of properties defined by the browser
- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.ConnectionException- An error occurred in the connection to the browser.InvalidOperationTimingException- This was not called during the correct timing during a script (may be called at any time from external)
-
nextViewpoint
Description copied from interface:BrowserBind the next viewpoint in the list. The definition of "next" is not specified, and may be browser dependent. If only one viewpoint is declared, this method does nothing.- Specified by:
nextViewpointin interfaceBrowser- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
nextViewpoint
Description copied from interface:BrowserBind the next viewpoint in the list. The definition of "next" is not specified, and may be browser dependent. If only one viewpoint is declared, this method does nothing.- Specified by:
nextViewpointin interfaceBrowser- Parameters:
layer- index of the next viewpoint- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
previousViewpoint
Description copied from interface:BrowserBind the previous viewpoint in the list. The definition of "previous" is not specified, and may be browser dependent. If only one viewpoint is declared, this method does nothing.- Specified by:
previousViewpointin interfaceBrowser- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
previousViewpoint
Description copied from interface:BrowserBind the previous viewpoint in the list. The definition of "previous" is not specified, and may be browser dependent. If only one viewpoint is declared, this method does nothing.- Specified by:
previousViewpointin interfaceBrowser- Parameters:
layer- index of the previous viewpoint- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
firstViewpoint
Description copied from interface:BrowserBind the first viewpoint in the list. This is the first viewpoint declared in the user's file. ie The viewpoint that would be bound by default on loading.- Specified by:
firstViewpointin interfaceBrowser- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
firstViewpoint
Description copied from interface:BrowserBind the first viewpoint in the list. This is the first viewpoint declared in the user's file. ie The viewpoint that would be bound by default on loading.- Specified by:
firstViewpointin interfaceBrowser- Parameters:
layer- index of the first viewpoint- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
lastViewpoint
Description copied from interface:BrowserBind the last viewpoint in the list.- Specified by:
lastViewpointin interfaceBrowser- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
lastViewpoint
Description copied from interface:BrowserBind the last viewpoint in the list.- Specified by:
lastViewpointin interfaceBrowser- Parameters:
layer- index of the last viewpoint- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
print
Print the message to the browser console without wrapping a new line onto it.- Specified by:
printin interfaceBrowser- Parameters:
msg- The object to be printed- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
println
Print the message to the browser console and append a new line onto it.- Specified by:
printlnin interfaceBrowser- Parameters:
msg- The object to be printed- Throws:
InvalidBrowserException- The dispose method has been called on this browser reference.
-
browserInitialized
Description copied from interface:BrowserCoreListenerThe browser has been initialised with new content. The content given is found in the accompanying scene and description.- Specified by:
browserInitializedin interfaceBrowserCoreListener- Parameters:
scene- The scene of the new content- See Also:
-
urlLoadFailed
The browser tried to load a URL and failed. It is typically because none of the URLs resolved to anything valid or there were network failures.- Specified by:
urlLoadFailedin interfaceBrowserCoreListener- Parameters:
msg- An error message to go with the failure
-
browserShutdown
public void browserShutdown()Description copied from interface:BrowserCoreListenerThe browser has been shut down and the previous content is no longer valid.- Specified by:
browserShutdownin interfaceBrowserCoreListener- See Also:
-
browserDisposed
public void browserDisposed()Description copied from interface:BrowserCoreListenerThe browser has been disposed, all resources may be freed.- Specified by:
browserDisposedin interfaceBrowserCoreListener- See Also:
-
deviceOver
Invoked when a sensor/anchor is in contact with a tracker capable of picking.- Specified by:
deviceOverin interfaceSensorStatusListener- Parameters:
type- The sensor typedesc- The sensor's description string
-
deviceNotOver
public void deviceNotOver(int type) Invoked when a tracker leaves contact with a sensor.- Specified by:
deviceNotOverin interfaceSensorStatusListener- Parameters:
type- The sensor type
-
deviceActivated
public void deviceActivated(int type) Invoked when a tracker activates the sensor. Anchors will not receive this event, they get a linkActivated call.- Specified by:
deviceActivatedin interfaceSensorStatusListener- Parameters:
type- The sensor type
-
linkActivated
Invoked when a tracker selects an object that represents a link to an external source.- Specified by:
linkActivatedin interfaceSensorStatusListener- Parameters:
urls- The urls to load in the order of preference defined by the nodeparams- The list of parameters provided with the node. Null if none.desc- The description that may be accompanying the link node
-
screenCaptured
Notification of a new screen capture. This will be in openGL pixel order.- Specified by:
screenCapturedin interfaceScreenCaptureListener- Parameters:
buffer- The screen capturewidth- The width in pixels of the captured screenheight- The height in pixels of the captured screen
-
initializeWorld
public void initializeWorld()Initialize the world to a known state. This is necessary to ensure that all of the underlying behaviors are active (which the buffering system relies on). As such, this method calls down to the browser core and common browser instances directly rather than using the SAI methods.
-