motrixsim.render.widgets#

Classes:

class motrixsim.render.widgets.CameraViewport#

基类:object

Methods:

remove()

Remove the camera viewport widget from the render window.

update([camera, layout, sim_world_index])

Update the camera viewport widget.

Attributes:

camera

The camera displayed in this viewport.

remove()#

Remove the camera viewport widget from the render window.

备注

After calling this method, the viewport will be removed from the render window. Any further calls to update() on this object will result in an error.

update(camera=None, layout=None, sim_world_index=None)#

Update the camera viewport widget.

参数:
  • camera (Optional[Camera]) -- New camera object to display. If not provided, keeps the current camera.

  • layout (Optional[Layout]) -- New layout configuration. If not provided, keeps the current layout.

  • sim_world_index (Optional[int]) -- New simulation world index. If not provided, keeps the current value.

Raises

RuntimeError: If the widget is invalid.

camera#

The camera displayed in this viewport.

Type:

Camera

class motrixsim.render.widgets.ImageWidget#

基类:object

Methods:

remove()

Remove the image widget from the render window.

update([image, layout])

Update the image widget.

Attributes:

remove()#

Remove the image widget from the render window.

备注

After calling this method, the widget will be removed from the render window. Any further calls to update() on this object will result in an error.

update(image=None, layout=None)#

Update the image widget.

参数:
  • image (Optional[Image]) -- New image object to display. If not provided, keeps the current image.

  • layout (Optional[Layout]) -- New layout configuration. If not provided, keeps the current layout.

抛出:

RuntimeError -- If the widget is invalid.

Example:

# Update with new image
widget.update(image=new_img)
# Update with new layout
widget.update(layout=new_layout)
# Update both
widget.update(image=new_img, layout=new_layout)
image#