engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FSceneViewport类 参考

A viewport for use with Slate SViewport widgets. 更多...

#include <SceneViewport.h>

+ 类 FSceneViewport 继承关系图:

Public 成员函数

virtual void BeginRenderFrame (FRHICommandListImmediate &RHICmdList) override
 Called when a frame starts to render
 
virtual void DeferInvalidateHitProxy () override
 Invalidates the viewport's cached hit proxies at the end of the frame.
 
virtual void EndRenderFrame (FRHICommandListImmediate &RHICmdList, bool bPresent, bool bLockToVsync) override
 Called when a frame is done rendering 更多...
 
virtual void EnqueueBeginRenderFrame (const bool bShouldPresent) override
 Called before BeginRenderFrame is enqueued
 
virtual void EnqueueEndRenderFrame (const bool bLockToVsync, const bool bShouldPresent) override
 Ends a rendering frame. 更多...
 
const FGeometry & GetCachedGeometry () const
 Get the cached viewport geometry.
 
virtual FCanvas * GetDebugCanvas () override
 
virtual float GetDisplayGamma () const override
 
virtual void GetMousePos (FIntPoint &MousePosition, const bool bLocalPosition=true) override
 Sets MousePosition to the current mouse position 更多...
 
virtual int32 GetMouseX () const override
 
virtual int32 GetMouseY () const override
 
virtual const FTexture2DRHIRef & GetRenderTargetTexture () const
 Gets the proper RenderTarget based on the current thread
 
virtual FIntPoint GetRenderTargetTextureSizeXY () const
 Returns dimensions of RenderTarget texture. 更多...
 
virtual FIntPoint GetSize () const override
 Returns the size of the viewport

 
virtual FVector2D GetSoftwareCursorPosition () const override
 Returns the current position of the software cursor
 
virtual FViewport * GetViewport () override
 FViewportFrame interface
 
virtual FViewportFrame * GetViewportFrame () override
 Retrieves the interface to the viewport's frame, if it has one. 更多...
 
virtual FSlateShaderResource * GetViewportRenderTargetTexture () const override
 ISlateViewport interface
 
TWeakPtr< SViewport > GetViewportWidget () const
 
virtual TWeakPtr< SWidget > GetWidget () override
 Gets the SWidget associated with this viewport
 
virtual bool HandleNavigation (const uint32 InUserIndex, TSharedPtr< SWidget > InDestination) override
 Give the viewport an opportunity to override the navigation behavior. 更多...
 
bool HasFixedSize () const
 Does the viewport has a fixed size
 
virtual void InvalidateDisplay () override
 Called when the viewport should be invalidated and redrawn

 
virtual bool IsCursorVisible () const override
 Returns true if the mouse cursor is currently visible 更多...
 
virtual bool IsStereoRenderingAllowed () const override
 Should return true, if stereo rendering is allowed in this viewport
 
virtual bool KeyState (FKey Key) const override
 Returns the state of the provided key. 更多...
 
virtual void MoveWindow (int32 NewPosX, int32 NewPosY, int32 NewSizeX, int32 NewSizeY) override
 FViewport interface
 
virtual FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent) override
 Called when an analog value changes on a button that supports analog 更多...
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent) override
 Called when Slate needs to know what the mouse cursor should be. 更多...
 
virtual void OnDrawViewport (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled) override
 Called by Slate when the viewport widget is drawn Implementers of this interface can use this method to perform custom per draw functionality. 更多...
 
virtual void OnFinishedPointerInput () override
 Called after all input for this frame is processed.
 
virtual void OnFocusLost (const FFocusEvent &InFocusEvent) override
 Called when the viewport loses keyboard focus. 更多...
 
virtual FReply OnFocusReceived (const FFocusEvent &InFocusEvent) override
 Called when the viewport gains keyboard focus. 更多...
 
virtual FReply OnKeyChar (const FGeometry &InGeometry, const FCharacterEvent &InCharacterEvent) override
 Called by Slate when a character key is pressed while the viewport has focus 更多...
 
virtual FReply OnKeyDown (const FGeometry &InGeometry, const FKeyEvent &InKeyEvent) override
 Called by Slate when a key is pressed inside the viewport 更多...
 
virtual FReply OnKeyUp (const FGeometry &InGeometry, const FKeyEvent &InKeyEvent) override
 Called by Slate when a key is released inside the viewport 更多...
 
virtual TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply) override
 After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget. 更多...
 
virtual FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent) override
 Called when motion is detected (controller or device) e.g. 更多...
 
virtual FReply OnMouseButtonDoubleClick (const FGeometry &InGeometry, const FPointerEvent &InMouseEvent) override
 Called by Slate when the mouse wheel is used inside the viewport 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &InGeometry, const FPointerEvent &MouseEvent) override
 Called by Slate when a mouse button is pressed inside the viewport 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &InGeometry, const FPointerEvent &MouseEvent) override
 Called by Slate when a mouse button is released inside the viewport 更多...
 
virtual FReply OnMouseMove (const FGeometry &InGeometry, const FPointerEvent &MouseEvent) override
 Called by Slate when a mouse button is released inside the viewport 更多...
 
