|
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 VRMLNodeType
Supplemental representation of any renderable node in the VRML system along with the methods required to manage the rendering process.
Each node contains a collection of fields. Each field has a fixed index for all instances of this node. Field values are set using the setValue() method for the appropriate data type. The node implementation must make sure that values are only being set when permitted. InitializeOnly fields can only be set before the setupFinished() function is called and should otherwise issue an exception.
| Method Summary | |
|---|---|
void |
addNodeListener(VRMLNodeListener l)
Add a listener to this node instance. |
void |
clearRemovedLayerIds()
Clear the current removed layer ID list. |
VRMLFieldData |
getFieldValue(int index)
Get the value of a field. |
int[] |
getLayerIds()
Get a listing of the current layer IDs that are directly or indirectly referencing this node. |
VRMLNodeType |
getMetadataObject()
Get the currently registered metadata object instance. |
int |
getRefCount(int layer)
Ask for the current number of references to this object in the given layer. |
int[] |
getRemovedLayerIds()
Get the list of layer IDs that this node has just been removed from. |
boolean |
hasFieldChanged(int index)
Check to see if the given field has changed since we last checked. |
boolean |
isSetupFinished()
Check to see if setupFinished() has already been called on this node. |
void |
notifyExternProtoLoaded(int index,
VRMLNodeType node)
Notify a node that an ExternProto has resolved. |
void |
removeNodeListener(VRMLNodeListener l)
Remove a listener from this node instance. |
void |
sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
Send a routed value from this node to the given destination node. |
void |
setDEF()
Notify this node that is has been DEFd. |
void |
setFrameStateManager(FrameStateManager mgr)
Tell the node about the frame registration state manager to use. |
void |
setMetadataObject(VRMLNodeType metadata)
Set the X3DMetadataObject that is associated with this node. |
void |
setupFinished()
Notification that the construction phase of this node has finished. |
void |
setValue(int index,
boolean value)
Set the value of the field at the given index as an boolean. |
void |
setValue(int index,
boolean[] value,
int numValid)
Set the value of the field at the given index as an array of boolean. |
void |
setValue(int index,
double value)
Set the value of the field at the given index as an double. |
void |
setValue(int index,
double[] value,
int numValid)
Set the value of the field at the given index as an array of doubles. |
void |
setValue(int index,
float value)
Set the value of the field at the given index as a float. |
void |
setValue(int index,
float[] value,
int numValid)
Set the value of the field at the given index as an array of floats. |
void |
setValue(int index,
int value)
Set the value of the field at the given index as an integer. |
void |
setValue(int index,
int[] value,
int numValid)
Set the value of the field at the given index as an array of integers. |
void |
setValue(int index,
long value)
Set the value of the field at the given index as an long. |
void |
setValue(int index,
long[] value,
int numValid)
Set the value of the field at the given index as an array of longs. |
void |
setValue(int index,
java.lang.String value)
Set the value of the field at the given index as a string. |
void |
setValue(int index,
java.lang.String[] value,
int numValid)
Set the value of the field at the given index as an array of strings. |
void |
setValue(int index,
VRMLNodeType child)
Set the value of the field at the given index as a node. |
void |
setValue(int index,
VRMLNodeType[] children,
int numValid)
Set the value of the field at the given index as an array of nodes. |
void |
updateRefCount(int layer,
boolean add)
Change the reference count up or down by one for a given layer ID. |
| 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 |
| Method Detail |
|---|
void setMetadataObject(VRMLNodeType metadata)
throws InvalidFieldValueException
metadata - The node to register as the metadata
InvalidFieldValueException - The object instance provided
does not implment VRMLMetadataNodeType or is not a proto instance
that encapsulates it as it's primary typeVRMLNodeType getMetadataObject()
void setDEF()
java.lang.IllegalStateException - The setup is finished.int getRefCount(int layer)
layer - The id of the layer to get the ref count for
void updateRefCount(int layer,
boolean add)
getLayerIds().
layer - The id of the layer to modify the ref count onadd - true to increment the reference count, false to decrementint[] getLayerIds()
int[] getRemovedLayerIds()
clearRemovedLayerIds() call.
void clearRemovedLayerIds()
void setFrameStateManager(FrameStateManager mgr)
mgr - The manager instance to useboolean hasFieldChanged(int index)
index - The index of the field to change
void addNodeListener(VRMLNodeListener l)
l - The listener instance to addvoid removeNodeListener(VRMLNodeListener l)
l - The listener to be removed
void notifyExternProtoLoaded(int index,
VRMLNodeType node)
throws InvalidFieldValueException
index - The field indexnode - The node resolved
InvalidFieldValueException
VRMLFieldData getFieldValue(int index)
throws InvalidFieldException
index - The index of the field to change.
InvalidFieldException - The field index is not knownvoid setupFinished()
boolean isSetupFinished()
void sendRoute(double time,
int srcIndex,
VRMLNodeType destNode,
int destIndex)
time - The time that this route occurred (not necessarily epoch
time. Should be treated as a relative value only)srcIndex - The index of the field in this node that the value
should be sent fromdestNode - The node reference that we will be sending the value todestIndex - The index of the field in the destination node that
the value should be sent to.
void setValue(int index,
int value)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
int[] value,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the nodenumValid - The number of valid values to copy from the array
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
boolean value)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
boolean[] value,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the nodenumValid - The number of valid values to copy from the array
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
float value)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
float[] value,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the nodenumValid - The number of valid values to copy from the array
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
long value)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
long[] value,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the nodenumValid - The number of valid values to copy from the array
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
double value)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
double[] value,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the nodenumValid - The number of valid values to copy from the array
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
java.lang.String value)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the node
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
java.lang.String[] value,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setvalue - The new value to use for the nodenumValid - The number of valid values to copy from the array
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided is not in range
or not appropriate for this field
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
VRMLNodeType child)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setchild - The new value to use for the node
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided does not fit this
type of node
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
void setValue(int index,
VRMLNodeType[] children,
int numValid)
throws InvalidFieldException,
InvalidFieldValueException,
InvalidFieldAccessException
index - The index of destination field to setchildren - The new value to use for the nodenumValid - The number of valid values to copy from the array
InvalidFieldException - The field index is not known
InvalidFieldValueException - The value provided does not fit this
type of node
InvalidFieldAccessException - The call is attempting to write to
a field that does not permit writing now
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||