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
PeerfactSim.KOM
Commits
4c122520
Commit
4c122520
authored
May 15, 2018
by
Tobias Meuser
Browse files
Updated isUsable function for edge
parent
c2c2d6c6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/topology/movement/vehicular/sumo/simulation/controller/traci/TraciSimulationController.java
View file @
4c122520
...
@@ -749,7 +749,7 @@ public class TraciSimulationController implements VehicleController, SimulationS
...
@@ -749,7 +749,7 @@ public class TraciSimulationController implements VehicleController, SimulationS
public
List
<
Location
>
getLaneShape
(
String
pLaneID
)
{
public
List
<
Location
>
getLaneShape
(
String
pLaneID
)
{
List
<
Location
>
positions
=
new
ArrayList
<>();
List
<
Location
>
positions
=
new
ArrayList
<>();
boolean
set
=
tru
e
;
boolean
set
=
fals
e
;
SumoCommand
laneShapeCommand
=
Lane
.
getShape
(
pLaneID
);
SumoCommand
laneShapeCommand
=
Lane
.
getShape
(
pLaneID
);
SumoGeometry
geometry
=
(
SumoGeometry
)
requestObject
(
laneShapeCommand
);
SumoGeometry
geometry
=
(
SumoGeometry
)
requestObject
(
laneShapeCommand
);
...
@@ -758,10 +758,9 @@ public class TraciSimulationController implements VehicleController, SimulationS
...
@@ -758,10 +758,9 @@ public class TraciSimulationController implements VehicleController, SimulationS
positions
.
add
(
new
PositionVector
(
location
.
x
,
location
.
y
));
positions
.
add
(
new
PositionVector
(
location
.
x
,
location
.
y
));
}
else
{
}
else
{
if
(
_startX
<=
location
.
x
&&
location
.
x
<=
_endX
&&
_startY
<=
location
.
y
&&
location
.
y
<=
_endY
)
{
if
(
_startX
<=
location
.
x
&&
location
.
x
<=
_endX
&&
_startY
<=
location
.
y
&&
location
.
y
<=
_endY
)
{
positions
.
add
(
new
PositionVector
(
location
.
x
-
_startX
,
location
.
y
-
_startY
));
}
else
{
set
=
true
;
set
=
true
;
}
}
positions
.
add
(
new
PositionVector
(
location
.
x
-
_startX
,
location
.
y
-
_startY
));
}
}
}
}
...
...
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