virtual FReply OnMouseWheel (const FGeometry &InGeometry, const FPointerEvent &MouseEvent) override
 Called by Slate when the mouse wheel is used inside the viewport 更多...
 
void OnPlayWorldViewportSwapped (const FSceneViewport &OtherViewport)
 Performs a resize when in swapping viewports while viewing the play world. 更多...
 
virtual FPopupMethodReply OnQueryPopupMethod () const override
 Called to figure out whether we can make new windows for popups within this viewport. 更多...
 
virtual TOptional< bool > OnQueryShowFocus (const EFocusCause InFocusCause) const override
 Called to determine if we should render the focus brush. 更多...
 
virtual FReply OnRequestWindowClose () override
 Called when the top level window associated with the viewport has been requested to close. 更多...
 
virtual FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
 Called when a touchpad touch is ended (finger lifted) 更多...
 
virtual FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent) override
 Called when a touchpad touch has first moved after initial press 更多...
 
virtual FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &TouchEvent) override
 Called when a touchpad touch force changes, but may or may not have moved 更多...
 
virtual FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &InGestureEvent) override
 Called on a touchpad gesture event 更多...
 
virtual FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
 Called when a touchpad touch is moved (finger moved) 更多...
 
virtual FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent) override
 Called when a touchpad touch is started (finger down) 更多...
 
virtual FReply OnViewportActivated (const FWindowActivateEvent &InActivateEvent) override
 Called when the viewports top level window is being Activated
 
virtual void OnViewportClosed () override
 Called when the viewport has been requested to close.
 
virtual void OnViewportDeactivated (const FWindowActivateEvent &InActivateEvent) override
 Called when the viewports top level window is being Deactivated
 
void PaintDebugCanvas (const FGeometry &AllottedGeometry, FSlateWindowElementList &OutDrawElements, int32 LayerId) const
 Adds a draw element for the debug canvas. 更多...
 
virtual void ProcessInput (float DeltaTime) override
 Additional input processing that happens every frame

 
virtual bool RequiresVsync () const override
 Returns true if the viewport should be vsynced.
 
virtual void ResizeFrame (uint32 NewSizeX, uint32 NewSizeY, EWindowMode::Type NewWindowMode) override
 Called to resize the actual window where this viewport resides 更多...
 
void SetDebugCanvas (TSharedPtr< class SDebugCanvas > InDebugCanvas)
 Sets the debug canvas used to display FCanvas on top of this viewport
 
void SetGammaOverride (const float InGammaOverride)
 Set an optional display gamma to use for this viewport
 
virtual void SetMouse (int32 X, int32 Y) override
 Not implemented

 
void SetOnSceneViewportResizeDel (FOnSceneViewportResize InOnSceneViewportResize)
 Sets the Viewport resize delegate.
 
void SetPlayInEditorGetsMouseControl (const bool bGetsMouseControl)
 Sets whether a PIE viewport takes mouse control on startup. 更多...
 
virtual void SetPreCaptureMousePosFromSlateCursor () override
 Sets PreCapture coordinates from the current position of the slate cursor.
 
virtual void SetRequiresVsync (bool bShouldVsync) override
 Indicate that the viewport should be block for vsync.
 
virtual bool SetUserFocus (bool bFocus) override
 Captures or uncaptures the joystick 更多...
 
void SwapStatCommands (const FSceneViewport &OtherViewport)
 Swaps the active stats with another viewports 更多...
 
virtual void Tick (const FGeometry &AllottedGeometry, double InCurrentTime, float InDeltaTime) override
 Ticks the viewport
 
virtual void UpdateViewportRHI (bool bDestroyed, uint32 NewSizeX, uint32 NewSizeY, EWindowMode::Type NewWindowMode, EPixelFormat PreferredPixelFormat) override
 Updates the viewport RHI with a new size and fullscreen flag
 
virtual FIntPoint ViewportToVirtualDesktopPixel (FVector2D ViewportCoordinate) const override
 Transforms a coordinate in the local space of this viewport into a virtual desktop pixel. 更多...
 
