|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.web3d.vrml.lang.AbstractScene
org.web3d.vrml.renderer.CRVRMLScene
public class CRVRMLScene
A representation of a complete scene in VRML and X3D.
The scene returns lists of nodes of the given type. This list contains all of the nodes of that type in the order that they are declared in the incoming stream. As the scene changes due to scripting and external interactions, it will add new instances of these nodes to the end of the list. If there is none of the given node types, the methods shall return empty lists.
| Field Summary |
|---|
| Fields inherited from class org.web3d.vrml.lang.AbstractScene |
|---|
allNodes, loadedURI, majorVersion, metaData, minorVersion, nodeFactory, rootNode, routeList, templateList, templateMap, worldURL |
| Constructor Summary | |
|---|---|
CRVRMLScene(int major,
int minor)
Construct a new default instance of this class. |
|
| Method Summary | |
|---|---|
void |
addExportedNode(java.lang.String name,
java.lang.String def)
Add a new export name to the map. |
void |
addExternProto(VRMLExternProtoDeclare node)
Add a new EXTERNPROTO instance to the internal list. |
void |
addNode(VRMLNode node)
Add a node to this scene. |
void |
addProto(VRMLProtoDeclare node)
Add a new proto instance to the internal list. |
void |
addRoute(ROUTE node)
Add a new ROUTE instance to the internal list. |
void |
addRoute(VRMLNodeType fromNode,
int fromField,
VRMLNodeType toNode,
int toField)
Add a new ROUTE to the internal list. |
void |
addTemplate(VRMLNodeTemplate template)
Add a new template to this scene. |
java.util.Map |
getExports()
Get the list of exports from this file. |
java.util.Map |
getExternProtos()
Get the list of EXTERNPROTOs declared in this scene. |
VRMLLayerSetNodeType |
getFirstLayerSet()
Get the first LayerSet declared in this scene. |
VRMLProtoDeclare |
getFirstProto()
Get the first PROTO declared in this scene. |
java.util.Map |
getProtos()
Get the list of ordinary PROTO's declared in this scene. |
void |
removeExportedNode(java.lang.String name)
Remove a export name from the map. |
void |
removeExternProto(VRMLExternProtoDeclare node)
Remove an EXTERNPROTO instance from the internal list. |
void |
removeNode(VRMLNode node)
Remove a node from this scene. |
void |
removeProto(VRMLProtoDeclare node)
Remove a proto instance from the internal list. |
void |
removeRoute(ROUTE node)
Remove a route instance from the internal list. |
void |
removeTemplate(VRMLNodeTemplate template)
Remove a template from this scene. |
void |
setMetaData(SceneMetaData data)
Set the meta data to be associated with this scene. |
| Methods inherited from class org.web3d.vrml.lang.AbstractScene |
|---|
addDEFNode, addImportedNode, getByPrimaryType, getBySecondaryType, getDEFNodes, getImports, getLayerId, getLoadedURI, getMetaData, getNodeFactory, getNodeTemplate, getNodeTemplates, getRootNode, getRoutes, getSpecificationMajorVersion, getSpecificationMinorVersion, getWorldRootURL, removeDEFNode, removeImportedNode, setLayerId, setLoadedURI, setNodeFactory, setRootNode, setWorldRootURL |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.web3d.vrml.lang.BasicScene |
|---|
getByPrimaryType, getBySecondaryType, getDEFNodes, getImports, getLayerId, getLoadedURI, getMetaData, getNodeFactory, getNodeTemplate, getNodeTemplates, getRootNode, getRoutes, getSpecificationMajorVersion, getSpecificationMinorVersion, getWorldRootURL, setLayerId, setNodeFactory |
| Constructor Detail |
|---|
public CRVRMLScene(int major,
int minor)
major - The major version number of this sceneminor - The minor version number of this scene| Method Detail |
|---|
public VRMLProtoDeclare getFirstProto()
getFirstProto in interface VRMLScenepublic VRMLLayerSetNodeType getFirstLayerSet()
getFirstLayerSet in interface VRMLScenepublic java.util.Map getProtos()
getProtos in interface VRMLScenepublic java.util.Map getExternProtos()
getExternProtos in interface VRMLScenepublic java.util.Map getExports()
getExports in interface VRMLScenepublic void addNode(VRMLNode node)
addNode in interface BasicSceneaddNode in class AbstractScenenode - The node to addpublic void removeNode(VRMLNode node)
removeNode in interface BasicSceneremoveNode in class AbstractScenenode - The node to addpublic void setMetaData(SceneMetaData data)
public void addRoute(ROUTE node)
node - The new ROUTE instance to be added
public void addRoute(VRMLNodeType fromNode,
int fromField,
VRMLNodeType toNode,
int toField)
fromNode - The source nodefromField - The source field indextoNode - The destination nodetoField - The destination field indexpublic void removeRoute(ROUTE node)
node - The ROUTE to removepublic void addTemplate(VRMLNodeTemplate template)
addTemplate in interface BasicSceneaddTemplate in class AbstractScenetemplate - The new template instance to usepublic void removeTemplate(VRMLNodeTemplate template)
removeTemplate in interface BasicSceneremoveTemplate in class AbstractScenetemplate - The template instance to removepublic void addProto(VRMLProtoDeclare node)
node - The new proto instance to be addedpublic void removeProto(VRMLProtoDeclare node)
node - The new proto instance to be removedpublic void addExternProto(VRMLExternProtoDeclare node)
node - The new EXTERNPROTO instance to be addedpublic void removeExternProto(VRMLExternProtoDeclare node)
node - The EXTERNPROTO instance to be removed
public void addExportedNode(java.lang.String name,
java.lang.String def)
name - The name of the node to be replaceddef - The DEF name of the local node, may be nullpublic void removeExportedNode(java.lang.String name)
name - The name of the node to be removed
|
Xj3D 2.0 VRML/X3D Code API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||