/** * @return A {@link Builder} for creating an {@link AGVRenderer}. */ @CheckReturnValue public static Builder builder() { return Builder.create(); }
/** * Vehicles are drawn with a small half circle on top, the center of this * half circle indicates the vehicle origin. The origin is the actual * position as returned by * {@link CollisionGraphRoadModelImpl#getPosition(RoadUser)}. * @return A new builder instance. */ @CheckReturnValue public Builder withVehicleOrigin() { return create(VizOptions.VEHICLE_ORIGIN, vizOptions()); }
.withNodes()) .with(AGVRenderer.builder() .withVehicleCreationNumber() .withDifferentColorsForVehicles() .withVehicleCoordinates() .withVehicleOrigin()) .with(GraphRoadModelRenderer.builder() .withDirectionArrows()
.withMargin(VEHICLE_LENGTH)) .with(AGVRenderer.builder() .withDifferentColorsForVehicles());
.withMargin(VEHICLE_LENGTH)) .with(AGVRenderer.builder() .withDifferentColorsForVehicles());
Builder() { setDependencies(CollisionGraphRoadModel.class); }
@Override public AGVRenderer build(DependencyProvider dp) { final CollisionGraphRoadModel rm = dp.get(CollisionGraphRoadModel.class); return new AGVRenderer(rm, vizOptions()); }
@Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof AGVRenderer.Builder) { AGVRenderer.Builder that = (AGVRenderer.Builder) o; return (this.vizOptions.equals(that.vizOptions())); } return false; }
/** * Draws a number on each vehicle. The number indicates the creation order * of the vehicle. * @return A new builder instance. */ @CheckReturnValue public Builder withVehicleCreationNumber() { return create(VizOptions.CREATION_NUMBER, vizOptions()); }
/** * Vehicles are drawn with different colors to ease debugging. * @return A new builder instance. */ @CheckReturnValue public Builder withDifferentColorsForVehicles() { return create(VizOptions.USE_DIFFERENT_COLORS, vizOptions()); }
/** * Displays the coordinates of each vehicle next to it. * @return A new builder instance. */ @CheckReturnValue public Builder withVehicleCoordinates() { return create(VizOptions.COORDINATES, vizOptions()); }