Ejemplo n.º 1
0
 def __init__(self,
              initial_position=None,
              initial_rotation=None,
              colors=None):
     self.position = np.zeros(
         3) if initial_position is None else initial_position
     self.rotation: Rotation = Rotation.identity(
     ) if initial_rotation is None else initial_rotation
     self.colors = self.COLORS if colors is None else colors
     self.update_verticies()
Ejemplo n.º 2
0
 def reset_view(self):
     self.camera_rot = Rotation.identity()
Ejemplo n.º 3
0
 def toggle_cube_rot(self):
     if np.linalg.norm(self.rot_delta.as_rotvec()) < 0.01:
         self.rot_delta = Rotation.from_rotvec([0, self.SLOW_ROT_SPEED, 0])
     else:
         self.rot_delta = Rotation.identity()
Ejemplo n.º 4
0
 def __init__(self, event_hub: EventsHub):
     self.camera_rot = Rotation.identity()
     self.rot_delta = Rotation.from_rotvec([0, self.SLOW_ROT_SPEED, 0])
     self.event_hub = event_hub
     self._add_listeners()