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_SENSOR
Fields 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 TypeMethodDescriptionvoid
addBrowserListener adds the specified listener to the set of listeners for this browser.void
Add a listener for status messages.void
Lock the output from the external interface to the browser as the code is about to begin a series of updates.void
The browser has been disposed, all resources may be freed.void
browserInitialized
(VRMLScene scene) The browser has been initialised with new content.void
The browser has been shut down and the previous content is no longer valid.void
captureFrames
(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.void
deviceActivated
(int type) Invoked when a tracker activates the sensor.void
deviceNotOver
(int type) Invoked when a tracker leaves contact with a sensor.void
deviceOver
(int type, String desc) Invoked when a sensor/anchor is in contact with a tracker capable of picking.void
dispose()
Dispose the resources that are used by this instance.void
Release the output of events from the external interface into the VRML browser.void
Bind the first viewpoint in the list.void
firstViewpoint
(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.float
Get the current frame rate of the browser in frames per second.float
Get 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.int
Get 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.int
Get 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.void
Initialize the world to a known state.void
Bind the last viewpoint in the list.void
lastViewpoint
(int layer) Bind the last viewpoint in the list.void
linkActivated
(String[] urls, String[] params, String desc) Invoked when a tracker selects an object that represents a link to an external source.void
Load the URL as the new root of the scene.void
Bind the next viewpoint in the list.void
nextViewpoint
(int layer) Bind the next viewpoint in the list.void
Pause the render and event cascade evaluation system.void
Bind the previous viewpoint in the list.void
previousViewpoint
(int layer) Bind the previous viewpoint in the list.void
Print the message to the browser console without wrapping a new line onto it.void
Print the message to the browser console and append a new line onto it.void
removeBrowserListener removes the specified listener from the set of listeners for this browser.void
Remove a listener for status messages.void
replaceWorld
(X3DScene scene) Replace the current world with the given nodes.void
screenCaptured
(Buffer buffer, int width, int height) Notification of a new screen capture.void
Set the interceptor for the anchor node handling.void
setDescription
(String newDescription) Set the description of the current world.void
setErrorReporter
(Xj3DErrorReporter reporter) Set the handler for error messages.void
setMinimumFrameInterval
(int millis) Set the minimum frame interval time to limit the CPU resources taken up by the 3D renderer.void
setRenderingStyle
(int style) Change the rendering style that the browser should currently be using.void
Set the handler for processing screen captures.void
Start the render and event cascade evaluation system again after a pause or stop.void
Stop the render and event cascade evaluation system completely.void
urlLoadFailed
(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:
setErrorReporter
in 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:
addStatusListener
in 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:
removeStatusListener
in 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:
getCursorManager
in 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:
getCADView
in 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:
setMinimumFrameInterval
in 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:
getMinimumFrameInterval
in 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:
setRenderingStyle
in 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:
getRenderingStyle
in 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:
setAnchorListener
in 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:
captureFrames
in 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:
setScreenCaptureListener
in 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:
addBrowserListener
in 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:ExternalBrowser
Lock 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:
beginUpdate
in interfaceExternalBrowser
- Throws:
InvalidBrowserException
- The dispose method has been called on this browser reference.- See Also:
-
endUpdate
Description copied from interface:ExternalBrowser
Release 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:
endUpdate
in 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:
removeBrowserListener
in 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:Xj3DBrowser
Start 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:
startRender
in interfaceXj3DBrowser
- See Also:
-
pauseRender
public void pauseRender()Description copied from interface:Xj3DBrowser
Pause the render and event cascade evaluation system.- Specified by:
pauseRender
in interfaceXj3DBrowser
- See Also:
-
stopRender
public void stopRender()Description copied from interface:Xj3DBrowser
Stop the render and event cascade evaluation system completely. This will trigger the proper shutdown notifications being sent to all nodes and scripts.- Specified by:
stopRender
in interfaceXj3DBrowser
- See Also:
-
dispose
Description copied from interface:ExternalBrowser
Dispose 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:
dispose
in interfaceExternalBrowser
- Throws:
InvalidBrowserException
-
createScene
public X3DScene createScene(ProfileInfo profile, ComponentInfo[] components) throws InvalidBrowserException Description copied from interface:Browser
Create 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:
createScene
in 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:Browser
Parse 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:
createX3DFromString
in 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:Browser
Parse 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:
createX3DFromStream
in 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:Browser
Create 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:
createX3DFromURL
in 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:Browser
Get specific component info at the requested support level.- Specified by:
getComponentInfo
in 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:Browser
Get 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:
getCurrentSpeed
in 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:Browser
Get the current frame rate of the browser in frames per second.- Specified by:
getCurrentFrameRate
in 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:Browser
Get the information about the current scene. If no scene has been set then this will return null.- Specified by:
getExecutionContext
in 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:
getName
in 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:Browser
Get a specific profile.- Specified by:
getProfile
in interfaceBrowser
- Parameters:
name
- The profile name- Returns:
- The specified profile
- See Also:
-
getSupportedComponents
Description copied from interface:Browser
Get a listing of all the components that this browser implementation is capable of supporting.- Specified by:
getSupportedComponents
in interfaceBrowser
- Returns:
- The listing of all supported components
- See Also:
-
getSupportedProfiles
Description copied from interface:Browser
Get a listing of the profiles that this browser implementation is capable of supporting.- Specified by:
getSupportedProfiles
in interfaceBrowser
- Returns:
- The listing of all supported profiles
- See Also:
-
getVersion
Returns the version string for this Browser.- Specified by:
getVersion
in 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:Browser
A 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:
importDocument
in 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:Browser
Load 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:
loadURL
in 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:Browser
Replace 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:
replaceWorld
in 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:
getDescription
in 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:Browser
Set 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:
setDescription
in 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:
getRenderingProperties
in 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:
getBrowserProperties
in 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:Browser
Bind 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:
nextViewpoint
in interfaceBrowser
- Throws:
InvalidBrowserException
- The dispose method has been called on this browser reference.
-
nextViewpoint
Description copied from interface:Browser
Bind 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:
nextViewpoint
in 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:Browser
Bind 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:
previousViewpoint
in interfaceBrowser
- Throws:
InvalidBrowserException
- The dispose method has been called on this browser reference.
-
previousViewpoint
Description copied from interface:Browser
Bind 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:
previousViewpoint
in 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:Browser
Bind 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:
firstViewpoint
in interfaceBrowser
- Throws:
InvalidBrowserException
- The dispose method has been called on this browser reference.
-
firstViewpoint
Description copied from interface:Browser
Bind 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:
firstViewpoint
in 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:Browser
Bind the last viewpoint in the list.- Specified by:
lastViewpoint
in interfaceBrowser
- Throws:
InvalidBrowserException
- The dispose method has been called on this browser reference.
-
lastViewpoint
Description copied from interface:Browser
Bind the last viewpoint in the list.- Specified by:
lastViewpoint
in 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:
print
in 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:
println
in 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:BrowserCoreListener
The browser has been initialised with new content. The content given is found in the accompanying scene and description.- Specified by:
browserInitialized
in 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:
urlLoadFailed
in interfaceBrowserCoreListener
- Parameters:
msg
- An error message to go with the failure
-
browserShutdown
public void browserShutdown()Description copied from interface:BrowserCoreListener
The browser has been shut down and the previous content is no longer valid.- Specified by:
browserShutdown
in interfaceBrowserCoreListener
- See Also:
-
browserDisposed
public void browserDisposed()Description copied from interface:BrowserCoreListener
The browser has been disposed, all resources may be freed.- Specified by:
browserDisposed
in interfaceBrowserCoreListener
- See Also:
-
deviceOver
Invoked when a sensor/anchor is in contact with a tracker capable of picking.- Specified by:
deviceOver
in 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:
deviceNotOver
in 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:
deviceActivated
in interfaceSensorStatusListener
- Parameters:
type
- The sensor type
-
linkActivated
Invoked when a tracker selects an object that represents a link to an external source.- Specified by:
linkActivated
in 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:
screenCaptured
in 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.
-