Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework > API/Runtime/InteractiveToolsFramework/BaseGizmos
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UGizmoElementBase
- UGizmoElementArrow
- UGizmoElementBox
- UGizmoElementCone
- UGizmoElementCylinder
- UGizmoElementLineBase
- UGizmoElementCircleBase
- UGizmoElementArc
- UGizmoElementCircle
- UGizmoElementTorus
- UGizmoElementGroup
- UGizmoElementRectangle
References
| Module | InteractiveToolsFramework |
| Header | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseGizmos/GizmoElementBase.h |
| Include | #include "BaseGizmos/GizmoElementBase.h" |
Syntax
class UGizmoElementBase : public UObject
Remarks
Base class for 2d and 3d primitive objects intended to be used as part of 3D Gizmos. Contains common properties and utility functions. This class does nothing by itself, use subclasses like UGizmoElementCylinder
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bEnabled | Whether element is enabled. Render and LineTrace only occur when bEnabled is true. | |
| bool | bEnabledForDefaultState | Whether element is enabled when element state is default. | |
| bool | bEnabledForHoveringState | Whether element is enabled when element state is hovering. | |
| bool | bEnabledForInteractingState | Whether element is enabled when element state is interacting. | |
| bool | bEnabledForOrthographicProjection | Whether element is enabled for orthographic projection. | |
| bool | bEnabledForPerspectiveProjection | Whether element is enabled for perspective projection. | |
| EGizmoElementInteractionState | ElementInteractionState | Current element interaction state - None, Hovering or Interacting. | |
| EGizmoElementState | ElementState | Element state - indicates whether object is visible or hittable. | |
| void virtual Render(IToolsContextRenderAPI *RenderAPI, const FRenderTraversalState &RenderState)... | LineTrace | Render enabled visible element. | |
| FGizmoElementMeshRenderStateAttributes | MeshRenderAttributes | Mesh render state attributes for this element. | |
| uint32 | PartIdentifier | Part identifier. | |
| float | PixelHitDistanceThreshold | Pixel hit distance threshold, element will be scaled enough to add this threshold when line-tracing. | |
| float | ViewAlignAxialAngleTol | Axial view alignment angle tolerance in radians, based on angle between align normal and view direction. | |
| float | ViewAlignAxialMaxCosAngleTol | Axial view alignment minimum cos angle tolerance, computed based on ViewAlignAxialAngleTol. | |
| FVector | ViewAlignAxis | View align axis. | |
| FVector | ViewAlignNormal | View align normal. | |
| EGizmoElementViewAlignType | ViewAlignType | View align type: None, PointEye, or PointWorld. | |
| float | ViewDependentAngleTol | View-dependent angle tolerance based on : For Axis, minimum radians between view dependent axis and view direction. | |
| float | ViewDependentAxialMaxCosAngleTol | Axial view alignment minimum cos angle tolerance, computed based on ViewDependentAngleTol. | |
| FVector | ViewDependentAxis | View-dependent axis or plane normal, based on the view-dependent type. | |
| float | ViewDependentPlanarMinCosAngleTol | Planar view alignment minimum cos angle tolerance, computed based on ViewDependentAngleTol. | |
| EGizmoElementViewDependentType | ViewDependentType | View-dependent type - None, Axis or Plane. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Clear mesh render state hover material attribute. | ||
| void | Clear mesh render state vertex color attribute. | ||
| void | Clear mesh render interact state material attribute. | ||
| void | Clear mesh render state vertex color attribute. | ||
| void | Clear mesh render state material attribute. | ||
| void | Clear mesh render state vertex color attribute. | ||
| bool | Get mesh render state hover material attribute's override setting. | ||
| bool | Get mesh render state vertex color attribute's override setting. | ||
| bool | Get mesh render state interact material attribute's override setting. | ||
| bool | Get mesh render state vertex color attribute's override setting. | ||
| bool | Get mesh render state material attribute's override setting. | ||
| bool | Get mesh render state vertex color attribute's override setting. | ||
| FQuat | GetAlignRotBetweenCoordSpaces
(
FVector SourceForward, |
Helper method for view alignment. | |
| EGizmoElementInteractionState | |||
| EGizmoElementState | |||
| bool | GetEnabled () |
||
| bool | |||
| bool | |||
| bool | |||
| bool | GetEnabledForInteractionState
(
EGizmoElementInteractionState InInteractionState |
Returns whether element is enabled for given interaction state. | |
| bool | |||
| bool | GetEnabledForViewProjection
(
bool bIsPerspectiveProjection |
Returns whether element is enabled for given view projection type. | |
| bool | |||
| bool | |||
| const UMaterialInterface * | Get mesh render state hover material attribute's value. | ||
| FLinearColor | Get mesh render state vertex color attribute's value. | ||
| const UMaterialInterface * | Get mesh render state interact material attribute's value. | ||
| FLinearColor | Get mesh render state vertex color attribute's value. | ||
| const UMaterialInterface * | GetMaterial () |
Get mesh render state material attribute's value. | |
| TOptional< bool > | GetPartHittableState
(
uint32 InPartIdentifier |
Get element's hittable state for element associated with the specified gizmo part, if part id was found. | |
| uint32 | |||
| TOptional< EGizmoElementInteractionState > | GetPartInteractionState
(
uint32 InPartIdentifier |
Get element's interaction state for element associated with the specified gizmo part, if part id was found. | |
| TOptional< bool > | GetPartVisibleState
(
uint32 InPartIdentifier |
Get element's visible state for element associated with the specified gizmo part, if part id was found. | |
| float | |||
| FLinearColor | Get mesh render state vertex color attribute's value. | ||
| float | |||
| FVector | |||
| FVector | |||
| bool | GetViewAlignRot
(
const FVector& InViewLocation, |
Return whether this element has a view alignment rotation based on input view parameters and view-dependent alignment settings. | |
| bool | GetViewAlignRot
(
const UGizmoViewContext* View, |
Return whether this element has a view alignment rotation based on input gizmo view context and view-dependent alignment settings. | |
| bool | GetViewAlignRot
(
const FSceneView* View, |
Return whether this element has a view alignment rotation based on input FSceneView and view-dependent alignment settings. | |
| EGizmoElementViewAlignType | |||
| float | |||
| FVector | |||
| EGizmoElementViewDependentType | |||
| bool | GetViewDependentVisibility
(
const FVector& InViewLocation, |
Returns whether object is visible based on view-dependent visibility settings. | |
| bool | GetViewDependentVisibility
(
const UGizmoViewContext* View, |
Returns whether object is visible in input gizmo view context based on view-dependent visibility settings. | |
| bool | GetViewDependentVisibility
(
const FSceneView* View, |
Returns whether object is visible in input FSceneView based on view-dependent visibility settings. | |
| bool | |||
| bool | Returns true, if mesh render state vertex color attribute has been set. | ||
| bool | Returns true, if mesh render state vertex color attribute has been set. | ||
| bool | Returns true, if mesh render state vertex color attribute has been set. | ||
| bool | IsHittable
(
const UGizmoViewContext* ViewContext, |
Return whether element is currently hittable. | |
| bool | IsVisible
(
const FSceneView* View, |
Return whether element is currently visible. | |
| void | SetElementInteractionState
(
EGizmoElementInteractionState InInteractionState |
Object interaction state - None, Hovering or Interacting. | |
| void | SetElementState
(
EGizmoElementState InElementState |
Object type bitmask indicating whether this object is visible or hittable or both. | |
| void | SetEnabled
(
bool bInEnabled |
Element enabled flag. | |
| void | SetEnabledForDefaultState
(
bool bInEnabledForDefaultState |
Whether element is enabled when element state is default. | |
| void | SetEnabledForHoveringState
(
bool bInEnabledForHoveringState |
Whether element is enabled when element state is hovering. | |
| void | SetEnabledForInteractingState
(
bool bInEnabledForInteractingState |
Whether element is enabled when element state is interacting. | |
| void | SetEnabledForPerspectiveProjection
(
bool bInEnabledForPerspectiveProjection |
Whether element is enabled for perspective projections. | |
| void | SetEnabledInOrthographicProjection
(
bool bInEnabledForOrthographicProjection |
Whether element is enabled for orthographic projections. | |
| void | SetHittableState
(
bool bHittable |
Set/get the hittable bit in element state. | |
| void | SetHoverMaterial
(
TWeakObjectPtr< UMaterialInterface > InHoverMaterial, |
Set mesh render state hover material attribute. | |
| void | SetHoverVertexColor
(
FLinearColor InVertexColor, |
Set mesh render state vertex color attribute. | |
| void | SetInteractMaterial
(
TWeakObjectPtr< UMaterialInterface > InInteractMaterial, |
Set mesh render state interact material attribute. | |
| void | SetInteractVertexColor
(
FLinearColor InVertexColor, |
Set mesh render state vertex color attribute. | |
| void | SetMaterial
(
TWeakObjectPtr< UMaterialInterface > InMaterial, |
Methods for managing render state attributes: Material, HoverMaterial, InteractMaterial, VertexColor | |
| void | SetPartIdentifier
(
uint32 InPartId |
For an element hierarchy representing multiple parts of a single gizmo, the part identifier establishes a correspondence between a gizmo part and the elements that represent that part. | |
| void | SetPixelHitDistanceThreshold
(
float InPixelHitDistanceThreshold |
Pixel hit distance threshold, element will be scaled enough to add this threshold when line-tracing. */. | |
| void | SetVertexColor
(
FLinearColor InVertexColor, |
Set mesh render state vertex color attribute. | |
| void | SetViewAlignAxialAngleTol
(
float InMaxAngleTol |
View-align angle tolerance in radians. | |
| void | SetViewAlignAxis
(
FVector InAxis |
View align axis. | |
| void | SetViewAlignNormal
(
FVector InAxis |
View align normal. | |
| void | SetViewAlignType
(
EGizmoElementViewAlignType InViewAlignType |
View align type: None, PointEye, PointOnly, or Axial. | |
| void | SetViewDependentAngleTol
(
float InMaxAngleTol |
View-dependent angle tolerance in radians For Axis, object is culled when angle between view dependent axis and view direction is less than tolerance angle. | |
| void | SetViewDependentAxis
(
FVector InAxis |
View-dependent axis or plane normal, based on the view-dependent type. | |
| void | SetViewDependentType
(
EGizmoElementViewDependentType ViewDependentType |
View-dependent type - None, Axis or Plane. | |
| void | SetVisibleState
(
bool bVisible |
Set/get the visible bit in element state. | |
| bool | UpdateLineTraceState
(
const UGizmoViewContext* ViewContext, |
Update line trace state during line trace traversal, determines the current state for this element | |
| bool | UpdateLineTraceState
(
const UGizmoViewContext* ViewContext, |
Update line trace state during line trace traversal, determines the current state for this element Same parameters as UpdateLineTraceState above plus two output parameters: | |
| bool | UpdatePartHittableState
(
bool bHittable, |
Update element's hittable state if element is associated with the specified gizmo part, return true if part id was found. | |
| bool | UpdatePartInteractionState
(
EGizmoElementInteractionState InInteractionState, |
Update element's interaction state if element is associated with the specified gizmo part, return true if part id was found. | |
| bool | UpdatePartVisibleState
(
bool bVisible, |
Update element's visibility state if element is associated with the specified gizmo part, return true if part was found. | |
| bool | UpdateRenderState
(
IToolsContextRenderAPI* RenderAPI, |
Update render state during render traversal, determines the current render state for this element | |
| bool | UpdateRenderState
(
IToolsContextRenderAPI* RenderAPI, |
Update render state during render traversal, determines the current render state for this element Same parameters as UpdateRenderState above plus two output parameters: | |
| bool | VerifyUniformScale
(
const FVector& Scale |
Helper method to verify scale is uniform. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FLineTraceTraversalState | |||
| FRenderTraversalState | Render traversal state structure used to maintain the current render state while rendering. |