Package org.web3d.x3d.sai
Interface X3DScene
- All Superinterfaces:
X3DExecutionContext
Abstract representation of a complete X3D scene graph.
All queries to this interface return a snapshot of the current information. If the scene graph changes while the end user has a handle to an map, the map shall not be updated to reflect the new internal state. If the end user adds something to the maps, it shall not be representing in the underlying scene.
- Version:
- $Revision: 1.7 $
- Author:
- Justin Couch
-
Field Summary
Fields inherited from interface org.web3d.x3d.sai.X3DExecutionContext
ASCII_ENCODING, BIFS_ENCODING, BINARY_ENCODING, LAST_STD_ENCODING, NO_SCENE, SCRIPTED_ENCODING, VRML_ENCODING, XML_ENCODING
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMetaData
(String name, String value) Add a meta tag data item to this scene.void
addRootNode
(X3DNode node) Add a new root node to the scene graph.getExportedNode
(String name) Get the node which is exported from the scene under a givenString[]
Get the list of exports from this file.Get the meta data mapping from this scene.void
removeExportedNode
(String name) Remove an exported name from the scene.void
removeMetaData
(String name) Remove the named tag from the map.void
removeRootNode
(X3DNode node) Remove the root node from the scene graph.void
updateExportedNode
(String localName, String exportName) Add a named node to this scene.Methods inherited from interface org.web3d.x3d.sai.X3DExecutionContext
addRoute, createNode, createProto, getComponents, getEncoding, getExternProtoDeclaration, getExternProtoNames, getImportedNode, getNamedNode, getNamedNodes, getProfile, getProtoDeclaration, getProtosNames, getRootNodes, getRoutes, getSpecificationVersion, getWorldURL, removeExternProtoDeclaration, removeImportedNode, removeNamedNode, removeProtoDeclaration, removeRoute, updateExternProtoDeclaration, updateImportedNode, updateNamedNode, updateProtoDeclaration
-
Method Details
-
addMetaData
Add a meta tag data item to this scene. Both name and value must be non-null.- Parameters:
name
- The name of the tag to addvalue
- The value of the tag- Throws:
NullPointerException
- The name or value were null
-
getMetaData
-
removeMetaData
Remove the named tag from the map. If tag name does not exist, the request is silently ignored.- Parameters:
name
- The name of the tag to remove
-
getExportedNode
-
getExportedNodes
String[] getExportedNodes()Get the list of exports from this file. The map is the exported name to the node instance. If there are no nodes exported, the map will be empty. Note that exported nodes is not a valid concept for VRML97. It only exists for X3D V3.0 and above.- Returns:
- A map of the exported nodes
-
updateExportedNode
Add a named node to this scene. The node must be a valid member of this scene already. If not, an error is generated. An exported name may be null, in which case the local name is used as the export name- Parameters:
localName
- The local DEF name in this sceneexportName
- The name to export the node as, or null
-
removeExportedNode
Remove an exported name from the scene. If the node is not currently exported this is silently ignored. The name is first checked against the explicit export names and then against the DEF names that are exported without using the AS keyword.- Parameters:
name
- The exported name to remove
-
addRootNode
Add a new root node to the scene graph. This must be a valid child node type or proto instance that can be a child node, as per the VRML specification. If the node is already part of this scene, this is treated as an implicit USE of the node at the root of the scene graph and the normal rules will apply.- Parameters:
node
- The node pointer to add to the scene
-
removeRootNode
Remove the root node from the scene graph. This must be a valid child node type or proto instance, as per the VRML specification. If the node is not a root node then an exception is generated.- Parameters:
node
- the node to remove
-