ViewportTranslateChangedGesture#

class omni.kit.viewport.manipulator.transform.ViewportTranslateChangedGesture(
snap_manager: SnapProviderManager,
**kwargs,
)#

Bases: TranslateChangedGesture, ViewportTransformChangedGestureBase

A class for handling translation gestures in a viewport.

This class extends the TranslateChangedGesture and ViewportTransformChangedGestureBase classes to provide functionality for handling translation gestures within a viewport environment. It supports snapping and delta publications for translation operations.

Parameters:

snap_manager (SnapProviderManager) – Manages snapping behavior during translation.

Keyword Arguments:
  • usd_context_name (str) – Name of the USD context.

  • viewport_api – API for interacting with the viewport.

Methods

__init__(snap_manager, **kwargs)

Initializes the ViewportTranslateChangedGesture class.

on_began()

Handles the beginning of a translate gesture.

on_canceled()

Handles the cancellation of a translate gesture.

on_changed()

Handles changes during a translate gesture.

on_ended()

Handles the end of a translate gesture.

Attributes

__init__(
snap_manager: SnapProviderManager,
**kwargs,
)#

Initializes the ViewportTranslateChangedGesture class.

on_began()#

Handles the beginning of a translate gesture.

on_canceled()#

Handles the cancellation of a translate gesture.

on_changed()#

Handles changes during a translate gesture.

Parameters:

args – Arguments for the gesture change event.

Keyword Arguments:
  • key1 (type) – Description of key1.

  • key2 (type) – Description of key2.

on_ended()#

Handles the end of a translate gesture.