Skip to content

Commit

Permalink
compute yaw axis ad hoc instead of caching
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Apr 28, 2024
1 parent 749108f commit 63a3447
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ogre_mesh_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ def __init__(self, infile, rescfg):
self.highlight_mat = None
self.restart = False
self.axes_visible = False
self.fixed_yaw_axes = [(1, 0, 0), (0, 1, 0), (0, 0, 1)]
self.fixed_yaw_axis = 1
self.default_tilt = Ogre.Degree(20)
self.grid_floor = None
Expand Down Expand Up @@ -626,7 +625,10 @@ def update_fixed_camera_yaw(self):
camnode = self.camman.getCamera()
diam = camnode.getPosition().length()
camnode.setOrientation(Ogre.Quaternion.IDENTITY)
camnode.setFixedYawAxis(self.fixed_yaw_axis != -1, self.fixed_yaw_axes[self.fixed_yaw_axis])

yaw_axis = [0, 0, 0]
yaw_axis[self.fixed_yaw_axis] = 1
camnode.setFixedYawAxis(self.fixed_yaw_axis != -1, yaw_axis)
self.camman.setFixedYaw(self.fixed_yaw_axis != -1)
if self.grid_visible:
self.grid_floor.show_plane(self.fixed_yaw_axis)
Expand Down

0 comments on commit 63a3447

Please sign in to comment.