viewer#

Submodules#

sapien.utils.viewer.articulation_window module#

class sapien.utils.viewer.articulation_window.ArticulationWindow[source]#

Bases: Plugin

build()[source]#
close()[source]#
get_ui_windows()[source]#
notify_selected_entity_change()[source]#
reset()[source]#
property selected_entity#
set_joint_details(index, v)[source]#

sapien.utils.viewer.camera_control module#

class sapien.utils.viewer.camera_control.ArcRotateCameraController[source]#

Bases: object

property pose#
rotate_yaw_pitch(yaw, pitch)[source]#
set_center(center)[source]#
set_yaw_pitch(yaw, pitch)[source]#
set_zoom(zoom)[source]#
update()[source]#
zoom(zoom_in)[source]#
class sapien.utils.viewer.camera_control.FPSCameraController[source]#

Bases: object

move(forward, left, up)[source]#
property pose#
rotate(roll, pitch, yaw)[source]#
setRPY(roll, pitch, yaw)[source]#
setXYZ(x, y, z)[source]#
update()[source]#

sapien.utils.viewer.contact_window module#

class sapien.utils.viewer.contact_window.ContactWindow[source]#

Bases: Plugin

build()[source]#
close()[source]#
get_ui_windows()[source]#
notify_scene_change()[source]#
reset()[source]#

sapien.utils.viewer.control_window module#

class sapien.utils.viewer.control_window.ControlWindow[source]#

Bases: Plugin

after_render()[source]#
before_render()[source]#
build()[source]#
property camera_index#
property camera_items#
close()[source]#
copy_camera_settings(_=None)[source]#
property display_target_index#
find_entity_by_id(entity_id, scene_id)[source]#
focus_camera(camera)[source]#
focus_entity(entity: Entity)[source]#
property fovy#
get_ui_windows()[source]#
init(viewer)[source]#
notify_scene_change()[source]#
register_click_handler(func)[source]#
property renderer_context#
reset()[source]#
property selected_entity#
set_camera_rpy(r, p, y)[source]#
set_camera_xyz(x, y, z)[source]#
property show_camera_linesets#
property show_joint_axes#
property show_origin_frame#
single_step(_)[source]#
take_screenshot(_)[source]#
toggle_camera_lines(show)[source]#
toggle_joint_axes(show)[source]#
toggle_origin_frame(show)[source]#
property window#

sapien.utils.viewer.entity_window module#

class sapien.utils.viewer.entity_window.EntityWindow[source]#

Bases: Plugin

build()[source]#
close()[source]#
copy_pose(_)[source]#
create_collision_shapes(entity)[source]#
disable_collision_visual(entity=None)[source]#
disconnect(c)[source]#
enable_collision_visual(entity=None)[source]#
get_ui_windows()[source]#
notify_scene_change()[source]#
reset()[source]#
property selected_entity#
set_actor_pose(pose)[source]#

sapien.utils.viewer.imgui_ini module#

sapien.utils.viewer.keyframe_window module#

class sapien.utils.viewer.keyframe_window.Duration(keyframe0, keyframe1, name='', definition='import sapien\nimport numpy as np\n\n\nclass Reward:\n    def __init__(self, env, scene: sapien.Scene):\n        self.env = env\n        self.scene = scene\n\n    def compute(self):\n        return 0\n')[source]#

Bases: UIDuration

DEFAULT_DEFINITION = 'import sapien\nimport numpy as np\n\n\nclass Reward:\n    def __init__(self, env, scene: sapien.Scene):\n        self.env = env\n        self.scene = scene\n\n    def compute(self):\n        return 0\n'#
keyframe0(self: sapien.pysapien.internal_renderer.UIDuration) sapien.pysapien.internal_renderer.UIKeyframe[source]#
keyframe1(self: sapien.pysapien.internal_renderer.UIDuration) sapien.pysapien.internal_renderer.UIKeyframe[source]#
name(self: sapien.pysapien.internal_renderer.UIDuration) str[source]#
set_name(name)[source]#
class sapien.utils.viewer.keyframe_window.Keyframe(serialized_scene, frame=0)[source]#

Bases: UIKeyframe

frame(self: sapien.pysapien.internal_renderer.UIKeyframe) int[source]#
set_frame(frame)[source]#
class sapien.utils.viewer.keyframe_window.KeyframeWindow[source]#

Bases: Plugin

add_duration(frame0, frame1)[source]#
add_keyframe(frame)[source]#
build()[source]#
cancel_popup(_)[source]#
close()[source]#
close_popup()[source]#
confirm_popup(_)[source]#
duration_definition_change(text)[source]#
duration_name_change(text)[source]#
edit_duration(duration)[source]#
editor_export(_)[source]#
editor_import(_)[source]#
get_editor_state()[source]#
get_ui_windows()[source]#
property keyframes#
load_keyframe(frame)[source]#
move_keyframe(frame, time)[source]#
notify_window_focus_change(focused)[source]#
open_in_editor(_)[source]#
open_popup()[source]#
reset()[source]#
property scene#
set_editor_state(state)[source]#
sapien.utils.viewer.keyframe_window.deserialize_keyframes(state)[source]#
sapien.utils.viewer.keyframe_window.serialize_keyframes(keyframes, durations)[source]#