virtual FVector2D VirtualDesktopPixelToViewport (FIntPoint VirtualDesktopPointPx) const override
 Transforms a virtual desktop pixel (the origin is in the primary screen's top left corner) to the local space of this viewport 更多...
 
- Public 成员函数 继承自 FViewport
virtual ENGINE_API void BeginRenderFrame (FRHICommandListImmediate &RHICmdList)
 Starts a new rendering frame. 更多...
 
ENGINE_API FIntRect CalculateViewExtents (float AspectRatio, const FIntRect &ViewRect)
 Calculates the view inside the viewport when the aspect ratio is locked. 更多...
 
 DECLARE_MULTICAST_DELEGATE_TwoParams (FOnViewportResized, FViewport *, uint32)
 delegate type for viewport resize events ( Params: FViewport* Viewport, uint32 )
 
virtual ENGINE_API void DeferInvalidateHitProxy ()
 Invalidates the viewport's cached hit proxies at the end of the frame.
 
ENGINE_API void Draw (bool bShouldPresent=true)
 Updates the viewport's displayed pixels with the results of calling ViewportClient->Draw. 更多...
 
virtual int32 DrawStatsHUD (FCanvas *InCanvas, const int32 InX, const int32 InY)
 First chance for viewports to render custom stats text 更多...
 
virtual ENGINE_API void EndRenderFrame (FRHICommandListImmediate &RHICmdList, bool bPresent, bool bLockToVsync)
 Ends a rendering frame. 更多...
 
virtual ENGINE_API void EnqueueBeginRenderFrame (const bool bShouldPresent)
 Starts a new rendering frame. 更多...
 
virtual ENGINE_API void EnqueueEndRenderFrame (const bool bLockToVsync, const bool bShouldPresent)
 Ends a rendering frame. 更多...
 
ENGINE_API void GetActorsAndModelsInHitProxy (FIntRect InRect, TSet< AActor * > &OutActors, TSet< UModel * > &OutModels)
 Returns all actors and models found in the hit proxy within a specified region. 更多...
 
virtual FCanvas * GetDebugCanvas ()
 
virtual float GetDesiredAspectRatio () const
 
virtual ENGINE_API FRHIGPUMask GetGPUMask (FRHICommandListImmediate &RHICmdList) const override
 Returns the GPU nodes on which to render this viewport.
 
ENGINE_API HHitProxy * GetHitProxy (int32 X, int32 Y)
 Returns the dominant hit proxy at a given point. 更多...
 
ENGINE_API void GetHitProxyMap (FIntRect InRect, TArray< HHitProxy * > &OutMap)
 Copies the hit proxies from an area of the screen into a buffer. 更多...
 
virtual FIntPoint GetRenderTargetTextureSizeXY () const
 Returns dimensions of RenderTarget texture. 更多...
 
virtual FViewportFrame * GetViewportFrame ()=0
 Retrieves the interface to the viewport's frame, if it has one. 更多...
 
const FViewportRHIRef & GetViewportRHI () const
 Accessors for RHI resources
 
virtual ENGINE_API bool HasToggleFreezeCommand () override
 Returns if there is a command to freeze
 
ENGINE_API void Invalidate ()
 Invalidates cached hit proxies and the display.
 
virtual void InvalidateDisplay ()=0
 Invalidates the viewport's displayed pixels.
 
ENGINE_API void InvalidateHitProxy ()
 Invalidates cached hit proxies
 
virtual bool IsCursorVisible () const
 Returns true if the mouse cursor is currently visible 更多...
 
bool IsHDRViewport () const
 Returns true if this viewport should be rendered in HDR
 
virtual bool IsKeyboardAvailable (int32 ControllerID) const
 
virtual bool IsMouseAvailable (int32 ControllerID) const
 
bool IsPlayInEditorViewport () const
 Returns true if the viewport is for play in editor
 
bool IsSlateViewport () const
 Returns true if this is an FSlateSceneViewport
 
virtual bool IsStereoRenderingAllowed () const
 Should return true, if stereo rendering is allowed in this viewport
 
virtual ENGINE_API void ProcessToggleFreezeCommand () override
 Handles freezing/unfreezing of rendering
 
void SetHDRMode (bool bHDR)
 Sets HDR Status of Viewport
 
ENGINE_API void SetInitialSize (FIntPoint InitialSizeXY)
 Sets the initial size of this viewport. 更多...
 
void SetPlayInEditorViewport (bool bInPlayInEditorViewport)
 Sets this viewport as a play in editor viewport
 
virtual void SetPreCaptureMousePosFromSlateCursor ()
 Sets PreCapture coordinates from the current position of the slate cursor.
 
virtual void SetRequiresVsync (bool bShouldVsync)
 Indicate that the viewport should be block for vsync.
 
virtual ENGINE_API void SetViewportClient (FViewportClient *InViewportClient)
 Sets a viewport client if one wasn't provided at construction time. 更多...
 
ENGINE_API bool TakeHighResScreenShot ()
 Trigger a high res screenshot. 更多...
 
void UpdateRenderTargetSurfaceRHIToCurrentBackBuffer ()
 Update the render target surface RHI to the current back buffer
 
virtual FIntPoint ViewportToVirtualDesktopPixel (FVector2D ViewportCoordinate) const =0
 Transforms a coordinate in the local space of this viewport into a virtual desktop pixel. 更多...
 
virtual FVector2D VirtualDesktopPixelToViewport (FIntPoint VirtualDesktopPointPx) const =0
 Transforms a virtual desktop pixel (the origin is in the primary screen's top left corner) to the local space of this viewport 更多...
 
- Public 成员函数 继承自 FRenderTarget
virtual ENGINE_API float GetDisplayGamma () const
 
virtual ENGINE_API FRHIGPUMask GetGPUMask (FRHICommandListImmediate &RHICmdList) const
 Returns the GPU nodes on which to render this rendertarget.
 
virtual ENGINE_API const FTexture2DRHIRef & GetRenderTargetTexture () const
 Accessor for the surface RHI when setting this render target 更多...
 
virtual bool HasToggleFreezeCommand ()
 Returns if there is a command to toggle freezerendering
 
virtual void ProcessToggleFreezeCommand ()
 Handles freezing/unfreezing of rendering
 
ENGINE_API bool ReadFloat16Pixels (TArray< FFloat16Color > &OutputBuffer, ECubeFace CubeFace=CubeFace_PosX)
 Reads the viewport's displayed pixels into the given color buffer. 更多...
 
ENGINE_API bool ReadLinearColorPixels (TArray< FLinearColor > &OutputBuffer, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_MinMax, CubeFace_MAX), FIntRect InRect=FIntRect(0, 0, 0, 0))
 Reads the viewport's displayed pixels into the given color buffer. 更多...
 
ENGINE_API bool ReadPixels (TArray< FColor > &OutImageData, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX), FIntRect InRect=FIntRect(0, 0, 0, 0))
 Reads the viewport's displayed pixels into a preallocated color buffer. 更多...
 
