Closed WJSchakel closed 11 months ago
LaneAnimation.LaneData
. DefaultAnimationFactory
creates mostly anonymous classes to implement this. This needs to change to actual types that wrap the object as a property, such that the underlying object becomes accessible through introspection via the GUI. For this goal the implementations also need toString()
with a proper name of the object visible in the GUI. This will be done later when code is better structured in line with issue #64.Detector
interface in ots-road
no longer functions as a toggle for different detector classes in animation. This is now done by DetectorData
in ots-draw
. This further separates ots-road
from ots-draw
.DetectorData.Text
is similarly used for IDs of different detector types. TrafficLightDetector
used to not be able to show its ID, it is now.WeightedMeanAndSum
in located in ots-base
, this now uses ArithmeticMean
from djutils.LaneStructureAnimation
and LaneStructureLocatable
are left as is. They will be removed in the future when LaneStructure
is no longer used.
Nested and anonymous classes in DefaultAnimationFactory
have been made separate types in org.opentrafficsim.animation.data
.
org.opentrafficsim.draw.DrawLevel
is an enum that contains several z-coordinate adjustments for drawing order. They are used throughout the data objects. Underlying objects (Lane
, LaneBasedGtu
, etc.) are not Locatable
without strange fixes for animation.
In order to allow animation of objects both during simulation and during editing, DSOL has already been prepared (animator separate from simulator). The animation objects in OTS now need to become able to deal both with simulation and with editing objects. The basic idea is to have for each animator, using
Link
as an example:LinkAnimation.from(interface LinkData)
, to be used by any extension.LinkAnimation.from(Link)
, to implement existing functions.LinkAnimation.from(EditorLink)
, to animate editor objects (note:EditorLink
is just a stand-in here).