CameraGestureBase#
- class omni.kit.manipulator.camera.CameraGestureBase(
- model: AbstractManipulatorModel,
- configure_model: Callable | None = None,
- name: str | None = None,
- *args,
- **kwargs,
Bases:
DragGesture
Methods
__init__
(self, **kwargs)Construct the gesture to track mouse drags.
destroy
()dirty_items
(model)get_rotation_speed
(secondary)on_began
([mouse])on_changed
([mouse])on_ended
()Attributes
center_of_interest
disable_look
disable_pan
disable_tumble
disable_zoom
initial_transform
intertia
last_transform
look_speed
move_speed
orthographic
projection
tumble_speed
up_axis
world_speed
- __init__(
- self: omni.ui_scene._scene.DragGesture,
- **kwargs,
Construct the gesture to track mouse drags.
- `kwargsdict`
See below
### Keyword Arguments:
- `mouse_button`
Mouse button that should be active to start the gesture.
- `modifiers`
The keyboard modifier that should be active ti start the gesture.
- `check_mouse_moved`
The check_mouse_moved property is a boolean flag that determines whether the DragGesture should verify if the 2D screen position of the mouse has changed before invoking the on_changed method. This property is essential in a 3D environment, as changes in the camera position can result in the mouse pointing to different locations in the 3D world even when the 2D screen position remains unchanged.
Usage When check_mouse_moved is set to True, the DragGesture will only call the on_changed method if the actual 2D screen position of the mouse has changed. This can be useful when you want to ensure that the on_changed method is only triggered when there is a genuine change in the mouse’s 2D screen position. If check_mouse_moved is set to False, the DragGesture will not check for changes in the mouse’s 2D screen position before calling the on_changed method. This can be useful when you want the on_changed method to be invoked even if the mouse’s 2D screen position hasn’t changed, such as when the camera position is altered, and the mouse now points to a different location in the 3D world.
- `on_began_fn`
Called if the callback is not set when the user clicks the mouse button.
- `on_changed_fn`
Called if the callback is not set when the user moves the clicked button.
- `on_ended_fn`
Called if the callback is not set when the user releases the mouse button.
- `name`
The name of the object. It’s used for debugging.
- `manager`
The Manager that controld this gesture.