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
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 Summary
Modifier and TypeFieldDescriptionprotected Bounds3d
the location of the bounds.protected OrientedPoint3d
the location of the editable.protected SimulatorInterface<?>
the simulator to use.protected CartesianPoint[]
the vertices.Fields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITION
-
Constructor Summary
ConstructorDescriptionEditable
(SimulatorInterface<?> simulator, OrientedPoint3d location) constructs a new Editable. -
Method Summary
Modifier and TypeMethodDescriptionreturns the editables as a list of name=class.void
sets the bounds of this editable.void
setLocation
(OrientedPoint3d location) sets the location of this editable.void
setVertices
(CartesianPoint[] vertices) sets the vertices of this editable.Methods inherited from class org.djutils.event.LocalEventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Field Details
-
simulator
the simulator to use. -
location
the location of the editable. -
bounds
the location of the bounds. -
vertices
the vertices.
-
-
Constructor Details
-
Editable
constructs a new Editable.- Parameters:
simulator
- SimulatorInterface<?,?,?>; the simulator to schedule onlocation
- OrientedPoint3d; the initial location
-
-
Method Details
-
listEditables
returns the editables as a list of name=class.- Returns:
- the map
-
getVertices
- Returns:
- the vertices of the CartesianPoint.
-
setBounds
sets the bounds of this editable.- Parameters:
bounds
- Bounds3d; the new bounds of this editable.
-
setLocation
sets the location of this editable.- Parameters:
location
- OrientedPoint3d; the new location of this editable
-
setVertices
sets the vertices of this editable.- Parameters:
vertices
- CartesianPoint[]; the new vertices.
-
getBounds
-
getLocation
- Specified by:
getLocation
in interfaceLocatable
-