Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #130: the user can choose whether to show the axes or not in function set_scene #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/py_package/utils/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def __init__(
renderer: SapienRenderer,
shader_dir="",
resolutions=(1024, 768),
show_axes=True,
):
if not os.path.exists("imgui.ini"):
with open("imgui.ini", "w") as f:
Expand All @@ -227,7 +228,7 @@ def __init__(
self.fovy = np.pi / 2

self.axes = None
self.show_axes = True
self.show_axes = show_axes
self.axes_scale = 0.1

self.selected_entity = None
Expand Down Expand Up @@ -1979,7 +1980,7 @@ def set_scene(self, scene: Scene):
self.fps_camera_controller = FPSCameraController(self.window)
self.arc_camera_controller = ArcRotateCameraController(self.window)
self.create_visual_objects()
self.toggle_axes(True)
self.toggle_axes(self.show_axes)
self.set_fovy(np.pi / 2)

def set_camera_xyz(self, x, y, z):
Expand Down