GfQuatEulerAttributeModel
- class omni.kit.property.usd.GfQuatEulerAttributeModel(stage: Stage, attribute_paths: List[Path], tf_type: Type, self_refresh: bool, metadata: dict)
Bases:
AbstractItemModel,UsdBaseA model for representing orientation as Euler angles based on quaternion attributes.
This model allows the conversion and representation of quaternion data into Euler angles for easier manipulation and understanding of orientation data within USD stages. It provides methods to decompose a quaternion into Euler angles and compose them back into a quaternion, which is the underlying representation.
- Parameters
stage (
Usd.Stage) – The stage in which the attribute resides.attribute_paths (List[Sdf.Path]) – A list of USD attribute paths to be monitored by this model.
tf_type (
Tf.Type) – The type of the transformation, typically a quaternion.self_refresh (bool) – Indicates whether the model should refresh itself when changes occur.
metadata (dict) – Additional metadata associated with the attribute.
Methods
__init__(stage, attribute_paths, tf_type, ...)Initializes the GfQuatEulerAttributeModel.
begin_edit(item)Begins an editing session for the item.
clean()Cleans up the GfQuatEulerAttributeModel.
end_edit(item)Ends an editing session for the item.
get_item_children(item)Gets the item's children.
get_item_value_model(item, column_id)Gets the value model for the specified item and column.
Updates the submodels of GfQuatEulerAttributeModel with the current quaternion value.
Attributes
List of axis vectors for quaternion to euler conversion.
- __init__(stage: Stage, attribute_paths: List[Path], tf_type: Type, self_refresh: bool, metadata: dict)
Initializes the GfQuatEulerAttributeModel.
- begin_edit(item)
Begins an editing session for the item.
- Parameters
item – The item to begin editing.
- clean()
Cleans up the GfQuatEulerAttributeModel.
- end_edit(item)
Ends an editing session for the item.
- Parameters
item – The item to end editing.
- get_item_children(item)
Gets the item’s children.
- Parameters
item – The item to retrieve the children for.
- get_item_value_model(item, column_id)
Gets the value model for the specified item and column.
- Parameters
item – The item to retrieve the value model for.
column_id – The ID of the column to retrieve the model for.
- update_to_submodels()
Updates the submodels of GfQuatEulerAttributeModel with the current quaternion value.
- axes = [Gf.Vec3d(1.0, 0.0, 0.0), Gf.Vec3d(0.0, 1.0, 0.0), Gf.Vec3d(0.0, 0.0, 1.0)]
List of axis vectors for quaternion to euler conversion.
- Type
List[Gf.Vec3d]