Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
API
Commits
8a0512cf
Commit
8a0512cf
authored
Sep 18, 2017
by
Tobias Meuser
Browse files
Added current max-speed to edge
parent
a0540fc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/roadnetwork/RoadNetworkEdge.java
View file @
8a0512cf
...
@@ -31,6 +31,7 @@ public class RoadNetworkEdge {
...
@@ -31,6 +31,7 @@ public class RoadNetworkEdge {
private
double
_angle
;
private
double
_angle
;
private
double
_originalMaxSpeed
=
0
;
private
double
_originalMaxSpeed
=
0
;
private
double
_maxSpeed
=
0
;
private
List
<
RoadNetworkLane
>
_lanes
=
new
ArrayList
<>();
private
List
<
RoadNetworkLane
>
_lanes
=
new
ArrayList
<>();
...
@@ -85,9 +86,18 @@ public class RoadNetworkEdge {
...
@@ -85,9 +86,18 @@ public class RoadNetworkEdge {
public
void
setOriginalMaxSpeed
(
double
pMaxSpeed
)
{
public
void
setOriginalMaxSpeed
(
double
pMaxSpeed
)
{
if
(
pMaxSpeed
>
_originalMaxSpeed
)
{
if
(
pMaxSpeed
>
_originalMaxSpeed
)
{
_originalMaxSpeed
=
pMaxSpeed
;
_originalMaxSpeed
=
pMaxSpeed
;
_maxSpeed
=
pMaxSpeed
;
}
}
}
}
public
void
setMaxSpeed
(
double
pMaxSpeed
)
{
_maxSpeed
=
pMaxSpeed
;
}
public
double
getMaxSpeed
()
{
return
_maxSpeed
;
}
public
void
addConnectedEdge
(
RoadNetworkEdge
pEdge
)
{
public
void
addConnectedEdge
(
RoadNetworkEdge
pEdge
)
{
if
(!
_accessibleEdges
.
contains
(
pEdge
))
{
if
(!
_accessibleEdges
.
contains
(
pEdge
))
{
_accessibleEdges
.
add
(
pEdge
);
_accessibleEdges
.
add
(
pEdge
);
...
...
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