sapien.utils.viewer.path_window module#

class sapien.utils.viewer.path_window.Path(entity)[source]#

Bases: object

class sapien.utils.viewer.path_window.PathWindow[source]#

Bases: Plugin

add_path(_)[source]#
add_point(_)[source]#
build()[source]#
close()[source]#
property current_path: Path#
property current_path_index#
property curve_time#
del_point(_)[source]#
eval_curve(ts)[source]#
get_curve(knots=128)[source]#
get_ui_windows()[source]#
hide_curve(_)[source]#
insert_point(_)[source]#
load(_=None)[source]#
load_confirm(_, name, path)[source]#
property paths#
property points#
remove_path(_)[source]#
reset()[source]#
save(_=None)[source]#
save_confirm(_, name, path)[source]#
property scene#
property selected_point_index#
set_point(_)[source]#
show_curve(_=None)[source]#
property transform_window#

sapien.utils.viewer.plugin module#

class sapien.utils.viewer.plugin.Plugin[source]#

Bases: object

after_render()[source]#
before_render()[source]#
clear_scene()[source]#
close()[source]#
get_ui_windows()[source]#
init(v: viewer.Viewer)[source]#
notify_scene_change()[source]#
notify_selected_entity_change()[source]#
notify_window_focus_change(focused)[source]#
sapien.utils.viewer.plugin.copy_to_clipboard(content)[source]#

sapien.utils.viewer.render_window module#

class sapien.utils.viewer.render_window.RenderOptionsWindow[source]#

Bases: Plugin

property aperture#
build()[source]#
close()[source]#
property denoiser_index#
property exposure#
property focal_plane#
get_ui_windows()[source]#
init(viewer)[source]#
property is_rt#
property ray_depth#
reset()[source]#
set_shader(index)[source]#
property shader_name_list#
property spp#
property tone_index#
property window#

sapien.utils.viewer.scene_window module#

class sapien.utils.viewer.scene_window.SceneWindow[source]#

Bases: Plugin

build()[source]#
close()[source]#
get_ui_windows()[source]#
init(viewer)[source]#
reset()[source]#
select_entity(entity: Entity)[source]#
property selected_entity#

sapien.utils.viewer.serialization module#

sapien.utils.viewer.setting_window module#

class sapien.utils.viewer.setting_window.SettingWindow[source]#

Bases: Plugin

build()[source]#
close()[source]#
get_ui_windows()[source]#
notify_scene_change()[source]#
reset()[source]#

sapien.utils.viewer.transform_window module#

class sapien.utils.viewer.transform_window.TransformWindow[source]#

Bases: Plugin

build()[source]#
clear_ghost_objects()[source]#
close()[source]#
compute_ik()[source]#
get_articulation(entity)[source]#
get_ui_windows()[source]#
property gizmo_matrix#
notify_selected_entity_change()[source]#
refresh_ghost_objects()[source]#
reset()[source]#
property scene#
property selected_entity#
teleport(_)[source]#
update_ghost_objects()[source]#

sapien.utils.viewer.viewer module#

class sapien.utils.viewer.viewer.Viewer(renderer: ~sapien.pysapien.render.SapienRenderer | None = None, shader_dir='', resolutions=(1920, 1080), plugins=[<sapien.utils.viewer.path_window.PathWindow object>, <sapien.utils.viewer.contact_window.ContactWindow object>, <sapien.utils.viewer.setting_window.SettingWindow object>, <sapien.utils.viewer.transform_window.TransformWindow object>, <sapien.utils.viewer.render_window.RenderOptionsWindow object>, <sapien.utils.viewer.control_window.ControlWindow object>, <sapien.utils.viewer.scene_window.SceneWindow object>, <sapien.utils.viewer.entity_window.EntityWindow object>, <sapien.utils.viewer.articulation_window.ArticulationWindow object>])[source]#

Bases: object

add_bounding_box(pose, half_size, color)[source]#
property cameras#
clear_scene()[source]#
close()[source]#
property closed#
property control_window: ControlWindow#
draw_aabb(lower, upper, color)[source]#
drop(files)[source]#
focus_camera(camera)[source]#
focus_change(focused)[source]#
focus_entity(entity)[source]#
get_entity_viewer_pose(entity)[source]#
init_plugins(plugins)[source]#
loop(physx_steps=0)[source]#

A convenience method for opening a temporary viewer for a scene. Simply call scene.create_viewer().loop()

notify_render_update()[source]#

notify the viewer that the camera is moved

register_click_handler(handler)[source]#
remove_bounding_box(box)[source]#
render()[source]#
property render_scene#
reset_notifications()[source]#
property resolution#
property scene: Scene#
select_entity(entity: Entity)[source]#
property selected_entity_visibility#
set_camera_pose(pose)[source]#
set_camera_rpy(r, p, y)[source]#
set_camera_xyz(x, y, z)[source]#
set_scene(scene: Scene)[source]#
set_scenes(scenes, offsets=None)[source]#
update_aabb(aabb, lower, upper)[source]#
update_bounding_box(box, pose, half_size)[source]#

Module contents#