Notice: If you are member of any public project or group, please make sure that your GitLab username is not the same as the LRZ identifier/Kennung (see https://gitlab.lrz.de/profile/account). Please change your username if necessary. For more information see the section "Public projects / Öffentliche Projekte" at https://doku.lrz.de/display/PUBLIC/GitLab . Thank you!

Commit cc85ea4a authored by hm-schuhba1's avatar hm-schuhba1

Merge branch 'tikzgenerator-feature' into 'master'

add features to TikzGenerator

See merge request !76
parents 25bcc7b9 191e8b9f
Pipeline #132800 passed with stages
in 124 minutes and 33 seconds
......@@ -230,6 +230,7 @@ PostVis.license.text=This product is licensed under the {0}
PostVis.chbHidePedAtTarget.text=Hide Pedestrians at Target
PostVis.chbHideTrajAtTarget.text=Hide Trajectories at Target
PostVis.chShowAllTrajOnSnapshot.text=Show all Trajectories on Snapshot
PostVis.chbCleanSnapshot.text=Hide Trajectories on Snapshots
SettingsDialog.chbUseRandomColors.text=Random Coloring
......
......@@ -227,6 +227,7 @@ PostVis.btnRecord.tooltip=Starte Aufnahme
PostVis.chbHidePedAtTarget.text=Fu\u00dfg\u00E4nger im Ziel nicht anzeigen
PostVis.chbHideTrajAtTarget.text=Trajektorien am Ziel nicht anzeigen
PostVis.chbCleanSnapshot.text=Trajektorien auf Snapshots nicht anzeigen
PostVis.chShowAllTrajOnSnapshot.text=Alle Trajektorien auf Snapshot anzeigen
SettingsDialog.chbUseRandomColors.text=Zuf\u00E4llige Farben
SettingsDialog.chbHideVoronoiDiagram.text=Voronoi-Diagramm nicht anzeigen
......
......@@ -37,7 +37,7 @@ public class DefaultSimulationConfig extends DefaultConfig {
private boolean showGrid = false;
private boolean showDensity = false;
private boolean showGroups = false;
protected final Color pedestrianDefaultColor = Color.BLUE;
protected final Color pedestrianDefaultColor = new Color(76, 114, 202);
private Map<Integer, Color> pedestrianColors = new TreeMap<>();
private Map<Integer, Color> randomColors = new HashMap<>();
private double gridWidth = CONFIG.getDouble("ProjectView.cellWidth");
......
......@@ -14,6 +14,7 @@ public class PostvisualizationConfig extends DefaultSimulationConfig {
private boolean showAllTrajectories = true;
private boolean showTrajecoriesOnSnapshot = false;
private boolean showFaydedPedestrians = false;
private boolean showAllTrajOnSnapshot = false;
private boolean loadTopographyInformationsOnly = false;
private boolean useEvacuationTimeColor = false;
......@@ -98,6 +99,15 @@ public class PostvisualizationConfig extends DefaultSimulationConfig {
this.showFaydedPedestrians = showFaydedPedestrians;
setChanged();
}
public boolean isShowAllTrajOnSnapshot() {
return showAllTrajOnSnapshot;
}
public void setShowAllTrajOnSnapshot(boolean showAllTrajOnSnapshot) {
this.showAllTrajOnSnapshot = showAllTrajOnSnapshot;
setChanged();
}
}
......@@ -436,6 +436,10 @@ public class PostvisualizationModel extends SimulationModel<PostvisualizationCon
return trajectories.values().stream().filter(t -> t.isAlive(getSimTimeInSec()));
}
public synchronized Trajectory getTrajectory(int pedestrianId){
return trajectories.get(pedestrianId);
}
public boolean isEmpty() {
return agentsByStep.isEmpty();
}
......
......@@ -23,11 +23,12 @@ public class SettingsDialog extends org.vadere.gui.components.view.SettingsDialo
additionalLayeredPane.setBorder(
BorderFactory.createTitledBorder(Messages.getString("PostVis.additional.border.text")));
FormLayout additionalLayout = new FormLayout("5dlu, pref, 5dlu", // col
"5dlu, pref, 2dlu, pref, 2dlu, pref, 5dlu"); // rows
"5dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 5dlu"); // rows
additionalLayeredPane.setLayout(additionalLayout);
JCheckBox chCleanPed = new JCheckBox(Messages.getString("PostVis.chbHidePedAtTarget.text"));
JCheckBox chCleanSnapshot = new JCheckBox(Messages.getString("PostVis.chbCleanSnapshot.text"));
JCheckBox chCleanTrajecties = new JCheckBox(Messages.getString("PostVis.chbHideTrajAtTarget.text"));
JCheckBox chShowAllTrajOnSnapshot = new JCheckBox(Messages.getString("PostVis.chShowAllTrajOnSnapshot.text"));
chCleanPed.setSelected(!model.config.isShowTrajecoriesOnSnapshot());
chCleanPed.addItemListener(e -> {
......@@ -45,9 +46,16 @@ public class SettingsDialog extends org.vadere.gui.components.view.SettingsDialo
chCleanSnapshot.addItemListener(
e -> model.config.setShowTrajecoriesOnSnapshot(!model.config.isShowTrajecoriesOnSnapshot()));
chShowAllTrajOnSnapshot.setSelected(model.config.isShowAllTrajOnSnapshot());
chShowAllTrajOnSnapshot.addItemListener(e -> {
model.config.setShowAllTrajOnSnapshot(!model.config.isShowAllTrajOnSnapshot());
model.notifyObservers();
});
additionalLayeredPane.add(chCleanPed, cc.xy(2, 2));
additionalLayeredPane.add(chCleanTrajecties, cc.xy(2, 4));
additionalLayeredPane.add(chCleanSnapshot, cc.xy(2, 6));
additionalLayeredPane.add(chShowAllTrajOnSnapshot, cc.xy(2, 8));
JCheckBox chShowEvacTimeColor = new JCheckBox(Messages.getString("PostVis.chShowEvacTimeColor.text"));
getColorLayeredPane().add(chShowEvacTimeColor, cc.xyw(2, 26, 8));
......
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