|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface VRMLScriptNodeType
Shell representation of a script node.
The script is different to all the other nodes. While it represents a script, it doesn't have the normal content of a node. This will be an interface to interact between the script and an external scripting engine. Quite how we are going to do this remains an interesting thing to consider.
When implementing this interface, the coder must be aware of how scripts fit into the larger event model picture. A script cannot act just on the content alone. It has certain other notification responsibilities that require extra hoops to be jumped through. In particular, there are the following requirements:
| Field Summary |
|---|
| Fields inherited from interface org.web3d.vrml.nodes.VRMLExternalNodeType |
|---|
LOAD_COMPLETE, LOAD_FAILED, LOADING, NOT_LOADED |
| Method Summary | |
|---|---|
int |
appendField(VRMLFieldDeclaration field)
Append a field declaration to this node. |
void |
eventsProcessed()
Notification by the route manager that an event cascade is complete. |
java.util.List |
getAllFields()
Make a listing of all fields that are currently registered in this node. |
VRMLExecutionSpace |
getExecutionSpace()
Get the execution space that this script is operating under. |
int |
getFieldCount()
Get the count of the number of fields currently registered. |
void |
initialize(double timestamp)
Notification that the script can now call the initialize() method on the user script code. |
void |
prepareEvents(double timestamp)
Notification to call the prepare-events for scripts at the start of the timestamp. |
void |
processEvents()
Notification by the route manager that an event cascade is complete. |
void |
setExecutionSpace(VRMLExecutionSpace space)
Set the execution space to be this new value. |
void |
shutdown()
Call shutdown on the user content now. |
void |
shutdownAll()
Completely shutdown this script node. |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLNodeType |
|---|
addNodeListener, clearRemovedLayerIds, getFieldValue, getLayerIds, getMetadataObject, getRefCount, getRemovedLayerIds, hasFieldChanged, isSetupFinished, notifyExternProtoLoaded, removeNodeListener, sendRoute, setDEF, setFrameStateManager, setMetadataObject, setupFinished, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, updateRefCount |
| Methods inherited from interface org.web3d.vrml.lang.VRMLNode |
|---|
getFieldDeclaration, getFieldIndex, getNodeFieldIndices, getNumFields, getPrimaryType, getSecondaryType, getUserData, getVRMLNodeName, isDEF, setErrorReporter, setUserData, setVersion |
| Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener |
|---|
allEventsComplete |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLSingleExternalNodeType |
|---|
checkValidContentType, getLoadState, getUrl, setContent, setLoadedURI, setLoadState, setUrl |
| Methods inherited from interface org.web3d.vrml.nodes.VRMLExternalNodeType |
|---|
addContentStateListener, addUrlListener, getWorldUrl, removeContentStateListener, removeUrlListener, setWorldUrl |
| Method Detail |
|---|
int getFieldCount()
int appendField(VRMLFieldDeclaration field)
throws FieldExistsException
field - The new field to add
FieldExistsException - A conflicting field of the same name
already exists for this nodejava.util.List getAllFields()
VRMLFieldDeclaration.
void setExecutionSpace(VRMLExecutionSpace space)
space - The space that this script is operating inVRMLExecutionSpace getExecutionSpace()
void prepareEvents(double timestamp)
timestamp - The time of the current frame in VRML timevoid processEvents()
processEvents() (or equivalent) on the script code.
void eventsProcessed()
eventsProcessed() on the script code.
void initialize(double timestamp)
timestamp - The VRML time that the initialisation occured atvoid shutdown()
void shutdownAll()
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||