Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.nodes
Interface VRMLScene

All Superinterfaces:
BasicScene
All Known Implementing Classes:
CRVRMLScene, SAIVRMLScene

public interface VRMLScene
extends BasicScene

Abstract representation of a complete scene in VRML.

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.

Version:
$Revision: 1.19 $
Author:
Justin Couch

Method Summary
 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.
 
Methods inherited from interface org.web3d.vrml.lang.BasicScene
addNode, addTemplate, getByPrimaryType, getBySecondaryType, getDEFNodes, getImports, getLayerId, getLoadedURI, getMetaData, getNodeFactory, getNodeTemplate, getNodeTemplates, getRootNode, getRoutes, getSpecificationMajorVersion, getSpecificationMinorVersion, getWorldRootURL, removeNode, removeTemplate, setLayerId, setNodeFactory
 

Method Detail

getFirstProto

VRMLProtoDeclare getFirstProto()
Get the first PROTO declared in this scene. EXTERNPROTO's are not included in this list. If no protos are declared it will return null.

Returns:
The first proto declared or null

getFirstLayerSet

VRMLLayerSetNodeType getFirstLayerSet()
Get the first LayerSet declared in this scene. If there is no LayerSet defined, return null.

Returns:
The first proto declared or null

getProtos

java.util.Map getProtos()
Get the list of ordinary PROTO's declared in this scene. EXTERNPROTOs are not included in this list.

Returns:
The list of proto declarations in this scene

getExternProtos

java.util.Map getExternProtos()
Get the list of EXTERNPROTOs declared in this scene. The instances may or may not have been loaded at this point. Check with the interface declaration to see if this is the case.

Returns:
The list of EXTERNPROTO instances in this scene

getExports

java.util.Map getExports()
Get the list of exports from this file. The map is the exported name to the node def name. To fetch the real node instance you then need to make another call to getDEFNodes(). 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

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium