SimpleRotateChangedGesture#

class omni.kit.manipulator.transform.SimpleRotateChangedGesture(**kwargs)#

Bases: RotateChangedGesture

Handles the rotation changes for a transform manipulator gesture.

This gesture class responds to changes in rotation during a rotation operation. It updates the rotation matrix of the manipulated object based on the axis and angle provided by the rotation gesture payload.

Methods

on_began()

Called when the gesture begins.

on_changed()

Called when the rotation gesture is updated.

Attributes

__init__(**kwargs)#

Initializes the TransformChangedGesture.

on_began()#

Called when the gesture begins.

Initializes the rotation matrix of the manipulated object using the current rotation values.

on_changed()#

Called when the rotation gesture is updated.

Applies the rotation changes based on the axis and angle provided by the gesture payload. Updates the model’s rotation data by applying the rotation to the starting rotation matrix. The rotation is computed by constructing a rotation matrix around the axis for the given angle in radians, then multiplying it by the initial rotation matrix. The result is decomposed back into Euler angles in degrees and set on the model.