Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework
A context object that is meant to hold the scene information for the hovered viewport on a game thread, to be used by a gizmo later for hit testing. The organization mirrors FSceneView so that functions could be written in a templated way to use either FSceneView or UGizmoViewContext, though UGizmoViewContext only keeps the needed data.
| Name | UGizmoViewContext |
| Type | class |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseGizmos/GizmoViewContext.h |
| Include Path | #include "BaseGizmos/GizmoViewContext.h" |
Syntax
UCLASS (MinimalAPI)
class UGizmoViewContext :
public UObject ,
public UE::GizmoRenderingUtil::ISceneViewInterface
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UGizmoViewContext
Classes
| Name | Remarks |
|---|---|
| FMatrices | Wrapping class for the matrices so that they can be accessed in the same way that they are accessed in FSceneView. |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| UnscaledViewRect | FIntRect | BaseGizmos/GizmoViewContext.h | ||
| ViewLocation | FVector | BaseGizmos/GizmoViewContext.h | ||
| ViewMatrices | FMatrices | BaseGizmos/GizmoViewContext.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ResetFromSceneView
(
const FSceneView& SceneView |
Use this to reinitialize the object each frame for the hovered viewport. | BaseGizmos/GizmoViewContext.h | |
bool ScreenToPixel
(
const FVector4& ScreenPoint, |
BaseGizmos/GizmoViewContext.h | ||
void SetDPIScale
(
const double InDPIScale |
BaseGizmos/GizmoViewContext.h | ||
FVector2D WorldToPixel
(
const FVector& WorldPoint |
WorldToScreen -> ScreenToPixel. A result of (-1, -1) indicates invalid W. | BaseGizmos/GizmoViewContext.h |
Overridden from ISceneViewInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual double GetDPIScale() |
BaseGizmos/GizmoViewContext.h | ||
virtual const FMatrix & GetProjectionMatrix() |
BaseGizmos/GizmoViewContext.h | ||
virtual const FIntRect & GetUnscaledViewRect() |
BaseGizmos/GizmoViewContext.h | ||
virtual FVector GetViewDirection() |
BaseGizmos/GizmoViewContext.h | ||
virtual FVector GetViewLocation() |
BaseGizmos/GizmoViewContext.h | ||
virtual const FMatrix & GetViewMatrix() |
BaseGizmos/GizmoViewContext.h | ||
virtual FVector GetViewRight() |
BaseGizmos/GizmoViewContext.h | ||
virtual FVector GetViewUp() |
BaseGizmos/GizmoViewContext.h | ||
virtual bool IsPerspectiveProjection() |
BaseGizmos/GizmoViewContext.h | ||
virtual FVector4 WorldToScreen
(
const FVector& WorldPoint |
BaseGizmos/GizmoViewContext.h |