nl.tudelft.simulation.dsol.animation
Class Editable

java.lang.Object
  extended bynl.tudelft.simulation.event.EventProducer
      extended bynl.tudelft.simulation.dsol.animation.Editable
All Implemented Interfaces:
nl.tudelft.simulation.event.EventProducerInterface, LocatableInterface, java.io.Serializable

public abstract class Editable
extends nl.tudelft.simulation.event.EventProducer
implements LocatableInterface

An Editable object is a simulation object that can be edited by the user. That means that the user is capable of instantiating, moving, rotating, and editing the vertices that span up the shape of this object during the simulation.

(c) copyright 2003 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Since:
1.4
Version:
1.2 Aug 3, 2004
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
protected  javax.media.j3d.Bounds bounds
          the location of the bounds
protected  nl.tudelft.simulation.language.d3.DirectedPoint location
          the location of the editable
static nl.tudelft.simulation.event.EventType LOCATION_CHANGED_EVENT
          LOCATION_CHANGED_EVENT the LOCATION_CHANGED_EVENT
protected  SimulatorInterface simulator
          the simulator to use
protected  nl.tudelft.simulation.language.d3.CartesianPoint[] vertices
          the vertices
 
Fields inherited from class nl.tudelft.simulation.event.EventProducer
listeners
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
Editable(SimulatorInterface simulator, nl.tudelft.simulation.language.d3.DirectedPoint location)
          constructs a new Editable
 
Method Summary
 javax.media.j3d.Bounds getBounds()
          returns the bounds of the locatable object.
 nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
          returns the location of an object
 nl.tudelft.simulation.language.d3.CartesianPoint[] getVertices()
           
static java.util.Map listEditables()
          returns the editables as a list of name=class
 void setBounds(javax.media.j3d.Bounds bounds)
           
 void setLocation(nl.tudelft.simulation.language.d3.DirectedPoint location)
           
 void setVertices(nl.tudelft.simulation.language.d3.CartesianPoint[] vertices)
           
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCATION_CHANGED_EVENT

public static final nl.tudelft.simulation.event.EventType LOCATION_CHANGED_EVENT
LOCATION_CHANGED_EVENT the LOCATION_CHANGED_EVENT


simulator

protected SimulatorInterface simulator
the simulator to use


location

protected nl.tudelft.simulation.language.d3.DirectedPoint location
the location of the editable


bounds

protected javax.media.j3d.Bounds bounds
the location of the bounds


vertices

protected nl.tudelft.simulation.language.d3.CartesianPoint[] vertices
the vertices

Constructor Detail

Editable

public Editable(SimulatorInterface simulator,
                nl.tudelft.simulation.language.d3.DirectedPoint location)
constructs a new Editable

Parameters:
simulator - the simulator to schedule on
location - the initial location
Method Detail

listEditables

public static java.util.Map listEditables()
returns the editables as a list of name=class

Returns:
the map

getVertices

public nl.tudelft.simulation.language.d3.CartesianPoint[] getVertices()
Returns:
@throws RemoteException

setBounds

public void setBounds(javax.media.j3d.Bounds bounds)
Parameters:
bounds -

setLocation

public void setLocation(nl.tudelft.simulation.language.d3.DirectedPoint location)
Parameters:
location -

setVertices

public void setVertices(nl.tudelft.simulation.language.d3.CartesianPoint[] vertices)
Parameters:
vertices -

getBounds

public javax.media.j3d.Bounds getBounds()
Description copied from interface: LocatableInterface
returns the bounds of the locatable object. The bounds is the not rotated bounds around [0;0;0]

Specified by:
getBounds in interface LocatableInterface
Returns:
BoundingBox include this.getLocation() as center of the box..
See Also:
LocatableInterface.getBounds()

getLocation

public nl.tudelft.simulation.language.d3.DirectedPoint getLocation()
Description copied from interface: LocatableInterface
returns the location of an object

Specified by:
getLocation in interface LocatableInterface
Returns:
DirectedPoint the location
See Also:
LocatableInterface.getLocation()


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