Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
vadere
vadere
Commits
e87f9542
Commit
e87f9542
authored
Apr 15, 2019
by
Benedikt Kleinmeier
Browse files
Process measurement areas in "TikzGenerator".
parent
8a6bf222
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereGui/src/org/vadere/gui/postvisualization/utils/TikzGenerator.java
View file @
e87f9542
...
...
@@ -127,6 +127,9 @@ public class TikzGenerator {
Color
stairColor
=
model
.
getConfig
().
getStairColor
();
colorDefinitions
+=
String
.
format
(
Locale
.
US
,
colorTextPattern
,
"StairColor"
,
stairColor
.
getRed
(),
stairColor
.
getGreen
(),
stairColor
.
getBlue
());
Color
measurementAreaColor
=
model
.
getConfig
().
getMeasurementAreaColor
();
colorDefinitions
+=
String
.
format
(
Locale
.
US
,
colorTextPattern
,
"MeasurementAreaColor"
,
measurementAreaColor
.
getRed
(),
measurementAreaColor
.
getGreen
(),
measurementAreaColor
.
getBlue
());
Color
agentColor
=
model
.
getConfig
().
getPedestrianDefaultColor
();
colorDefinitions
+=
String
.
format
(
Locale
.
US
,
colorTextPattern
,
"AgentColor"
,
agentColor
.
getRed
(),
agentColor
.
getGreen
(),
agentColor
.
getBlue
());
...
...
@@ -142,16 +145,18 @@ public class TikzGenerator {
String
drawSettings
=
"% Draw Settings\n"
;
double
agentRadius
=
model
.
getConfig
().
getPedestrianTorso
()
/
2.0
;
double
opacityBetweenZeroAndOne
=
model
.
getConfig
().
getMeasurementAreaAlpha
()
/
255.0
;
drawSettings
+=
String
.
format
(
Locale
.
US
,
"\\newcommand{\\AgentRadius}{%f}\n"
,
agentRadius
);
drawSettings
+=
String
.
format
(
Locale
.
US
,
"\\newcommand{\\LineWidth}{%d}\n"
,
1
);
drawSettings
+=
String
.
format
(
Locale
.
US
,
"\\newcommand{\\MeasurementAreaOpacity}{%f}\n"
,
opacityBetweenZeroAndOne
);
drawSettings
+=
"\n"
;
return
drawSettings
;
}
private
String
convertScenarioElementsToTikz
()
{
private
String
convertScenarioElementsToTikz
()
{
String
generatedCode
=
""
;
DefaultSimulationConfig
config
=
model
.
getConfig
();
...
...
@@ -221,6 +226,15 @@ public class TikzGenerator {
generatedCode
+=
"% Stairs (not enabled in config)\n"
;
}
if
(
config
.
isShowMeasurementArea
())
{
generatedCode
+=
"% Measurement Areas\n"
;
for
(
MeasurementArea
measurementArea
:
topography
.
getMeasurementAreas
())
{
generatedCode
+=
String
.
format
(
Locale
.
US
,
"\\fill[MeasurementAreaColor,opacity=\\MeasurementAreaOpacity] %s;\n"
,
generatePathForScenarioElement
(
measurementArea
));
}
}
else
{
generatedCode
+=
"% Measurement Areas (not enabled in config)\n"
;
}
if
(
config
.
isShowTrajectories
())
{
generatedCode
+=
"% Trajectories\n"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment