Package org.web3d.x3d.sai
Interface X3DScriptImplementation
- All Known Subinterfaces:
X3DPerFrameObserverScript
public interface X3DScriptImplementation
Marker interface to say that the implementing class is allowed to be
executed as a script within the X3D scene graph.
- Version:
- $Revision: 1.7 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Notification that all the events in the current cascade have finished processing.void
Notification that the script has completed the setup and should go about its own internal initialization.void
setBrowser
(Browser browser) Set the browser instance to be used by this script implementation.void
setFields
(X3DScriptNode externalView, Map<String, X3DField> fields) Set the listing of fields that have been declared in the file for this node.void
shutdown()
Notification that this script instance is no longer in use by the scene graph and should now release all resources.
-
Method Details
-
setBrowser
Set the browser instance to be used by this script implementation. This shall be called by the browser code to give the script a handle to the browser's interface. It shall be only called once in the lifetime of a script implementation before the initialize() method is called.- Parameters:
browser
- The browser reference to keep
-
setFields
Set the listing of fields that have been declared in the file for this node. The map contains field name string to field object instances. If no fields are available, then this method shall still be called, but with an empty map.- Parameters:
externalView
- The external view of ourselves, so you can add routes to yourself using the standard API callsfields
- The mapping of field names to instances
-
initialize
void initialize()Notification that the script has completed the setup and should go about its own internal initialization. This shall be called after thesetBrowser(Browser)
andsetFields(X3DScriptNode, Map)
methods have been called. -
shutdown
void shutdown()Notification that this script instance is no longer in use by the scene graph and should now release all resources. -
eventsProcessed
void eventsProcessed()Notification that all the events in the current cascade have finished processing.
-