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
 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.
 

Method Detail

getSceneGroup

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

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

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

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

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

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

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.



Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.