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. The interface is used to give loaders of various file formats a common public interface.


Method Summary
 javax.media.j3d.Background[] getBackgroundNodes()
          This method returns an array of all Background nodes defined in the file.
 javax.media.j3d.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.
 javax.media.j3d.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.
 javax.media.j3d.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.
 javax.media.j3d.BranchGroup getSceneGroup()
          This method returns the BranchGroup containing the overall scene loaded by the loader.
 javax.media.j3d.Sound[] getSoundNodes()
          This method returns an array of all of the Sound nodes defined in the file.
 javax.media.j3d.TransformGroup[] getViewGroups()
          This method returns an array of all View Groups defined in the file.
 

Method Detail

getSceneGroup

javax.media.j3d.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

javax.media.j3d.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

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

javax.media.j3d.Light[] getLightNodes()
This method returns an array of all Lights defined in the file. If no lights are defined, null is returned.


getNamedObjects

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

javax.media.j3d.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

javax.media.j3d.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

javax.media.j3d.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

javax.media.j3d.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

java.lang.String getDescription()
This method returns the text description of the file. If no such description exists, this method should return null.