src/main/java/de/hfu/in/machinelearning/crawling_robot_2d_sim/models/ShapeRenderer.java
public static final void render(Graphics2D g, Polygon polygon, double scale, Color color) {
		Vector2[] vertices = polygon.getVertices();
		int l = vertices.length;
		
		// create the awt polygon
		Path2D.Double p = new Path2D.Double();
		p.moveTo(vertices[0].x * scale, vertices[0].y * scale);
		for (int i = 1; i < l; i++) {
			p.lineTo(vertices[i].x * scale, vertices[i].y * scale);
		}
		p.closePath();
		
		// fill the shape
		g.setColor(color);
		g.fill(p);
		// draw the outline
		g.setColor(getOutlineColor(color));
		g.draw(p);
	}
/**
	 * Renders the given {@link Polygon} to the given graphics context using the given scale and color.
	 * @param g the graphics context
	 * @param polygon the polygon to render
	 * @param scale the scale to render the shape (pixels per dyn4j unit (typically meter))
	 * @param color the color
	 */
Renders the given  Polygon to the given graphics context using the given scale and color.
@param g the graphics context
@param polygon the polygon to render
@param scale the scale to render the shape (pixels per dyn4j unit (typically meter))
@param color the color
Renders the given Polygon to the given graphics context using the given scale and color . @param g the graphics context @param polygon the polygon to render @param scale the scale to render the shape ( pixels per dyn4j unit ( typically meter )) @param color the color
public static final void render(Graphics2D g, Polygon polygon, double scale, Color color) {
		Vector2[] vertices = polygon.getVertices();
		int l = vertices.length;
		Path2D.Double p = new Path2D.Double();
		p.moveTo(vertices[0].x * scale, vertices[0].y * scale);
		for (int i = 1; i < l; i++) {
			p.lineTo(vertices[i].x * scale, vertices[i].y * scale);
		}
		p.closePath();
		g.setColor(color);
		g.fill(p);
		g.setColor(getOutlineColor(color));
		g.draw(p);
	}
public static final void render ( Graphics2D g , Polygon polygon , double scale , Color color ) { Vector2 [ ] vertices = polygon . getVertices ( ) ; int l = vertices . length ; Path2D . Double p = new Path2D . Double ( ) ; p . moveTo ( vertices [ 0 ] . x * scale , vertices [ 0 ] . y * scale ) ; for ( int i = 1 ; i < l ; i ++ ) { p . lineTo ( vertices [ i ] . x * scale , vertices [ i ] . y * scale ) ; } p . closePath ( ) ; g . setColor ( color ) ; g . fill ( p ) ; g . setColor ( getOutlineColor ( color ) ) ; g . draw ( p ) ; }
Renders the given {@link Polygon} to the given graphics context using the given scale and color.
Renders the given { @link Polygon } to the given graphics context using the given scale and color .
// create the awt polygon // fill the shape // draw the outline