예제 #1
0
 public void Update()
 {
     // Draw current goal of the bot when in debug mode
     if (_detailLevel >= DetailLevel.Debug)
     {
         Fill = _guard.GetInfoIsAccessible() ?
                (_guard.GetInfoIsBarrier() ? VisualizationConstants.BrushSemaphoreEntry : VisualizationConstants.BrushSemaphoreGuard) :
                VisualizationConstants.BrushSemaphoreBlocked;
     }
 }
예제 #2
0
 public SimulationVisualGuard2D(
     IGuardInfo guard,
     DetailLevel detailLevel,
     Transformation2D transformer,
     double strokeThickness,
     MouseButtonEventHandler elementClickAction,
     SimulationAnimation2D controller)
     : base(detailLevel, transformer, strokeThickness, elementClickAction, controller)
 {
     _guard = guard;
     // Create waypoint dot
     _geometry =
         new EllipseGeometry(
             new Point(_transformer.ProjectX(guard.GetInfoCenterX()), _transformer.ProjectY(guard.GetInfoCenterY())),
             _transformer.ProjectXLength(guard.GetInfoLength() / 2.0), _transformer.ProjectYLength(guard.GetInfoLength() / 2.0));
     // Paint it
     Fill            = _guard.GetInfoIsBarrier() ? VisualizationConstants.BrushSemaphoreEntry : VisualizationConstants.BrushSemaphoreGuard;
     Cursor          = System.Windows.Input.Cursors.Hand;
     MouseDown      += _elementClickAction;
     Stroke          = VisualizationConstants.BrushOutline;
     StrokeThickness = StrokeThicknessReference;
 }