ENGINE_API bool ReadPixelsPtr (FColor *OutImageBytes, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX), FIntRect InSrcRect=FIntRect(0, 0, 0, 0))
 Reads the viewport's displayed pixels into a preallocated color buffer. 更多...
 
- Public 成员函数 继承自 ISlateViewport
virtual bool AllowScaling () const
 Whether the viewport contents should be scaled or not. 更多...
 
virtual FIntPoint GetSize () const =0
 Returns the size of the viewport

 
virtual FVector2D GetSoftwareCursorPosition () const
 Returns the current position of the software cursor
 
virtual class FSlateShaderResource * GetViewportRenderTargetTexture () const =0
 Returns a slate texture used to draw the rendered viewport in Slate. 更多...
 
virtual TWeakPtr< SWidget > GetWidget ()
 Gets the SWidget associated with this viewport
 
virtual bool HandleNavigation (const uint32 InUserIndex, TSharedPtr< SWidget > InDestination)
 Give the viewport an opportunity to override the navigation behavior. 更多...
 
virtual bool IsSoftwareCursorVisible () const
 Returns whether the software cursor is currently visible
 
virtual bool IsViewportTextureAlphaOnly () const
 Does the texture returned by GetViewportRenderTargetTexture only have an alpha channel?
 
virtual FReply OnAnalogValueChanged (const FGeometry &MyGeometry, const FAnalogInputEvent &InAnalogInputEvent)
 Called when an analog value changes on a button that supports analog 更多...
 
virtual FCursorReply OnCursorQuery (const FGeometry &MyGeometry, const FPointerEvent &CursorEvent)
 Called when Slate needs to know what the mouse cursor should be. 更多...
 
virtual void OnDrawViewport (const FGeometry &AllottedGeometry, const FSlateRect &MyCullingRect, class FSlateWindowElementList &OutDrawElements, int32 LayerId, const FWidgetStyle &InWidgetStyle, bool bParentEnabled)
 Called by Slate when the viewport widget is drawn Implementers of this interface can use this method to perform custom per draw functionality. 更多...
 
virtual void OnFinishedPointerInput ()
 Called after all input for this frame is processed.
 
virtual void OnFocusLost (const FFocusEvent &InFocusEvent)
 Called when the viewport loses keyboard focus. 更多...
 
virtual FReply OnFocusReceived (const FFocusEvent &InFocusEvent)
 Called when the viewport gains keyboard focus. 更多...
 
virtual FReply OnKeyChar (const FGeometry &MyGeometry, const FCharacterEvent &InCharacterEvent)
 Called by Slate when a character key is pressed while the viewport has focus 更多...
 
