Class Editable

java.lang.Object
org.djutils.event.LocalEventProducer
nl.tudelft.simulation.dsol.animation.Editable
All Implemented Interfaces:
Serializable, Remote, Locatable, org.djutils.event.EventProducer

public abstract class Editable extends org.djutils.event.LocalEventProducer implements Locatable
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.

Copyright (c) 2003-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Since:
1.5
Author:
Peter Jacobs
See Also:
  • Field Details

    • simulator

      protected SimulatorInterface<?> simulator
      the simulator to use.
    • location

      protected OrientedPoint3d location
      the location of the editable.
    • bounds

      protected Bounds3d bounds
      the location of the bounds.
    • vertices

      protected CartesianPoint[] vertices
      the vertices.
  • Constructor Details

    • Editable

      public Editable(SimulatorInterface<?> simulator, OrientedPoint3d location)
      constructs a new Editable.
      Parameters:
      simulator - SimulatorInterface<?,?,?>; the simulator to schedule on
      location - OrientedPoint3d; the initial location
  • Method Details

    • listEditables

      public static Map<Object,Object> listEditables()
      returns the editables as a list of name=class.
      Returns:
      the map
    • getVertices

      public CartesianPoint[] getVertices()
      Returns:
      the vertices of the CartesianPoint.
    • setBounds

      public void setBounds(Bounds3d bounds)
      sets the bounds of this editable.
      Parameters:
      bounds - Bounds3d; the new bounds of this editable.
    • setLocation

      public void setLocation(OrientedPoint3d location)
      sets the location of this editable.
      Parameters:
      location - OrientedPoint3d; the new location of this editable
    • setVertices

      public void setVertices(CartesianPoint[] vertices)
      sets the vertices of this editable.
      Parameters:
      vertices - CartesianPoint[]; the new vertices.
    • getBounds

      public Bounds3d getBounds()
      Specified by:
      getBounds in interface Locatable
    • getLocation

      public OrientedPoint3d getLocation()
      Specified by:
      getLocation in interface Locatable