Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
A struct to hold some objects that can be reused across multiple sub gizmos that operate on the same compound gizmo, to avoid creating redundant objects. For instance, the transform source can be the same for the sub gizmos that manipulate the same overall TRS gizmo, so the first sub gizmo would create that transform source, and the subsequent ones will reuse it.
Note: While the initialization functions will try to do reasonable things with this shared state (for instance, not attempt to use shared state for the axis source if the axis source is marked as being based off of this component, rather than the root), it is still up to the user to decide whether shared state should be an option. For instance, if your sub gizmo manipulates the root as normal but for some reason targets a different TransformProxy than other subgizmos, then it shouldn't share a TransformSource or StateTarget with the other gizmos, so either the shared state struct should not be used (preferable), or those properties in the struct should be nulled out before/after the call. In general, if your sub gizmo is part of the overall TRS gizmo itself (i.e. represents one of its elements), then using the shared state struct will make sense, and will save you a few redundant object creations. If your sub gizmo is just attached to the TRS gizmo but moves independently, then it may not be safe to use the shared state struct, and may not be worth the potential trouble even if you could save an object.
| Name | FTransformSubGizmoSharedState |
| Type | struct |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseGizmos/TransformSubGizmoUtil.h |
| Include Path | #include "BaseGizmos/TransformSubGizmoUtil.h" |
Syntax
struct FTransformSubGizmoSharedState
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CameraAxisSource | UGizmoConstantFrameAxisSource * | BaseGizmos/TransformSubGizmoUtil.h | ||
| CardinalAxisSources | UGizmoComponentAxisSource * | BaseGizmos/TransformSubGizmoUtil.h | ||
| StateTarget | UGizmoTransformChangeStateTarget * | BaseGizmos/TransformSubGizmoUtil.h | ||
| TransformSource | UGizmoScaledAndUnscaledTransformSources * | BaseGizmos/TransformSubGizmoUtil.h | ||
| UnitCardinalAxisSources | UGizmoComponentAxisSource * | BaseGizmos/TransformSubGizmoUtil.h |