com.sun.j3d.loaders
Interface Scene
- All Known Implementing Classes:
- SceneBase
- public interface Scene
The Scene interface is a set of methods used to extract
Java 3D scene graph information from a file loader utility.
Ideally this data was loaded into the loader utility via
The interface is used to give loaders of various
file formats a common public interface.
Method Summary |
Background[] |
getBackgroundNodes()
This method returns an array of all Background nodes defined in the
file. |
Behavior[] |
getBehaviorNodes()
This method returns an array of all the behavior nodes
in the scene. |
java.lang.String |
getDescription()
This method returns the text description of the file. |
Fog[] |
getFogNodes()
This method returns an array of all Fog nodes defined in the
file. |
float[] |
getHorizontalFOVs()
This method returns an array of floats with the horizontal field
of view. |
Light[] |
getLightNodes()
This method returns an array of all Lights defined in the file. |
java.util.Hashtable |
getNamedObjects()
This method returns a Hashtable which contains a list of all named
objects in the file and their associated scene graph objects. |
BranchGroup |
getSceneGroup()
This method returns the BranchGroup containing the overall
scene loaded by the loader. |
Sound[] |
getSoundNodes()
This method returns an array of all of the Sound nodes defined
in the file. |
TransformGroup[] |
getViewGroups()
This method returns an array of all View Groups defined in the file. |
getSceneGroup
public BranchGroup getSceneGroup()
- This method returns the BranchGroup containing the overall
scene loaded by the loader. All enabled items will be loaded
into this scene except for Behaviors (the Behavior group must be
retrieved separately so that users can choose whether and when
to activate behaviors).
getViewGroups
public TransformGroup[] getViewGroups()
- This method returns an array of all View Groups defined in the file.
Each View Group is a TransformGroup that is already placed within
the scene that is returned in the getSceneGroup() call. This
TransformGroup holds the position/orientation of the view
as defined by the file. A user might request these references to
the groups in order to look at the data stored there or
to place ViewPlatforms within these groups and allow the
View to activate these ViewPlatforms so that the user would
see the scene from the viewpoints defined in the file.
getHorizontalFOVs
public float[] getHorizontalFOVs()
- This method returns an array of floats with the horizontal field
of view. The entries in the array will correspond to those in the
array returned by the method getViewGroups. The entries from these
two arrays together provide all the information needed to recreate
the viewing parameters associated with a scene graph.
getLightNodes
public Light[] getLightNodes()
- This method returns an array of all Lights defined in the file.
If no lights are defined, null is returned.
getNamedObjects
public java.util.Hashtable getNamedObjects()
- This method returns a Hashtable which contains a list of all named
objects in the file and their associated scene graph objects. The
naming scheme for file objects is file-type dependent, but may include
such names as the DEF names of Vrml or filenames of objects (as
in Lightwave 3D). If no named objects are defined, null is returned.
getBackgroundNodes
public Background[] getBackgroundNodes()
- This method returns an array of all Background nodes defined in the
file. IF no Background nodes are defined, null is returned.
getFogNodes
public Fog[] getFogNodes()
- This method returns an array of all Fog nodes defined in the
file. If no fog nodes are defined, null is returned.
getBehaviorNodes
public Behavior[] getBehaviorNodes()
- This method returns an array of all the behavior nodes
in the scene. If no Behavior nodes are defined, null is returned.
getSoundNodes
public Sound[] getSoundNodes()
- This method returns an array of all of the Sound nodes defined
in the file. If no Sound nodes are defined, null is returned.
getDescription
public java.lang.String getDescription()
- This method returns the text description of the file. If no
such description exists, this method should return null.