|
|
In Vadere all scenario elements like sources or targets inherit from the abstract class `ScenarioElement`.
|
|
|
|
|
|
Carry out following steps to add a new scenario element:
|
|
|
|
|
|
1. Add a new class to package `org.vadere.state.scenario/TargetChanger.java` and to enum `ScenarioElementType`.
|
|
|
2. Add scenario element variable to class `Topography`.
|
|
|
3. Process scenario element in own controller class under package `org.vadere.simulator.control.scenarioelements`
|
|
|
and invoke controller in simulation loop `Simulation.updateCallbacks()`.
|
|
|
4. Add serialization and deserialization to
|
|
|
`StateJsonConverter.serializeTopographyToNode()`.
|
|
|
5. Add scenario element to GUI (`SimulationRenderer.renderPostTransformation()`)
|
|
|
Inheritance direction: `DefaultSimulationRenderer <- SimulationRenderer <- OnlineVisualizationRenderer`.
|
|
|
6. Add scenario element to `TopographyIterator` so that element can be selected in post visualization window. |