SimpleScaleChangedGesture#
- class omni.kit.manipulator.transform.SimpleScaleChangedGesture(**kwargs)#
Bases:
ScaleChangedGesture
A gesture class that responds to scale changes during a transform manipulator operation.
This class processes scale gestures and updates the model’s scale data accordingly. It listens for scale gestures and applies the scale factor to the current scale of the object being manipulated.
Methods
on_began
()Called when the scale gesture begins.
Called when the scale gesture is updated.
Attributes
- __init__(**kwargs)#
Initializes the TransformChangedGesture.
- on_began()#
Called when the scale gesture begins.
Initializes the _begin_scale attribute with the current scale values of the item being manipulated.
- on_changed()#
Called when the scale gesture is updated.
Applies a scale delta to the initial scale values and updates the model with the new scale. It multiplies the initial scale by the scale factor provided in the gesture payload for each axis.
- Parameters:
gesture_payload (ScaleDragGesturePayload) – The payload containing the scale factor and axis information.
sender (AbstractTransformManipulatorModel) – The model associated with the gesture.