this.hightLightRoboterModelElements.remove(roboterElement);
}
private void drawLightSensorViewField(Graphics g, final LightSensor sensor, Vector2d directionVector,
RoboterConstruction roboterConstruction) {
Point2d lightSensorPoint = roboterConstruction.getRoboterElementPoint(sensor);
Vector2d vec1 = roboterConstruction.getRoboterElementAngleVector(sensor);
Point2d viewDirectionPoint = VecMathUtils.getScaledVectorPoint(vec1, lightSensorPoint, 50);
String strring = "" + (int) sensor.getSensorIntensity();
Point2d viewDirectionPoint2 = VecMathUtils.getScaledVectorPoint(vec1, lightSensorPoint, 52);
g.drawString(strring, (float) viewDirectionPoint2.getX(), (float) viewDirectionPoint2.getY());
double angleMinMax = sensor.getViewFieldSize() / 2;
Vector2d vecMinViewField = VecMathUtils.rotateVector(vec1, angleMinMax);
Vector2d vecMaxViewField = VecMathUtils.rotateVector(vec1, -angleMinMax);
Point2d vecMinViewFieldPoint = VecMathUtils.getScaledVectorPoint(vecMinViewField, lightSensorPoint, 300);
Point2d vecMaxViewFieldPoint = VecMathUtils.getScaledVectorPoint(vecMaxViewField, lightSensorPoint, 300);
// drawLine(lightSensorPoint, vecMinViewFieldPoint, g);
// drawLine(lightSensorPoint, vecMaxViewFieldPoint, g);
Polygon pol = new Polygon();
pol.addPoint((float) lightSensorPoint.getX(), (float) lightSensorPoint.getY());
pol.addPoint((float) vecMaxViewFieldPoint.getX(), (float) vecMaxViewFieldPoint.getY());
pol.addPoint((float) vecMinViewFieldPoint.getX(), (float) vecMinViewFieldPoint.getY());
// GradientFill fill = new GradientFill((float) lightSensorPoint.getX(),
// (float) lightSensorPoint.getY(), Color.lightGray,
// (float) viewDirectionPoint.getX(), (float) viewDirectionPoint.getY(),