engine
 
载入中...
搜索中...
未找到
函数
GizmoRenderingUtil 命名空间参考

Utility functions for standard GizmoComponent rendering 更多...

函数

INTERACTIVETOOLSFRAMEWORK_API float CalculateLocalPixelToWorldScale (const FSceneView *View, const FVector &Location)
 
INTERACTIVETOOLSFRAMEWORK_API const FSceneView * FindFocusedEditorSceneView (const TArray< const FSceneView * > &Views, const FSceneViewFamily &ViewFamily, uint32 VisibilityMap)
 This function searches the input Views list for the global currently-focused FSceneView that was last set in SetGlobalFocusedEditorSceneView(). 更多...
 
INTERACTIVETOOLSFRAMEWORK_API void SetGlobalFocusedEditorSceneView (const FSceneView *View)
 This is a hack. 更多...
 
INTERACTIVETOOLSFRAMEWORK_API void SetGlobalFocusedSceneViewTrackingEnabled (bool bEnabled)
 Turn on/off the above global focused scene view tracking. 更多...
 

详细描述

Utility functions for standard GizmoComponent rendering

函数说明

◆ CalculateLocalPixelToWorldScale()

INTERACTIVETOOLSFRAMEWORK_API float GizmoRenderingUtil::CalculateLocalPixelToWorldScale ( const FSceneView *  View,
const FVector &  Location 
)
返回
Conversion factor between pixel and world-space coordinates at 3D point Location in View.
警告
This is a local estimate and is increasingly incorrect as the 3D point gets further from Location

◆ FindFocusedEditorSceneView()

INTERACTIVETOOLSFRAMEWORK_API const FSceneView * GizmoRenderingUtil::FindFocusedEditorSceneView ( const TArray< const FSceneView * > &  Views,
const FSceneViewFamily &  ViewFamily,
uint32  VisibilityMap 
)

This function searches the input Views list for the global currently-focused FSceneView that was last set in SetGlobalFocusedEditorSceneView().

Note that the Views pointers are different every frame, and we are calling SetGlobalFocusedEditorSceneView() on the Game thread but this function from the Render Thread. So it is entirely possible that we will "miss" our FSceneView and this function will return NULL. Implementations need to handle this case.

◆ SetGlobalFocusedEditorSceneView()

INTERACTIVETOOLSFRAMEWORK_API void GizmoRenderingUtil::SetGlobalFocusedEditorSceneView ( const FSceneView *  View)

This is a hack.

When we are inside the ::GetDynamicMeshElements() of a UGizmoBaseComponent RenderProxy, we need to draw to a set of FSceneView and we do not know which one is focused. UGizmoBaseComponent implementations generally try to adapt their rendering to the current view, and some of that (currently) can only happen at the level of the RenderProxy. So we need to tell the Component which FSceneView has focus, and we do that by calling this function from the EdMode.

◆ SetGlobalFocusedSceneViewTrackingEnabled()

INTERACTIVETOOLSFRAMEWORK_API void GizmoRenderingUtil::SetGlobalFocusedSceneViewTrackingEnabled ( bool  bEnabled)

Turn on/off the above global focused scene view tracking.

When disabled, FindFocusedEditorSceneView() will return the first visible FSceneView, or the first element of the Views array otherwise. Enabled by default in Editor builds, disabled by default in Runtime builds.