Package org.web3d.vrml.nodes
Interface VRMLProtoInstance
- All Superinterfaces:
FrameStateListener
,VRMLExecutionSpace
,VRMLNode
,VRMLNodeType
- All Known Implementing Classes:
CRProtoInstance
,ProtoInstancePlaceHolder
A instance of a Prototype.
Can be placed anywhere a regular VRML node can. This representation allows access at the root node that is the first of the proto.
This proto may represent a prototype that comes from an external source. It is possible that when the implementation asks for a node it may still be loading it's contents. In this case, the value returned is null. It is an open question as to how we deal with notification that the node content has been loaded.
- Version:
- $Revision: 1.9 $
- Author:
- Alan Hudson, Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionMake a listing of all fields that are currently registered in this node.Get the list of all the body nodes in this proto instance.int
Get the count of the number of fields currently registered.Get the first node declared in the proto as that defines just how we we can add this into the scene graph.Methods inherited from interface org.web3d.vrml.nodes.FrameStateListener
allEventsComplete
Methods inherited from interface org.web3d.vrml.lang.VRMLExecutionSpace
getContainedScene
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.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
-
Method Details
-
getFieldCount
int getFieldCount()Get the count of the number of fields currently registered.- Returns:
- The number of fields available
-
getAllFields
List<VRMLFieldDeclaration> getAllFields()Make a listing of all fields that are currently registered in this node. The list contains instances ofVRMLFieldDeclaration
.- Returns:
- A list of the current field declarations
-
getImplementationNode
VRMLNodeType getImplementationNode()Get the first node declared in the proto as that defines just how we we can add this into the scene graph. If this is an empty prototype implementation, or represents an Extern proto that has not been loaded yet then this will return null.- Returns:
- The node instance that represents the first node
-
getBodyNodes
VRMLNodeType[] getBodyNodes()Get the list of all the body nodes in this proto instance. Nodes are defined in declaration order. Index 0 is always the same value as that returned bygetImplementationNode()
. This should be called sparingly. It is really only of use to something that needs to traverse the entire scene graph or for scripting to provide access to the root of the scene.- Returns:
- The list of nodes from the body
-