Commit 4f8c4b1e authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier

In "TikzGenerator.java", generate also stairs.

Note: trajectories are not generated at the moment.
parent b4e3a8c6
Pipeline #57989 passed with stage
in 46 seconds
......@@ -91,7 +91,7 @@ public class TikzGenerator {
topography.getBounds().x + topography.getBounds().width,
topography.getBounds().y + topography.getBounds().height);
// TODO: draw also stairs and (maybe) trajectories.
// TODO: maybe, draw also trajectories.
generatedCode += "% Sources\n";
for (Source source : topography.getSources()) {
generatedCode += String.format("\\fill[SourceColor] %s\n", generatePathForScenarioElement(source));
......@@ -107,6 +107,11 @@ public class TikzGenerator {
generatedCode += String.format("\\fill[ObstacleColor] %s\n", generatePathForScenarioElement(obstacle));
}
generatedCode += "% Stairs\n";
for (Stairs stair : topography.getStairs()) {
generatedCode += String.format("\\fill[StairColor] %s\n", generatePathForScenarioElement(stair));
}
// TODO: add agents as path NOT as pre-defined form (they require cubic splines).
generatedCode += "% Agents\n";
for (Agent agent : model.getAgents()) {
......@@ -131,6 +136,9 @@ public class TikzGenerator {
Color obstacleColor = model.getConfig().getObstacleColor();
colorDefinitions += String.format(colorTextPattern, "ObstacleColor", obstacleColor.getRed(), obstacleColor.getGreen(), obstacleColor.getBlue());
Color stairColor = model.getConfig().getStairColor();
colorDefinitions += String.format(colorTextPattern, "StairColor", stairColor.getRed(), stairColor.getGreen(), stairColor.getBlue());
Color agentColor = model.getConfig().getPedestrianDefaultColor();
colorDefinitions += String.format(colorTextPattern, "AgentColor", agentColor.getRed(), agentColor.getGreen(), agentColor.getBlue());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment