src/main/java/de/hfu/in/machinelearning/crawling_robot_2d_sim/models/ShapeRenderer.java
public static final void render(Graphics2D g, Shape shape, double scale, Color color) {
		// no-op
		if (shape == null) return;
		
		// just default the color
		if (color == null) color = Color.ORANGE;
		
		if (shape instanceof Circle) {
			render(g, (Circle)shape, scale, color);
		} else if (shape instanceof Polygon) {
			render(g, (Polygon)shape, scale, color);
		} else if (shape instanceof Segment) {
			render(g, (Segment)shape, scale, color);
		} else if (shape instanceof Capsule) {
			render(g, (Capsule)shape, scale, color);
		} else if (shape instanceof Ellipse) {
			render(g, (Ellipse)shape, scale, color);
		} else if (shape instanceof Slice) {
			render(g, (Slice)shape, scale, color);
		} else if (shape instanceof HalfEllipse) {
			render(g, (HalfEllipse)shape, scale, color);
		} else {
			// unknown shape
		}
	}
/**
	 * Renders the given shape to the given graphics context using the given scale and color.
	 * @param g the graphics context
	 * @param shape the shape to render
	 * @param scale the scale to render the shape (pixels per dyn4j unit (typically meter))
	 * @param color the color
	 */
Renders the given shape to the given graphics context using the given scale and color.
@param g the graphics context
@param shape the shape to render
@param scale the scale to render the shape (pixels per dyn4j unit (typically meter))
@param color the color
Renders the given shape to the given graphics context using the given scale and color . @param g the graphics context @param shape the shape 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, Shape shape, double scale, Color color) {
		if (shape == null) return;
		if (color == null) color = Color.ORANGE;
		if (shape instanceof Circle) {
			render(g, (Circle)shape, scale, color);
		} else if (shape instanceof Polygon) {
			render(g, (Polygon)shape, scale, color);
		} else if (shape instanceof Segment) {
			render(g, (Segment)shape, scale, color);
		} else if (shape instanceof Capsule) {
			render(g, (Capsule)shape, scale, color);
		} else if (shape instanceof Ellipse) {
			render(g, (Ellipse)shape, scale, color);
		} else if (shape instanceof Slice) {
			render(g, (Slice)shape, scale, color);
		} else if (shape instanceof HalfEllipse) {
			render(g, (HalfEllipse)shape, scale, color);
		} else {
		}
	}
public static final void render ( Graphics2D g , Shape shape , double scale , Color color ) { if ( shape == null ) return ; if ( color == null ) color = Color . ORANGE ; if ( shape instanceof Circle ) { render ( g , ( Circle ) shape , scale , color ) ; } else if ( shape instanceof Polygon ) { render ( g , ( Polygon ) shape , scale , color ) ; } else if ( shape instanceof Segment ) { render ( g , ( Segment ) shape , scale , color ) ; } else if ( shape instanceof Capsule ) { render ( g , ( Capsule ) shape , scale , color ) ; } else if ( shape instanceof Ellipse ) { render ( g , ( Ellipse ) shape , scale , color ) ; } else if ( shape instanceof Slice ) { render ( g , ( Slice ) shape , scale , color ) ; } else if ( shape instanceof HalfEllipse ) { render ( g , ( HalfEllipse ) shape , scale , color ) ; } else { } }
Renders the given shape to the given graphics context using the given scale and color.
Renders the given shape to the given graphics context using the given scale and color .
// no-op // just default the color // unknown shape