nl.tudelft.simulation.dsol.animation.D3
Class Renderable3D

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Group
              extended by javax.media.j3d.BranchGroup
                  extended by nl.tudelft.simulation.dsol.animation.D3.Renderable3D
All Implemented Interfaces:
Renderable3DInterface

public abstract class Renderable3D
extends BranchGroup
implements Renderable3DInterface

Renderable3D, a 3d renderable
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:21:28 $
Author:
Roy Chin

Field Summary
protected  TransformGroup locationGroup
          Rotation group
protected  double scale
          Scale: temporary solution This scale is used to scale translations and can also be used to scale the model (shape).
protected  SimulatorInterface simulator
          the simulator
protected  LocatableInterface source
          the source of this animatableObject
protected  int type
          Type of renderable (world, static or simulated
 
Fields inherited from class javax.media.j3d.BranchGroup
ALLOW_DETACH
 
Fields inherited from class javax.media.j3d.Group
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Fields inherited from interface nl.tudelft.simulation.dsol.animation.D3.Renderable3DInterface
DYNAMIC_OBJECT, STATIC_OBJECT
 
Constructor Summary
Renderable3D(DirectedPoint staticLocation, BranchGroup branchGroup, SimulatorInterface simulator)
           
Renderable3D(DirectedPoint staticLocation, SimulatorInterface simulator)
           
Renderable3D(LocatableInterface source, SimulatorInterface simulator)
           
Renderable3D(Point2D staticLocation, SimulatorInterface simulator)
           
Renderable3D(SimulatorInterface simulator)
           
 
Method Summary
 double getScale()
           
 LocatableInterface getSource()
           
 int getType()
          returns the type
protected abstract  void provideModel(TransformGroup locationGroup)
          Provide the 3D model and add it to the locationGroup
 void setScale(double scale)
           
 void update()
          updates the renderable
protected abstract  void update(Enumeration children)
          Method update.
 
Methods inherited from class javax.media.j3d.BranchGroup
cloneNode, compile, detach, pickAll, pickAll, pickAllSorted, pickAllSorted, pickAny, pickAny, pickClosest, pickClosest
 
Methods inherited from class javax.media.j3d.Group
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

source

protected LocatableInterface source
the source of this animatableObject


simulator

protected SimulatorInterface simulator
the simulator


locationGroup

protected TransformGroup locationGroup
Rotation group


type

protected int type
Type of renderable (world, static or simulated


scale

protected double scale
Scale: temporary solution This scale is used to scale translations and can also be used to scale the model (shape). This is a temporary solution as we would actually like to scale the entire content branch, but this is not possible yet

Constructor Detail

Renderable3D

public Renderable3D(SimulatorInterface simulator)
Parameters:
simulator - SimulatorInterface

Renderable3D

public Renderable3D(DirectedPoint staticLocation,
                    SimulatorInterface simulator)
Parameters:
staticLocation - Point3d
simulator - SimulatorInterface

Renderable3D

public Renderable3D(DirectedPoint staticLocation,
                    BranchGroup branchGroup,
                    SimulatorInterface simulator)
Parameters:
staticLocation - Point3d
branchGroup - A branchGroup containing (a part of) the model
simulator - SimulatorInterface

Renderable3D

public Renderable3D(Point2D staticLocation,
                    SimulatorInterface simulator)
Parameters:
staticLocation - Point2D
simulator - SimulatorInterface

Renderable3D

public Renderable3D(LocatableInterface source,
                    SimulatorInterface simulator)
Parameters:
source - LocatableInterface
simulator - SimulatorInterface
Method Detail

provideModel

protected abstract void provideModel(TransformGroup locationGroup)
Provide the 3D model and add it to the locationGroup

Parameters:
locationGroup - The location of the object

update

public void update()
updates the renderable

Specified by:
update in interface Renderable3DInterface

update

protected abstract void update(Enumeration children)
Method update.

Parameters:
children - the children to update.

getSource

public LocatableInterface getSource()
Returns:
LocatableInterface

getType

public int getType()
returns the type

Specified by:
getType in interface Renderable3DInterface
Returns:
the returned type.

getScale

public double getScale()
Returns:
scale

setScale

public void setScale(double scale)
Parameters:
scale - Set the scale of the coordinates


Copyright © 2002-2010 Delft University of Technology, the Netherlands. All Rights Reserved.