virtual FReply OnKeyDown (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called by Slate when a key is pressed inside the viewport 更多...
 
virtual FReply OnKeyUp (const FGeometry &MyGeometry, const FKeyEvent &InKeyEvent)
 Called by Slate when a key is released inside the viewport 更多...
 
virtual TOptional< TSharedRef< SWidget > > OnMapCursor (const FCursorReply &CursorReply)
 After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget. 更多...
 
virtual FReply OnMotionDetected (const FGeometry &MyGeometry, const FMotionEvent &InMotionEvent)
 Called when motion is detected (controller or device) e.g. 更多...
 
virtual FReply OnMouseButtonDoubleClick (const FGeometry &InMyGeometry, const FPointerEvent &InMouseEvent)
 Called by Slate when the mouse wheel is used inside the viewport 更多...
 
virtual FReply OnMouseButtonDown (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called by Slate when a mouse button is pressed inside the viewport 更多...
 
virtual FReply OnMouseButtonUp (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called by Slate when a mouse button is released inside the viewport 更多...
 
virtual FReply OnMouseMove (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called by Slate when a mouse button is released inside the viewport 更多...
 
virtual FReply OnMouseWheel (const FGeometry &MyGeometry, const FPointerEvent &MouseEvent)
 Called by Slate when the mouse wheel is used inside the viewport 更多...
 
virtual FNavigationReply OnNavigation (const FGeometry &MyGeometry, const FNavigationEvent &InNavigationEvent)
 Called when navigation is requested e.g. 更多...
 
virtual FPopupMethodReply OnQueryPopupMethod () const
 Called to figure out whether we can make new windows for popups within this viewport. 更多...
 
virtual TOptional< bool > OnQueryShowFocus (const EFocusCause InFocusCause) const
 Called to determine if we should render the focus brush. 更多...
 
virtual FReply OnRequestWindowClose ()
 Called when the top level window associated with the viewport has been requested to close. 更多...
 
virtual FReply OnTouchEnded (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is ended (finger lifted) 更多...
 
virtual FReply OnTouchFirstMove (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch has first moved after initial press 更多...
 
virtual FReply OnTouchForceChanged (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch force changes, but may or may not have moved 更多...
 
virtual FReply OnTouchGesture (const FGeometry &MyGeometry, const FPointerEvent &InGestureEvent)
 Called on a touchpad gesture event 更多...
 
virtual FReply OnTouchMoved (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is moved (finger moved) 更多...
 
virtual FReply OnTouchStarted (const FGeometry &MyGeometry, const FPointerEvent &InTouchEvent)
 Called when a touchpad touch is started (finger down) 更多...
 
virtual FReply OnViewportActivated (const FWindowActivateEvent &InActivateEvent)
 Called when the viewports top level window is being Activated
 
virtual void OnViewportClosed ()
 Called when the viewport has been requested to close.
 
virtual void OnViewportDeactivated (const FWindowActivateEvent &InActivateEvent)
 Called when the viewports top level window is being Deactivated
 
virtual bool RequiresVsync () const =0
 Returns true if the viewport should be vsynced.
 
virtual void Tick (const FGeometry &AllottedGeometry, double InCurrentTime, float DeltaTime)
 Performs any ticking necessary by this handle

 

额外继承的成员函数

- 静态 Public 成员函数 继承自 FViewport
static ENGINE_API bool IsGameRenderingEnabled ()
 Returns whether rendering is globally enabled or disabled. 更多...
 
static ENGINE_API void SetGameRenderingEnabled (bool bIsEnabled, int32 PresentAndStopMovieDelay=0)
 Globally enables/disables rendering 更多...
 
- Public 属性 继承自 FViewport
FString AppVersionString
 The current version of the running instance
 
- 静态 Public 属性 继承自 FViewport
static ENGINE_API FOnViewportResized ViewportResizedEvent
 Send when a viewport is resized
 
- Protected 成员函数 继承自 FViewport
void HighResScreenshot ()
 Take a high-resolution screenshot and save to disk.
 
virtual ENGINE_API void InitDynamicRHI () override
 Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多...
 
virtual ENGINE_API void InitRHI () override
 Initializes the RHI resources used by this resource. 更多...
 
virtual ENGINE_API void ReleaseDynamicRHI () override
 Releases the dynamic RHI resource and/or RHI render target resources used by this resource. 更多...
 
virtual ENGINE_API void ReleaseRHI () override
 Releases the RHI resources used by this resource. 更多...
 
virtual ENGINE_API void UpdateViewportRHI (bool bDestroyed, uint32 NewSizeX, uint32 NewSizeY, EWindowMode::Type NewWindowMode, EPixelFormat PreferredPixelFormat)
 Updates the viewport RHI with the current viewport state. 更多...
 
- Protected 成员函数 继承自 FRenderTarget
bool ReadFloat16Pixels (FFloat16Color *OutImageBytes, ECubeFace CubeFace=CubeFace_PosX)
 Reads the viewport's displayed pixels into a preallocated color buffer. 更多...
 
 FRenderResource ()
 Default constructor.
 
 FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 Constructor when we know what feature level this resource should support
 
virtual FString GetFriendlyName () const
 
virtual void InitDynamicRHI ()
 Initializes the dynamic RHI resource and/or RHI render target used by this resource. 更多...
 
virtual void InitResource ()
 Initializes the resource. 更多...
 
virtual void InitRHI ()
 Initializes the RHI resources used by this resource. 更多...
 
virtual void ReleaseDynamicRHI ()
 Releases the dynamic RHI resource and/or RHI render target resources used by this resource. 更多...
 
virtual void ReleaseResource ()
 Prepares the resource for deletion. 更多...
 
virtual void ReleaseRHI ()
 Releases the RHI resources used by this resource. 更多...
 
void UpdateRHI ()
 If the resource's RHI resources have been initialized, then release and reinitialize it. 更多...
 
virtual ~FRenderResource ()
 Destructor used to catch unreleased resources.
 
- 静态 Protected 成员函数 继承自 FRenderResource
static void InitPreRHIResources ()
 Initialize all resources initialized before the RHI was initialized
 
- Protected 属性 继承自 FViewport
uint32 bHasRequestedToggleFreeze: 1
 If a toggle freeze request has been made
 
uint32 bHitProxiesCached: 1
 True if the hit proxy buffer buffer has up to date hit proxies for this viewport.
 
uint32 bIsHDR: 1
 If true this viewport is being displayed on a HDR monitor
 
uint32 bIsPlayInEditorViewport: 1
 if true this viewport is for play in editor
 
uint32 bIsSlateViewport: 1
 If true this viewport is an FSlateSceneViewport
 
uint32 bRequiresHitProxyStorage: 1
 True if the viewport client requires hit proxy storage.
 
bool bTakeHighResScreenShot
 Triggers the taking of a high res screen shot for this viewport.
 
TArray< FColor > CachedHitProxyData
 Cached hit proxy data.
 
FHitProxyMap HitProxyMap
 The viewport's hit proxy map.
 
uint32 HitProxySize
 The size of the region to check hit proxies
 
uint32 InitialPositionX
 The initial position of the viewport.
 
uint32 InitialPositionY
 The initial position of the viewport.
 
uint32 SizeX
 The width of the viewport.
 
uint32 SizeY
 The height of the viewport.
 
FViewportClient * ViewportClient
 The viewport's client.
 
FViewportRHIRef ViewportRHI
 The RHI viewport.
 
FName ViewportType
 Used internally for testing runtime instance type before casting
 
EWindowMode::Type WindowMode
 What is the current window mode.
 
- 静态 Protected 属性 继承自 FViewport
static ENGINE_API bool bIsGameRenderingEnabled
 true if we should draw game viewports (has no effect on Editor viewports)
 
static int32 PresentAndStopMovieDelay
 Delay in frames to disable present (but still render scene) and stopping of a movie. 更多...
 

详细描述

A viewport for use with Slate SViewport widgets.

成员函数说明

◆ EndRenderFrame()

virtual void FSceneViewport::EndRenderFrame ( FRHICommandListImmediate &  RHICmdList,
bool  bPresent,
bool  bLockToVsync 
)
overridevirtual

Called when a frame is done rendering

参数
bPresentNot used in Slate viewports
bLockToVsyncNot used in Slate viewports

重载 FViewport .

◆ EnqueueEndRenderFrame()

virtual void FSceneViewport::EnqueueEndRenderFrame ( const bool  bLockToVsync,
const bool  bShouldPresent 
)
overridevirtual

Ends a rendering frame.

Called from the game thread.

参数
bPresentWhether the frame should be presented to the screen

重载 FViewport .

◆ GetDebugCanvas()

virtual FCanvas * FSceneViewport::GetDebugCanvas ( )
overridevirtual
返回
A canvas that can be used while this viewport is being drawn to render debug elements on top of everything else

重载 FViewport .

◆ GetDisplayGamma()

virtual float FSceneViewport::GetDisplayGamma ( ) const
overridevirtual
返回
display gamma expected for rendering to this render target

重载 FRenderTarget .

◆ GetMousePos()

virtual void FSceneViewport::GetMousePos ( FIntPoint &  MousePosition,
const bool  bLocalPosition = true 
)
overridevirtual

Sets MousePosition to the current mouse position

参数
MousePositionPopulated with the current mouse position
bLocalPositionIndicates whether the mouse position returned should be in local or absolute space

实现了 FViewport.

◆ GetMouseX()

virtual int32 FSceneViewport::GetMouseX ( ) const
overridevirtual
返回
The current X position of the mouse (in local space, relative to the viewports geometry)

实现了 FViewport.

◆ GetMouseY()

virtual int32 FSceneViewport::GetMouseY ( ) const
overridevirtual
返回
The current Y position of the mouse (in local space, relative to the viewports geometry)

实现了 FViewport.

◆ GetRenderTargetTextureSizeXY()

virtual FIntPoint FSceneViewport::GetRenderTargetTextureSizeXY ( ) const
inlinevirtual

Returns dimensions of RenderTarget texture.

Can be called on a game thread.

重载 FViewport .

◆ GetViewportFrame()

virtual FViewportFrame * FSceneViewport::GetViewportFrame ( )
inlineoverridevirtual

Retrieves the interface to the viewport's frame, if it has one.

返回
The viewport's frame interface.

实现了 FViewport.

◆ GetViewportWidget()

TWeakPtr< SViewport > FSceneViewport::GetViewportWidget ( ) const
inline
返回
The viewport widget being used

◆ HandleNavigation()

virtual bool FSceneViewport::HandleNavigation ( const uint32  InUserIndex,
TSharedPtr< SWidget >  InDestination 
)
overridevirtual

Give the viewport an opportunity to override the navigation behavior.

This is called after all the navigation event bubbling is complete and we know a destination.

参数
InDestinationThe destination widget
返回
whether we handled the navigation

重载 ISlateViewport .

◆ IsCursorVisible()

virtual bool FSceneViewport::IsCursorVisible ( ) const
inlineoverridevirtual

Returns true if the mouse cursor is currently visible

返回
True if the mouse cursor is currently visible, otherwise false.

重载 FViewport .

◆ KeyState()

virtual bool FSceneViewport::KeyState ( FKey  Key) const
overridevirtual

Returns the state of the provided key.

参数
KeyThe name of the key to check
返回
true if the key is pressed, false otherwise

实现了 FViewport.

◆ OnAnalogValueChanged()

virtual FReply FSceneViewport::OnAnalogValueChanged ( const FGeometry &  MyGeometry,
const FAnalogInputEvent &  InAnalogInputEvent 
)
overridevirtual

Called when an analog value changes on a button that supports analog

参数
MyGeometryThe Geometry of the widget receiving the event
InAnalogInputEventAnalog input event
返回
Returns whether the event was handled, along with other possible actions

重载 ISlateViewport .

◆ OnCursorQuery()

virtual FCursorReply FSceneViewport::OnCursorQuery ( const FGeometry &  MyGeometry,
const FPointerEvent &  CursorEvent 
)
overridevirtual

Called when Slate needs to know what the mouse cursor should be.

返回
FCursorReply::Unhandled() if the event is not handled; FCursorReply::Cursor() otherwise.

重载 ISlateViewport .

◆ OnDrawViewport()

virtual void FSceneViewport::OnDrawViewport ( const FGeometry &  AllottedGeometry,
const FSlateRect &  MyCullingRect,
FSlateWindowElementList &  OutDrawElements,
int32  LayerId,
const FWidgetStyle &  InWidgetStyle,
bool  bParentEnabled 
)
overridevirtual

Called by Slate when the viewport widget is drawn Implementers of this interface can use this method to perform custom per draw functionality.

This is only called if the widget is visible

参数
AllottedGeometryThe geometry of the viewport widget

重载 ISlateViewport .

◆ OnFocusLost()

virtual void FSceneViewport::OnFocusLost ( const FFocusEvent &  InFocusEvent)
overridevirtual

Called when the viewport loses keyboard focus.


参数
InFocusEventInformation about what caused the viewport to lose focus

重载 ISlateViewport .

◆ OnFocusReceived()

virtual FReply FSceneViewport::OnFocusReceived ( const FFocusEvent &  InFocusEvent)
overridevirtual

Called when the viewport gains keyboard focus.


参数
InFocusEventInformation about what caused the viewport to gain focus

重载 ISlateViewport .

◆ OnKeyChar()

virtual FReply FSceneViewport::OnKeyChar ( const FGeometry &  MyGeometry,
const FCharacterEvent &  InCharacterEvent 
)
overridevirtual

Called by Slate when a character key is pressed while the viewport has focus

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the character that was pressed
返回
Whether the event was handled along with possible requests for the system to take action.

重载 ISlateViewport .

◆ OnKeyDown()

virtual FReply FSceneViewport::OnKeyDown ( const FGeometry &  MyGeometry,
const FKeyEvent &  InKeyEvent 
)
overridevirtual

Called by Slate when a key is pressed inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the key event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 ISlateViewport .

◆ OnKeyUp()

virtual FReply FSceneViewport::OnKeyUp ( const FGeometry &  MyGeometry,
const FKeyEvent &  InKeyEvent 
)
overridevirtual

Called by Slate when a key is released inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the key event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 ISlateViewport .

◆ OnMapCursor()

virtual TOptional< TSharedRef< SWidget > > FSceneViewport::OnMapCursor ( const FCursorReply &  CursorReply)
overridevirtual

After OnCursorQuery has specified a cursor type the system asks each widget under the mouse to map that cursor to a widget.

This event is bubbled.

返回
TOptional<TSharedRef<SWidget>>() if you don't have a mapping otherwise return the Widget to show.

重载 ISlateViewport .

◆ OnMotionDetected()

virtual FReply FSceneViewport::OnMotionDetected ( const FGeometry &  MyGeometry,
const FMotionEvent &  InMotionEvent 
)
overridevirtual

Called when motion is detected (controller or device) e.g.

Someone tilts or shakes their controller.

参数
InMotionEventThe motion event generated

重载 ISlateViewport .

◆ OnMouseButtonDoubleClick()

virtual FReply FSceneViewport::OnMouseButtonDoubleClick ( const FGeometry &  InMyGeometry,
const FPointerEvent &  InMouseEvent 
)
overridevirtual

Called by Slate when the mouse wheel is used inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 ISlateViewport .

◆ OnMouseButtonDown()

virtual FReply FSceneViewport::OnMouseButtonDown ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
overridevirtual

Called by Slate when a mouse button is pressed inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 ISlateViewport .

◆ OnMouseButtonUp()

virtual FReply FSceneViewport::OnMouseButtonUp ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
overridevirtual

Called by Slate when a mouse button is released inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 ISlateViewport .

◆ OnMouseMove()

virtual FReply FSceneViewport::OnMouseMove ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
overridevirtual

Called by Slate when a mouse button is released inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 ISlateViewport .

◆ OnMouseWheel()

virtual FReply FSceneViewport::OnMouseWheel ( const FGeometry &  MyGeometry,
const FPointerEvent &  MouseEvent 
)
overridevirtual

Called by Slate when the mouse wheel is used inside the viewport

参数
MyGeometryInformation about the location and size of the viewport
MouseEventInformation about the mouse event
返回
Whether the event was handled along with possible requests for the system to take action.

重载 ISlateViewport .

◆ OnPlayWorldViewportSwapped()

void FSceneViewport::OnPlayWorldViewportSwapped ( const FSceneViewport &  OtherViewport)

Performs a resize when in swapping viewports while viewing the play world.

参数
OtherViewportThe previously active viewport

◆ OnQueryPopupMethod()

virtual FPopupMethodReply FSceneViewport::OnQueryPopupMethod ( ) const
overridevirtual

Called to figure out whether we can make new windows for popups within this viewport.

Making windows allows us to have popups that go outside the parent window, but cannot be used in fullscreen and do not have per-pixel alpha.

重载 ISlateViewport .

◆ OnQueryShowFocus()

virtual TOptional< bool > FSceneViewport::OnQueryShowFocus ( const EFocusCause  InFocusCause) const
overridevirtual

Called to determine if we should render the focus brush.

参数
InFocusCauseThe cause of focus

重载 ISlateViewport .

◆ OnRequestWindowClose()

virtual FReply FSceneViewport::OnRequestWindowClose ( )
overridevirtual

Called when the top level window associated with the viewport has been requested to close.

At this point, the viewport has not been closed and the operation may be canceled. This may not called from PIE, Editor Windows, on consoles, or before the game ends from other methods. This is only when the platform specific window is closed.

返回
FReply::Handled if the close event was consumed (and the window should remain open).

重载 ISlateViewport .

◆ OnTouchEnded()

virtual FReply FSceneViewport::OnTouchEnded ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
overridevirtual

Called when a touchpad touch is ended (finger lifted)

参数
ControllerEventThe controller event generated

重载 ISlateViewport .

◆ OnTouchFirstMove()

virtual FReply FSceneViewport::OnTouchFirstMove ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
overridevirtual

Called when a touchpad touch has first moved after initial press

参数
ControllerEventThe controller event generated

重载 ISlateViewport .

◆ OnTouchForceChanged()

virtual FReply FSceneViewport::OnTouchForceChanged ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
overridevirtual

Called when a touchpad touch force changes, but may or may not have moved

参数
ControllerEventThe controller event generated

重载 ISlateViewport .

◆ OnTouchGesture()

virtual FReply FSceneViewport::OnTouchGesture ( const FGeometry &  MyGeometry,
const FPointerEvent &  InGestureEvent 
)
overridevirtual

Called on a touchpad gesture event

参数
InGestureEventThe touch event generated

重载 ISlateViewport .

◆ OnTouchMoved()

virtual FReply FSceneViewport::OnTouchMoved ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
overridevirtual

Called when a touchpad touch is moved (finger moved)

参数
ControllerEventThe controller event generated

重载 ISlateViewport .

◆ OnTouchStarted()

virtual FReply FSceneViewport::OnTouchStarted ( const FGeometry &  MyGeometry,
const FPointerEvent &  InTouchEvent 
)
overridevirtual

Called when a touchpad touch is started (finger down)

参数
ControllerEventThe controller event generated

重载 ISlateViewport .

◆ PaintDebugCanvas()

void FSceneViewport::PaintDebugCanvas ( const FGeometry &  AllottedGeometry,
FSlateWindowElementList &  OutDrawElements,
int32  LayerId 
) const

Adds a draw element for the debug canvas.

Called externally by a widget that manages where the debug canvas draws

◆ ResizeFrame()

virtual void FSceneViewport::ResizeFrame ( uint32  NewSizeX,
uint32  NewSizeY,
EWindowMode::Type  NewWindowMode 
)
overridevirtual

Called to resize the actual window where this viewport resides

参数
NewSizeXThe new width of the viewport
NewSizeYThe new height of the viewport
NewWindowModeWhat window mode should the viewport be resized to

实现了 FViewportFrame.

◆ SetPlayInEditorGetsMouseControl()

void FSceneViewport::SetPlayInEditorGetsMouseControl ( const bool  bGetsMouseControl)
inline

Sets whether a PIE viewport takes mouse control on startup.

参数
bGetsMouseControlTakes control if true, or not if false.

◆ SetUserFocus()

virtual bool FSceneViewport::SetUserFocus ( bool  bFocus)
overridevirtual

Captures or uncaptures the joystick

参数
Capturetrue if we should capture, false if we should uncapture

实现了 FViewport.

◆ SwapStatCommands()

void FSceneViewport::SwapStatCommands ( const FSceneViewport &  OtherViewport)

Swaps the active stats with another viewports

参数
OtherViewportThe previously active viewport

◆ ViewportToVirtualDesktopPixel()

virtual FIntPoint FSceneViewport::ViewportToVirtualDesktopPixel ( FVector2D  ViewportCoordinate) const
overridevirtual

Transforms a coordinate in the local space of this viewport into a virtual desktop pixel.

参数
ViewportCoordianteNormalized coordniate in the rate [0..1]; (0,0) is upper left and (1,1) is lower right.
返回
the transformed coordinate. It is in virtual desktop pixels.

实现了 FViewport.

◆ VirtualDesktopPixelToViewport()

virtual FVector2D FSceneViewport::VirtualDesktopPixelToViewport ( FIntPoint  VirtualDesktopPointPx) const
overridevirtual

Transforms a virtual desktop pixel (the origin is in the primary screen's top left corner) to the local space of this viewport

参数
VirtualDesktopPointPxCoordinate on the virtual desktop in pixel units. Desktop is considered virtual because multiple monitors are supported.
返回
The transformed pixel. It is normalized to the range [0, 1]

实现了 FViewport.


该类的文档由以下文件生成: