net.jbeans.j3d.modeler.scene
Class SceneModeler

java.lang.Object
  extended bynet.jbeans.j3d.modeler.scene.SceneModeler
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
GlyphModeler, ImageModeler

public abstract class SceneModeler
extends java.lang.Object
implements java.io.Serializable

SceneModeler is an abstract and super class of all modelers to create javax.media.j3d.BranchGroup object from data.

Version:
$Revision: 1.3 $
Author:
Masahiro Takatsuka (masa@jbeans.net)
See Also:
Serializable, Serialized Form

Field Summary
protected  double[] bounds
           
protected  double[] center
           
protected  javax.swing.event.EventListenerList sceneListeners
           
protected  java.util.Vector scenes
          A Vector object containing the scene graph(s) representing the scene.
 
Constructor Summary
SceneModeler()
          a null-constructor.
 
Method Summary
protected  void addScene(javax.media.j3d.BranchGroup bGroup)
           
protected  void addScene(int index, javax.media.j3d.BranchGroup bGroup)
           
 void addSceneListener(SceneGraphObjectListener l)
          adds an GeometryListener to the shape
protected  void clearScene()
           
protected  void detachScene()
          detach the all BranchGroup in this.scenes from listeners.
 double[] getBounds()
           
 void getBounds(double[] bounds)
          Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
 double[] getCenter()
           
 double getLength()
           
 javax.media.j3d.BranchGroup getScene()
          Returns the current shape object.
 javax.media.j3d.BranchGroup[] getScenes()
          Returns the current shape object.
protected  void model()
          Construct a javax.media.j3d.Node object.
protected abstract  void modelScene()
           
 void removeSceneListener(SceneGraphObjectListener l)
          removes an GeometryListener from the shape.
protected  void setScene(javax.media.j3d.BranchGroup bGroup)
           
protected  void update()
          Update a javax.media.j3d.BranchGroup object.
protected abstract  void updateScene()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sceneListeners

protected transient javax.swing.event.EventListenerList sceneListeners

bounds

protected transient double[] bounds

center

protected transient double[] center

scenes

protected transient java.util.Vector scenes
A Vector object containing the scene graph(s) representing the scene.

Constructor Detail

SceneModeler

public SceneModeler()
a null-constructor.

Method Detail

modelScene

protected abstract void modelScene()

updateScene

protected abstract void updateScene()

model

protected void model()
Construct a javax.media.j3d.Node object.


update

protected void update()
Update a javax.media.j3d.BranchGroup object.


clearScene

protected void clearScene()

setScene

protected void setScene(javax.media.j3d.BranchGroup bGroup)

addScene

protected void addScene(javax.media.j3d.BranchGroup bGroup)

addScene

protected void addScene(int index,
                        javax.media.j3d.BranchGroup bGroup)

getScene

public javax.media.j3d.BranchGroup getScene()
Returns the current shape object.


getScenes

public javax.media.j3d.BranchGroup[] getScenes()
Returns the current shape object.


addSceneListener

public void addSceneListener(SceneGraphObjectListener l)
adds an GeometryListener to the shape


removeSceneListener

public void removeSceneListener(SceneGraphObjectListener l)
removes an GeometryListener from the shape.


detachScene

protected void detachScene()
detach the all BranchGroup in this.scenes from listeners.


getBounds

public double[] getBounds()

getBounds

public void getBounds(double[] bounds)
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).


getCenter

public double[] getCenter()

getLength

public double getLength()


Copyright © 1995-2004 net.jbeans. All Rights Reserved.