Class WF3DScene

java.lang.Object
  |
  +--WF3DNode
        |
        +--WF3DScene

public class WF3DScene
extends WF3DNode

This class represent a VRML scene graph by acting as the root node for the scene graph hierarchy. Access into the scene graph is given by methods found in the super-class WF3DNode, and is used in the same way as from any other node (see the nodes.Scene class).

This class is also used to access, load and replace scenes, as well as loading image files to use as textures.


Field Summary
 
Fields inherited from class WF3DNode
name, type
 
Method Summary
 void addRoute(WF3DField fromField, WF3DField ToField)
           
 void deleteRoute(WF3DField fromField, WF3DField ToField)
           
static WF3DScene getRunningScene(java.lang.String sceneFileName)
          Retrieves the running scene containing the scene graph of the specified WF-VRML file (.wf.wrl).
static WF3DImg loadImage(java.lang.String imageFileName)
          Loads an image with the specified file name.
static WF3DScene loadScene(java.lang.String sceneFileName)
          Loads and creates a scene containing the scene graph of the specified WF-VRML file (.wf.wrl).
static void replaceScene(java.lang.String runningSceneFileName, WF3DScene newScene)
          Replaces the running scene with the specified name with a new scene.
 void setViewpoint(WF3DNode viewpoint)
           
 void viewpointMove(float moveX, float moveY, float moveZ)
           
 void viewpointRotN(float Nx, float Ny, float Nz, float angle)
           
 
Methods inherited from class WF3DNode
addChild, clone, getChildren, getField, getNode, getNode, getParent, makeUSEInstance, move, removeChild, rotN, scale
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setViewpoint

public void setViewpoint(WF3DNode viewpoint)

viewpointMove

public void viewpointMove(float moveX,
                          float moveY,
                          float moveZ)

viewpointRotN

public void viewpointRotN(float Nx,
                          float Ny,
                          float Nz,
                          float angle)

addRoute

public void addRoute(WF3DField fromField,
                     WF3DField ToField)

deleteRoute

public void deleteRoute(WF3DField fromField,
                        WF3DField ToField)

getRunningScene

public static WF3DScene getRunningScene(java.lang.String sceneFileName)
Retrieves the running scene containing the scene graph of the specified WF-VRML file (.wf.wrl).

Parameters:
sceneFileName - the name of the file the running scene is displaying.
Returns:
the running scene.

loadScene

public static WF3DScene loadScene(java.lang.String sceneFileName)
Loads and creates a scene containing the scene graph of the specified WF-VRML file (.wf.wrl).

Parameters:
sceneFileName - the name of the file to load.
Returns:
the loaded scene.

loadImage

public static WF3DImg loadImage(java.lang.String imageFileName)
Loads an image with the specified file name. The returned array object can be used to set the image field of a Texture node as follows:
aTextureNode.getField (Nodes.Texture.image).set (WF3DScene.loadImage ("myImage.jpg"))

Parameters:
imageFileName - the name of the image file to load.
Returns:
the image in the WF3D image format.

replaceScene

public static void replaceScene(java.lang.String runningSceneFileName,
                                WF3DScene newScene)
Replaces the running scene with the specified name with a new scene.

Parameters:
runningSceneFileName - the name of the WF-VRML file (.wf.wrl) the running scene is associated with.
newScene - the new scene to be used.