Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
vadere
vadere
Commits
e87f9542
Commit
e87f9542
authored
Apr 15, 2019
by
Benedikt Kleinmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Process measurement areas in "TikzGenerator".
parent
8a6bf222
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
VadereGui/src/org/vadere/gui/postvisualization/utils/TikzGenerator.java
...org/vadere/gui/postvisualization/utils/TikzGenerator.java
+15
-1
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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