pantheonrl.envs.blockworldgym.rendering.Viewer

class Viewer(width, height, display=None)[source]

Bases: object

Viewer class from early gym versions

Methods

add_geom

Adds the geometry to the scene

add_onetime

Adds the geometry for one-time viewing

close

Closes the viewer window.

draw_circle

Draw circle

draw_line

Draw line

draw_polygon

Draw polygon

draw_polyline

Draw polyline

get_array

Get the window as an rgb array

render

Renders the scene

set_bounds

Sets the bounds of the window

window_closed_by_user

Called when window is closed by user.

add_geom(geom)[source]

Adds the geometry to the scene

add_onetime(geom)[source]

Adds the geometry for one-time viewing

close()[source]

Closes the viewer window.

draw_circle(radius=10, res=30, filled=True, **attrs)[source]

Draw circle

draw_line(start, end, **attrs)[source]

Draw line

draw_polygon(v, filled=True, **attrs)[source]

Draw polygon

draw_polyline(v, **attrs)[source]

Draw polyline

get_array()[source]

Get the window as an rgb array

render(return_rgb_array=False)[source]

Renders the scene

set_bounds(left, right, bottom, top)[source]

Sets the bounds of the window

window_closed_by_user()[source]

Called when window is closed by user.