![]() |
ezEngine Release 26.9
|
#include <ManipulatorAdapter.h>

Public Member Functions | |
| void | SetManipulator (const ezManipulatorAttribute *pAttribute, const ezDocumentObject *pObject) |
| Connects this adapter to the given attribute and document object, then calls Finalize() and Update(). | |
| virtual void | QueryGridSettings (ezGridSettingsMsgToEngine &out_gridSettings) |
Protected Member Functions | |
| virtual ezTransform | GetOffsetTransform () const |
| virtual ezTransform | GetObjectTransform () const |
| ezObjectAccessorBase * | GetObjectAccessor () const |
| const ezAbstractProperty * | GetProperty (const char *szProperty) const |
| virtual void | Finalize ()=0 |
| Called once after SetManipulator(). Use this for one-time gizmo setup that depends on m_pObject being valid. | |
| virtual void | Update ()=0 |
| Called when a relevant property on m_pObject changes, after a transaction finishes, or on visibility changes. | |
| virtual void | UpdateGizmoTransform ()=0 |
| Called every frame before the viewport redraws. Update gizmo world-space transforms here. | |
| void | BeginTemporaryInteraction () |
| Starts a temporary command sequence for live drag interaction. Must be paired with EndTemporaryInteraction() or CancelTemporayInteraction(). | |
| void | EndTemporaryInteraction () |
| void | CancelTemporayInteraction () |
| void | ChangeProperties (const char *szProperty1, ezVariant value1, const char *szProperty2=nullptr, ezVariant value2=ezVariant(), const char *szProperty3=nullptr, ezVariant value3=ezVariant(), const char *szProperty4=nullptr, ezVariant value4=ezVariant(), const char *szProperty5=nullptr, ezVariant value5=ezVariant(), const char *szProperty6=nullptr, ezVariant value6=ezVariant()) |
| Convenience wrapper that starts a transaction, sets up to six properties on m_pObject, and finishes the transaction. | |
| void | ClampProperty (const char *szProperty, ezVariant &value) const |
Protected Attributes | |
| bool | m_bManipulatorIsVisible = false |
| const ezManipulatorAttribute * | m_pManipulatorAttr = nullptr |
| const ezDocumentObject * | m_pObject = nullptr |
| The document object this adapter operates on. Valid for the lifetime of the adapter. | |
Abstract base class for in-viewport gizmo adapters driven by an ezManipulatorAttribute.
An adapter bridges one document object and one ezManipulatorAttribute to a set of gizmos rendered in the viewport. It is instantiated by ezManipulatorAdapterRegistry and initialized via SetManipulator(). Subclasses implement Finalize(), Update(), and UpdateGizmoTransform() to set up and maintain their gizmos. UpdateGizmoTransform() is called every frame before the viewport is redrawn, while Update() is called on property changes and after transactions.
Adapters are deleted synchronously by ezManipulatorAdapterRegistry::ClearAdapters when the active manipulator changes (e.g. due to a selection change). Any code path inside an adapter that changes the selection must therefore defer the change to avoid deleting itself while still on the call stack.
|
protectedpure virtual |
Called once after SetManipulator(). Use this for one-time gizmo setup that depends on m_pObject being valid.
Implemented in ezBoneManipulatorAdapter, ezBoxManipulatorAdapter, ezCapsuleManipulatorAdapter, ezConeAngleManipulatorAdapter, ezConeLengthManipulatorAdapter, ezNonUniformBoxManipulatorAdapter, ezSphereManipulatorAdapter, ezSplineManipulatorAdapter, ezSplineTangentManipulatorAdapter, and ezTransformManipulatorAdapter.
|
protectedpure virtual |
Called when a relevant property on m_pObject changes, after a transaction finishes, or on visibility changes.
Implemented in ezBoneManipulatorAdapter, ezBoxManipulatorAdapter, ezCapsuleManipulatorAdapter, ezConeAngleManipulatorAdapter, ezConeLengthManipulatorAdapter, ezNonUniformBoxManipulatorAdapter, ezSphereManipulatorAdapter, ezSplineManipulatorAdapter, ezSplineTangentManipulatorAdapter, and ezTransformManipulatorAdapter.
|
protectedpure virtual |
Called every frame before the viewport redraws. Update gizmo world-space transforms here.
Implemented in ezBoneManipulatorAdapter, ezBoxManipulatorAdapter, ezCapsuleManipulatorAdapter, ezConeAngleManipulatorAdapter, ezConeLengthManipulatorAdapter, ezNonUniformBoxManipulatorAdapter, ezSphereManipulatorAdapter, ezSplineManipulatorAdapter, ezSplineTangentManipulatorAdapter, and ezTransformManipulatorAdapter.