nanover.jupyter.transform_grabbing module
- class nanover.jupyter.transform_grabbing.TransformGrabData(*, transform_id: str, transform_initial_matrix: NDArray, offset_matrix: NDArray, translate: bool = True, rotate: bool = True, scale: bool = True, data: TData | None)
Bases:
Generic- data: TData | None
- offset_matrix: NDArray
- rotate: bool = True
- scale: bool = True
- transform_id: str
- transform_initial_matrix: NDArray
- translate: bool = True
- class nanover.jupyter.transform_grabbing.TransformGrabbingContext(utilities: NanoverServerUtilities)
Bases:
Generic- add_grab(key: str, grab: TransformGrabData)
- cursor_in_object_parent_matrix(cursor: dict, object: str)
Return the matrix of the cursor relative to the parent of given transform.
- end_grab(key: str)
- end_grab_from_cursor(key: str, *, cursor: dict)
- classmethod from_utilities(utilities: NanoverServerUtilities)
- get_grab(key: str)
- start_grab_from_cursor(key: str, *, transform_id: str, cursor: dict, translate=True, rotate=True, scale=True)
- transform_is_grabbed(key)
- update_grab_from_cursor(key: str, *, cursor: dict)
- nanover.jupyter.transform_grabbing.constrain_matrix_update(next_matrix, prev_matrix, *, translate=True, rotate=True, scale=True)
Return the next matrix with any translation/rotation/scale disallowed reverted to those of the previous matrix.