Commit 670194fd authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Added paint offset to display all node properties

parent b52aae20
......@@ -58,6 +58,8 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
public static final double SCALING_FACTOR = 1.0;
private static final double PAINT_OFFSET = 25;
private long timeBetweenMoveOperations;
private final List<SimLocationActuator> components;
......@@ -289,10 +291,10 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
SimLocationActuator component = requestSimActuator(vehicle);
if (scenarioHeight != -1) {
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR, Math.min(scenarioHeight, height) - position.getY() / SCALING_FACTOR));
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR + PAINT_OFFSET, Math.min(scenarioHeight, height) - position.getY() / SCALING_FACTOR + PAINT_OFFSET));
} else {
// This would be vertically mirrored
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR, position.getY() / SCALING_FACTOR));
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR + PAINT_OFFSET, position.getY() / SCALING_FACTOR + PAINT_OFFSET));
}
component.setMovementSpeed(position.getSpeed() / SCALING_FACTOR);
......
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