Navigation
API > API/Runtime > API/Runtime/Engine
A viewport for use with SlateSViewport widgets.
| Name | FSceneViewport |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/Slate/SceneViewport.h |
| Include Path | #include "Slate/SceneViewport.h" |
Syntax
class FSceneViewport :
public FViewportFrame ,
public FViewport ,
public ISlateViewport
Inheritance Hierarchy
- FRenderTarget → FViewport → FSceneViewport
- FRenderResource → FViewport → FSceneViewport
- FViewportFrame → FSceneViewport
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSceneViewport
(
FViewportClient* InViewportClient, |
Slate/SceneViewport.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FSceneViewport() |
Slate/SceneViewport.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bCursorHiddenDueToCapture | bool | Whether or not the cursor is hidden when the viewport captures the mouse | Slate/SceneViewport.h | |
| bForceSeparateRenderTarget | bool | True if we should force use of a separate render target because the HMD needs it. | Slate/SceneViewport.h | |
| bForceViewportSize | bool | Do not resize the RenderTarget when resizing | Slate/SceneViewport.h | |
| bHDRViewport | bool | Whether or not the viewport is in HDR | Slate/SceneViewport.h | |
| bIsCursorVisible | bool | True if the cursor is currently visible | Slate/SceneViewport.h | |
| bIsResizing | bool | Whether or not we are currently resizing | Slate/SceneViewport.h | |
| bIsSoftwareCursorVisible | bool | Whether the software cursor should be drawn in the viewport | Slate/SceneViewport.h | |
| bPlayInEditorIsSimulate | bool | Whether the PIE viewport is currently in simulate in editor mode | Slate/SceneViewport.h | |
| bRequiresVsync | bool | True if this viewport requires vsync. | Slate/SceneViewport.h | |
| bShouldCaptureMouseOnActivate | bool | True if we had Capture when deactivated | Slate/SceneViewport.h | |
| BufferedRenderTargetsRHI | TArray< FTextureRHIRef > | Slate/SceneViewport.h | ||
| BufferedShaderResourceTexturesRHI | TArray< FTextureRHIRef > | Slate/SceneViewport.h | ||
| BufferedSlateHandles | TArray< class FSlateRenderTargetRHI * > | Reprojection on some HMD RHI's requires ViewportTargets to be buffered The render target used by Slate to draw the viewport. | Slate/SceneViewport.h | |
| bUseSeparateRenderTarget | bool | True if this viewport renders to a separate render target. | Slate/SceneViewport.h | |
| CachedCursorPos | FIntPoint | The last known mouse position in local space, -1, -1 if unknown | Slate/SceneViewport.h | |
| CachedGeometry | FGeometry | The last known geometry info | Slate/SceneViewport.h | |
| CurrentBufferedTargetIndex | int32 | Slate/SceneViewport.h | ||
| CurrentReplyState | FReply | An intermediate reply state that is reset whenever an input event is generated | Slate/SceneViewport.h | |
| DebugCanvas | TWeakPtr< SDebugCanvas > | Debug canvas widget we invalidate if our FCanvas has draw elements | Slate/SceneViewport.h | |
| DebugCanvasDrawer | TSharedPtr< class FDebugCanvasDrawer, ESPMode::ThreadSafe > | Draws the debug canvas in Slate | Slate/SceneViewport.h | |
| DisplayColorGamut | EDisplayColorGamut | Slate/SceneViewport.h | ||
| DisplayOutputFormat | EDisplayOutputFormat | Slate/SceneViewport.h | ||
| KeyStateMap | TMap< FKey, bool > | A mapping of key names to their pressed state | Slate/SceneViewport.h | |
| MouseDelta | FIntPoint | The current mouse delta | Slate/SceneViewport.h | |
| MouseDeltaUserIndex | int32 | User index supplied by mouse events accumulated into NumMouseSamplesX and NumMouseSamplesY | Slate/SceneViewport.h | |
| MousePosBeforeHiddenDueToCapture | FIntPoint | Position the cursor was at when we hid it due to capture, so we can put it back afterwards | Slate/SceneViewport.h | |
| NextBufferedTargetIndex | int32 | Slate/SceneViewport.h | ||
| NumMouseSamplesX | int32 | The number of input samples in X since input was was last processed | Slate/SceneViewport.h | |
| NumMouseSamplesY | int32 | The number of input samples in Y since input was was last processed | Slate/SceneViewport.h | |
| NumTouches | int32 | Tracks the number of touches currently active on the viewport | Slate/SceneViewport.h | |
| OnSceneViewportResizeDel | FOnSceneViewportResize | Delegate that is fired off in ResizeFrame after ResizeViewport | Slate/SceneViewport.h | |
| PreCaptureCursorPos | FIntPoint | Mouse position before the latest capture | Slate/SceneViewport.h | |
| RenderTargetTextureRenderThreadRHI | FTextureRHIRef | Slate/SceneViewport.h | ||
| RenderThreadSlateTexture | FSlateRenderTargetRHI * | Slate/SceneViewport.h | ||
| RTTSize | FIntPoint | Dimensions of RenderTarget texture. | Slate/SceneViewport.h | |
| SceneTargetFormat | EPixelFormat | Pixel format of all Buffered RenderTarget textures. | Slate/SceneViewport.h | |
| SoftwareCursorPosition | FVector2D | The current position of the software cursor | Slate/SceneViewport.h | |
| ViewportGammaOverride | TOptional< float > | The optional gamma value to use for this viewport | Slate/SceneViewport.h | |
| ViewportWidget | TWeakPtr< SViewport > | The Slate viewport widget where this viewport is drawn | Slate/SceneViewport.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSharedPtr< SWindow > FindWindow() |
Slate/SceneViewport.h | ||
const FGeometry & GetCachedGeometry() |
Get the cached viewport geometry. | Slate/SceneViewport.h | |
bool GetPlayInEditorIsSimulate() |
Slate/SceneViewport.h | ||
| Slate/SceneViewport.h | |||
bool HasFixedSize() |
Does the viewport has a fixed size | Slate/SceneViewport.h | |
void OnPlayWorldViewportSwapped
(
const FSceneViewport& OtherViewport |
Performs a resize when in swapping viewports while viewing the play world. | Slate/SceneViewport.h | |
void PaintDebugCanvas
(
const FGeometry& AllottedGeometry, |
Adds a draw element for the debug canvas. | Slate/SceneViewport.h | |
void SetDebugCanvas
(
TSharedPtr< class SDebugCanvas > InDebugCanvas |
Sets the debug canvas used to display FCanvas on top of this viewport | Slate/SceneViewport.h | |
void SetFixedViewportSize
(
uint32 NewSizeX, |
Slate/SceneViewport.h | ||
void SetGammaOverride
(
const float InGammaOverride |
Set an optional display gamma to use for this viewport | Slate/SceneViewport.h | |
void SetOnSceneViewportResizeDel
(
FOnSceneViewportResize InOnSceneViewportResize |
Sets the Viewport resize delegate. | Slate/SceneViewport.h | |
void SetPlayInEditorGetsMouseControl
(
const bool bGetsMouseControl |
Sets whether a PIE viewport takes mouse control on startup. | Slate/SceneViewport.h | |
void SetPlayInEditorIsSimulate
(
const bool bIsSimulate |
Slate/SceneViewport.h | ||
virtual void SetRenderTargetTextureRenderThread
(
FTextureRHIRef& RT |
Slate/SceneViewport.h | ||
void SetViewportSize
(
uint32 NewSizeX, |
Slate/SceneViewport.h | ||
void SwapStatCommands
(
const FSceneViewport& OtherViewport |
Swaps the active stats with another viewports | Slate/SceneViewport.h |
Overridden from FViewportFrame
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FViewport * GetViewport() |
FViewportFrame interface | Slate/SceneViewport.h | |
virtual void ResizeFrame
(
uint32 NewSizeX, |
Called to resize the actual window where this viewport resides | Slate/SceneViewport.h |
Overridden from FViewport
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginRenderFrame
(
FRHICommandListImmediate& RHICmdList |
Called when a frame starts to render | Slate/SceneViewport.h | |
virtual void CaptureMouse
(
bool bCapture |
Slate/SceneViewport.h | ||
virtual void DeferInvalidateHitProxy() |
Invalidates the viewport's cached hit proxies at the end of the frame. | Slate/SceneViewport.h | |
virtual void EndRenderFrame
(
FRHICommandListImmediate& RHICmdList, |
Called when a frame is done rendering | Slate/SceneViewport.h | |
virtual void EnqueueBeginRenderFrame
(
const bool bShouldPresent |
Called before BeginRenderFrame is enqueued | Slate/SceneViewport.h | |
virtual void EnqueueEndRenderFrame
(
const bool bLockToVsync, |
Ends a rendering frame. Called from the game thread. | Slate/SceneViewport.h | |
virtual FCanvas * GetDebugCanvas() |
Slate/SceneViewport.h | ||
virtual void GetMousePos
(
FIntPoint& MousePosition, |
Sets MousePosition to the current mouse position | Slate/SceneViewport.h | |
virtual int32 GetMouseX() |
Slate/SceneViewport.h | ||
virtual int32 GetMouseY() |
Slate/SceneViewport.h | ||
virtual FIntPoint GetRenderTargetTextureSizeXY() |
Returns dimensions of RenderTarget texture. Can be called on a game thread. | Slate/SceneViewport.h | |
virtual FViewportFrame * GetViewportFrame() |
Retrieves the interface to the viewport's frame, if it has one. | Slate/SceneViewport.h | |
virtual void * GetWindow() |
Slate/SceneViewport.h | ||
virtual bool HasFocus() |
Slate/SceneViewport.h | ||
virtual bool HasMouseCapture() |
New MouseCapture/MouseLock API. | Slate/SceneViewport.h | |
virtual void InvalidateDisplay() |
Called when the viewport should be invalidated and redrawn | Slate/SceneViewport.h | |
virtual bool IsCursorVisible() |
Returns true if the mouse cursor is currently visible | Slate/SceneViewport.h | |
virtual bool IsForegroundWindow() |
Slate/SceneViewport.h | ||
virtual bool IsSoftwareCursorVisible() |
Slate/SceneViewport.h | ||
virtual bool IsStereoRenderingAllowed() |
Should return true, if stereo rendering is allowed in this viewport | Slate/SceneViewport.h | |
virtual bool KeyState
(
FKey Key |
Returns the state of the provided key. | Slate/SceneViewport.h | |
virtual void LockMouseToViewport
(
bool bLock |
Slate/SceneViewport.h | ||
virtual void MoveWindow
(
int32 NewPosX, |
FViewport interface | Slate/SceneViewport.h | |
virtual void ProcessInput
(
float DeltaTime |
Additional input processing that happens every frame | Slate/SceneViewport.h | |
virtual void SetMouse
(
int32 X, |
Not implemented | Slate/SceneViewport.h | |
virtual void SetPreCaptureMousePosFromSlateCursor() |
Sets PreCapture coordinates from the current position of the slate cursor. | Slate/SceneViewport.h | |
virtual void SetRequiresVsync
(
bool bShouldVsync |
Indicate that the viewport should be block for vsync. | Slate/SceneViewport.h | |
virtual void SetSoftwareCursorPosition
(
FVector2D Position |
Slate/SceneViewport.h | ||
virtual bool SetUserFocus
(
bool bFocus |
Captures or uncaptures the joystick | Slate/SceneViewport.h | |
virtual void ShowCursor
(
bool bVisible |
Slate/SceneViewport.h | ||
virtual void ShowSoftwareCursor
(
bool bVisible |
Slate/SceneViewport.h | ||
virtual void UpdateViewportRHI
(
bool bDestroyed, |
Updates the viewport RHI with a new size and fullscreen flag | Slate/SceneViewport.h | |
virtual FIntPoint ViewportToVirtualDesktopPixel
(
FVector2D ViewportCoordinate |
Transforms a coordinate in the local space of this viewport into a virtual desktop pixel. | Slate/SceneViewport.h | |
virtual FVector2D VirtualDesktopPixelToViewport
(
FIntPoint VirtualDesktopPointPx |
Transforms a virtual desktop pixel (the origin is in the primary screen's top left corner) to the local space of this viewport | Slate/SceneViewport.h |
Overridden from FRenderTarget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EDisplayColorGamut GetDisplayColorGamut() |
Slate/SceneViewport.h | ||
virtual float GetDisplayGamma() |
Slate/SceneViewport.h | ||
virtual EDisplayOutputFormat GetDisplayOutputFormat() |
Slate/SceneViewport.h | ||
virtual const FTextureRHIRef & GetRenderTargetTexture() |
Gets the proper RenderTarget based on the current thread | Slate/SceneViewport.h | |
virtual bool GetSceneHDREnabled() |
Slate/SceneViewport.h |
Overridden from ISlateViewport
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EPixelFormat GetSceneTargetFormat() |
Returns format for the scene of this viewport. | Slate/SceneViewport.h | |
virtual FIntPoint GetSize() |
Slate/SceneViewport.h | ||
virtual FVector2D GetSoftwareCursorPosition() |
Slate/SceneViewport.h | ||
virtual ESlateViewportDynamicRange GetViewportDynamicRange() |
Slate/SceneViewport.h | ||
virtual FSlateShaderResource * GetViewportRenderTargetTexture() |
ISlateViewport interface | Slate/SceneViewport.h | |
| Slate/SceneViewport.h | |||
virtual bool HandleNavigation
(
const uint32 InUserIndex, |
Slate/SceneViewport.h | ||
virtual FReply OnAnalogValueChanged
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual FCursorReply OnCursorQuery
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual void OnDrawViewport
(
const FGeometry& AllottedGeometry, |
Slate/SceneViewport.h | ||
virtual void OnFinishedPointerInput() |
Slate/SceneViewport.h | ||
virtual void OnFocusLost
(
const FFocusEvent& InFocusEvent |
Slate/SceneViewport.h | ||
virtual FReply OnFocusReceived
(
const FFocusEvent& InFocusEvent |
Slate/SceneViewport.h | ||
virtual FReply OnKeyChar
(
const FGeometry& InGeometry, |
Slate/SceneViewport.h | ||
| Slate/SceneViewport.h | |||
| Slate/SceneViewport.h | |||
virtual TOptional< TSharedRef< SWidget > > OnMapCursor
(
const FCursorReply& CursorReply |
Slate/SceneViewport.h | ||
virtual FReply OnMotionDetected
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnMouseButtonDoubleClick
(
const FGeometry& InGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnMouseButtonDown
(
const FGeometry& InGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnMouseButtonUp
(
const FGeometry& InGeometry, |
Slate/SceneViewport.h | ||
virtual void OnMouseEnter
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual void OnMouseLeave
(
const FPointerEvent& MouseEvent |
Slate/SceneViewport.h | ||
virtual FReply OnMouseMove
(
const FGeometry& InGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnMouseWheel
(
const FGeometry& InGeometry, |
Slate/SceneViewport.h | ||
virtual FPopupMethodReply OnQueryPopupMethod() |
Slate/SceneViewport.h | ||
virtual TOptional< bool > OnQueryShowFocus
(
const EFocusCause InFocusCause |
Slate/SceneViewport.h | ||
virtual FReply OnRequestWindowClose() |
Slate/SceneViewport.h | ||
virtual FReply OnTouchEnded
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnTouchFirstMove
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnTouchForceChanged
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnTouchGesture
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnTouchMoved
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnTouchStarted
(
const FGeometry& MyGeometry, |
Slate/SceneViewport.h | ||
virtual FReply OnViewportActivated
(
const FWindowActivateEvent& InActivateEvent |
Slate/SceneViewport.h | ||
virtual void OnViewportClosed() |
Slate/SceneViewport.h | ||
virtual void OnViewportDeactivated
(
const FWindowActivateEvent& InActivateEvent |
Slate/SceneViewport.h | ||
virtual bool RequiresVsync() |
Returns true if the viewport should be vsynced. | Slate/SceneViewport.h | |
virtual void Tick
(
const FGeometry& AllottedGeometry, |
Ticks the viewport | Slate/SceneViewport.h |