Language:
Discover
By Skill Level
By Category

FEditorViewportClient

Choose your OS:

Inheritance Hierarchy

Syntax

class FEditorViewportClient :
    public FCommonViewportClient ,
    public FViewElementDrawer ,
    public FGCObject

Remarks

Viewport client for editor viewports. Contains common functionality for camera movement, rendering debug information, etc.

Variables

Name Description

Public variable

float

 

AspectRatio

Protected variable

bool

 

bAllowCinematicControl

True if this window is allowed to be possessed by cinematic tools for previewing sequences in real-time

Protected variable

bool

 

bCameraLock

Camera Lock or not

Public variable

bool

 

bDisableInput

True if all input is rejected from this viewport

Protected variable

bool

 

bDraggingByHandle

True if the user is dragging by a widget handle.

Public variable

bool

 

bDrawAxes

If true, draw the axis indicators when the viewport is perspective.

Public variable

bool

 

bDrawVertices

If true, draw vertices for selected BSP brushes and static meshes if the large vertices show flag is set.

Protected variable

bool

 

bForceAudioRealtime

If true, force this viewport to use real time audio regardless of other settings

Public variable

bool

 

bForcingUnlitForNewMap

True if we've forced the SHOW_Lighting show flag off because there are no lights in the scene

Protected variable

bool

 

bHasAudioFocus

If true, this viewport gets to set audio parameters (e.g. set the listener)

Protected variable

bool

 

bHasMouseMovedSinceClick

If true, the canvas has been been moved using bMoveCanvas Mode

Protected variable

bool

 

bIsCameraMoving

Is the camera moving?

Protected variable

bool

 

bIsCameraMovingOnTick

Is the camera moving at the beginning of the tick?

Protected variable

bool

 

bIsRealtime

If the viewport is currently realtime

Protected variable

bool

 

bIsSimulateInEditorViewport

True if this level viewport can be used to view Simulate in Editor sessions

Protected variable

bool

 

bIsTracking

True when within a FMouseDeltaTracker::StartTracking /EndTracking block.

Public variable

bool

 

bLockFlightCamera

Flag to lock the viewport fly camera

Public variable

bool

 

bNeedsInvalidateHitProxy

If, following the next redraw, we should invalidate hit proxies on the viewport

Public variable

bool

 

bNeedsLinkedRedraw

Public variable

bool

 

bNeedsRedraw

The number of pending viewport redraws.

Protected variable

bool

 

bOwnsModeTools

Does this viewport client own the mode tools instance pointed at by ModeTools control the lifetime of it?

Public variable

bool

 

bSetListenerPosition

If true, the listener position will be set

Protected variable

bool

 

bShouldCheckHitProxy

True when we are in a state where we can check the hit proxy for hovering.

Protected variable

bool

 

bShowStats

True if we should draw stats over the viewport

Protected variable

bool

 

bShowWidget

Whether the widget should be drawn.

Protected variable

bool

 

bStoredRealtime

Cached realtime flag

Protected variable

bool

 

bStoredShowStats

Cached show statistics flag

Protected variable

bool

 

bUseControllingActorViewInfo

Public variable

bool

 

bUseNumpadCameraControl

If true, numpad keys will be used to move camera in perspective viewport

Protected variable

bool

 

bUsesDrawHelper

True if this viewport uses a draw helper

Public variable

bool

 

bUsingOrbitCamera

True if the orbit camera is currently being used

Public variable

bool

 

bWidgetAxisControlledByDrag

True if the widget's axis is being controlled by an active mouse drag.

Protected variable

uint32

 

CachedMouseX

Represents the last known mouse position.

Protected variable

uint32

 

CachedMouseY

Protected variable

FEditorCameraCo ...

 

CameraController

Camera controller object that's used for piloting the camera around

Protected variable

float

 

CameraSpeedScalar

Camera speed scalar

Protected variable

int32

 

CameraSpeedSetting

Camera speed setting

Protected variable

FCameraControll ...

 

CameraUserImpulseData

Current cached impulse state

Protected variable

TArray < FPostPr ...

 

ControllingActorExtraPostProcessBlends

Protected variable

TArray < float >

 

ControllingActorExtraPostProcessBlendWeights

Protected variable

FMinimalViewInf ...

 

ControllingActorViewInfo

Public variable

FName

 

CurrentBufferVisualizationMode

Protected variable

FVector

 

CurrentGestureDragDelta

Cumulative camera drag and rotation deltas from trackpad gesture in current Tick

Protected variable

FRotator

 

CurrentGestureRotDelta

Protected variable

FIntPoint

 

CurrentMousePos

-1, -1 if not set

Protected variable

FVector

 

DefaultOrbitLocation

Protected variable

FVector

 

DefaultOrbitLookAt

Protected variable

FRotator

 

DefaultOrbitRotation

Default set up for toggling back

Protected variable

FVector

 

DefaultOrbitZoom

Protected variable

FEditorCommonDr ...

 

DrawHelper

Draw helper for rendering common editor functionality like the grid

Protected variable

TWeakPtr < SEdit ...

 

EditorViewportWidget

The editor viewport widget this client is attached to

Protected variable

TArray < FString ...

 

EnabledStats

A list of all the stat names which are enabled for this viewport

Public variable

FEngineShowFlag ...

 

EngineShowFlags

A set of flags that determines visibility for various scene elements.

Public variable

FExposureSettin ...

 

ExposureSettings

Editor setting to allow designers to override the automatic expose

Protected variable

float

 

FlightCameraSpeedScale

Extra camera speed scale for flight camera

Public variable

float

 

FOVAngle

Viewport's stored horizontal field of view (saved in ini files).

Public variable

int32

 

FramesSinceLastDraw

The number of frames since this viewport was last drawn.

Protected variable

float

 

GestureMoveForwardBackwardImpulse

Public variable

FViewportStateG ...

 

ImmersiveDelegate

Delegate used to get whether or not this client is in an immersive viewport

Protected variable

TMap < int32 , FC...

 

JoystickStateMap

Cached state of joystick axes and buttons

Public variable

int8

 

LandscapeLODOverride

Override the LOD of landscape in this viewport.

Public variable

FEngineShowFlag ...

 

LastEngineShowFlags

Previous value for engine show flags, used for toggling.

Protected variable

uint32

 

LastMouseX

Updated on each mouse drag start

Protected variable

uint32

 

LastMouseY

Protected variable

FEditorModeTool ...

 

ModeTools

Editor mode tools provided to this instance.

Protected variable

FMouseDeltaTrac ...

 

MouseDeltaTracker

Protected variable

FVector2D

 

MovingPreviewLightSavedScreenPos

Used for the display of the current preview light after it has been adjusted.

Protected variable

float

 

MovingPreviewLightTimer

Protected variable

FPreviewScene &...

 

PreviewScene

The scene used for the viewport. Owned externally

Protected variable

uint32

 

RealTimeFrameCount

Counter to force real-time mode for a number of frames. Overrides bIsRealtime when non-zero.

Protected variable

IMatineeBase &#...

 

RecordingInterpEd

InterpEd, should only be set if used for matinee recording

Protected variable

FRequiredCursor ...

 

RequiredCursorVisibiltyAndAppearance

Cursor visibility and appearance information

Protected variable

FStatHitchesDat ...

 

StatHitchesData

Data needed to display per-frame stat tracking when STAT HITCHES is enabled

Protected variable

FStatUnitData

 

StatUnitData

Data needed to display per-frame stat tracking when STAT UNIT is enabled

Public variable

TArray < FSceneV ...

 

StereoViewStates

Viewport view state when stereo rendering is enabled

Protected variable

double

 

TimeForForceRedraw

When we have LOD locking, it's slow to force redraw of other viewports, so we delay invalidates to reduce the number of redraws

Public variable

float

 

ViewFOV

Viewport's current horizontal field of view (can be modified by locked cameras etc.)

Public variable

int32

 

ViewIndex

Index of this view in the editor's list of views

Public variable

FViewport *

 

Viewport

Public variable

ELevelViewportT ...

 

ViewportType

The viewport type.

Public variable

FSceneViewState ...

 

ViewState

The viewport's scene view state.

Public variable

FViewportCamera ...

 

ViewTransformOrthographic

Viewport camera transform data for orthographic viewports

Public variable

FViewportCamera ...

 

ViewTransformPerspective

Viewport camera transform data for perspective viewports

Public variable

FViewportStateG ...

 

VisibilityDelegate

Delegate used to get the visibility of this client from a slate viewport layout and tab configuration

Protected variable

FWidget *

 

Widget

Constructors

Name Description

Public function

FEditorViewportClient

(
    const FEditorViewportClient &
)

Non-copyable

Public function

FEditorViewportClient

(
    FEditorModeTools * InModeTools,
    FPreviewScene * InPreviewScene,
    const TWeakPtr < SEditorViewport >&...
)

Destructors

Name Description

Public function Virtual

~FEditorViewportClient()

Functions

Name Description

Protected function Virtual

void

 

AbortTracking()

Aborts mouse tracking (stop and cancel)

Public function

void

 

AdjustTransformWidgetSize

(
    const int32 SizeDelta
)

Adjusts the current transform widget size by the provided delta value

Public function

bool

 

AllowsCinematicControl()

Returns true if the viewport is allowed to be possessed for previewing cinematic sequences or keyframe animations

Protected function

void

 

ApplyDeltaToRotateWidget

(
    const FRotator & InRot
)

Updates the rotate widget with the passed in delta rotation.

Protected function

void

 

ApplyRequiredCursorVisibility

(
    bool bUpdateSoftwareCursorPostion
)

Apply the required cursor visibility states from the RequiredCursorVisibiltyAndAppearance struct

Public function Virtual

FSceneView &...

 

CalcSceneView

(
    FSceneViewFamily * ViewFamily,
    const EStereoscopicPass StereoPass
)

Configures the specified FSceneView object with the view and projection matrices for this viewport.

Protected function

bool

 

CalculateEditorConstrainedViewRect

(
    FSlateRect & OutSafeFrameRect,
    FViewport * InViewport,
    const float DPIScale
)

Helper function to calculate the safe frame rectangle on the current viewport

Public function Virtual

FMatrix

 

CalcViewRotationMatrix

(
    const FRotator & InViewRotation
)

Computes a matrix to use for viewport location and rotation

Public function Virtual

bool

 

CanCycleWidgetMode()

Whether or not the widget mode can be cycled

Public function Virtual

FDropQuery

 

CanDropObjectsAtCoordinates

(
    int32 MouseX,
    int32 MouseY,
    const FAssetData & AssetInfo
)

Checks the viewport to see if the given object can be dropped using the given mouse coordinates local to this viewport

Public function Virtual

bool

 

CanSetWidgetMode

(
    FWidget::EWidgetMode NewMode
)

Whether or not the new widget mode can be set in this viewport

Public function Virtual

bool

 

CanUseDragTool()

True if a drag tool can be used

Public function

void

 

ChangeBufferVisualizationMode

(
    FName InName
)

Changes the buffer visualization mode for this viewport

Public function Virtual

void

 

CheckHoveredHitProxy

(
    HHitProxy * HoveredHitProxy
)

Called when the mouse cursor is hovered over a hit proxy

Public function

void

 

ClearAudioFocus()

Public function

void

 

ConvertMovementToDragRot

(
    const FVector & InDelta,
    FVector & InDragDelta,
    FRotator & InRotDelta
)

Converts a generic movement delta into drag/rotation deltas based on the viewport and keys held down.

Public function

void

 

ConvertMovementToOrbitDragRot

(
    const FVector & InDelta,
    FVector & InDragDelta,
    FRotator & InRotDelta
)

Public function Virtual

void

 

DestroyDropPreviewActors()

If dragging an actor for placement, this function destroys the actor.

Public function

void

 

DrawActorScreenSpaceBoundingBox

(
    FCanvas * InCanvas,
    const FSceneView * InView,
    FViewport * InViewport,
    AActor * InActor,
    const FLinearColor & InColor,
    const bool bInDrawBracket,
    const FString & InLabelText
)

Draws a screen space bounding box around the specified actor

Protected function

void

 

DrawAxes

(
    FViewport * Viewport,
    FCanvas * Canvas,
    const FRotator * InRotation,
    EAxisList::Type InAxis
)

Draws viewport axes

Public function

void

 

DrawBoundingBox

(
    FBox & Box,
    FCanvas * InCanvas,
    const FSceneView * InView,
    const FViewport * InViewport,
    const FLinearColor & InColor,
    const bool bInDrawBracket,
    const FString & InLabelText
)

Public function Virtual

void

 

DrawCanvas

(
    FViewport & InViewport,
    FSceneView & View,
    FCanvas & Canvas
)

Called to draw onto the viewports 2D canvas

Public function Virtual

void

 

DrawPreviewLightVisualization

(
    const FSceneView * View,
    FPrimitiveDrawInterface * PDI
)

Draws a visualization of the preview light if it was recently moved.

Protected function

void

 

DrawScaleUnits

(
    FViewport * Viewport,
    FCanvas * Canvas,
    const FSceneView & InView
)

Draws viewport scale units

Public function Virtual

bool

 

DropObjectsAtCoordinates

(
    int32 MouseX,
    int32 MouseY,
    const TArray < UObject * >& Dro...,
    TArray < AActor * >& OutNewActo...,
    bool bOnlyDropOnTarget,
    bool bCreateDropPreview,
    bool bSelectActors,
    UActorFactory * FactoryToUse
)

Attempts to intelligently drop the given objects in the viewport, using the given mouse coordinates local to this viewport

Protected function

void

 

EnableCameraLock

(
    bool bEnable
)

Enables or disables camera lock

Public function

void

 

FocusViewportOnBox

(
    const FBox & BoundingBox,
    bool bInstant
)

Focuses the viewport to the center of the bounding box ensuring that the entire box is in view

Protected function Virtual

bool

 

GetActiveSafeFrame

(
    float& OutAspectRatio
)

Helper used by DrawSafeFrames to get the current safe frame aspect ratio.

Public function Virtual

FLinearColor

 

GetBackgroundColor()

The background color of the viewport

Public function

FEditorCamer ...

 

GetCameraController()

Public function

float

 

GetCameraSpeed()

Get the camera speed for this viewport

Public function

float

 

GetCameraSpeed

(
    int32 SpeedSetting
)

Get the camera speed for this viewport based on the specified speed setting

Public function Virtual

float

 

GetCameraSpeedScalar()

Get the camera speed scalar for this viewport

Public function Virtual

int32

 

GetCameraSpeedSetting()

Get the camera speed setting for this viewport

Public function

EAxisList::T ...

 

GetCurrentWidgetAxis()

Public function

FViewportCur ...

 

GetCursorWorldLocationFromMousePos()

Gets the world space cursor info from the current mouse position

Public function

TSharedPtr < ...

 

GetEditorViewportWidget()

Get the editor viewport widget

Public function

float

 

GetFarClipPlaneOverride()

Get the far clipping plane override for this viewport.

Public function

FVector

 

GetHitProxyObjectLocation

(
    int32 X,
    int32 Y
)

Returns the location of the object at the given viewport X,Y

Protected function

FCachedJoyst...

 

GetJoystickState

(
    const uint32 InControllerID
)

Gets a joystick state cache for the specified controller ID

Public function

const FVecto ...

 

GetLookAtLocation()

The current look at location

Public function

FEditorModeT ...

 

GetModeTools()

Editor mode tool manager being used for this viewport client

Public function

FMouseDeltaT ...

 

GetMouseDeltaTracker()

Mouse info is usually transformed to gizmo space before FEdMode handles it, this allows raw delta X and Y access

Public function

float

 

GetNearClipPlane()

Get the near clipping plane for this viewport.

Public function

float

 

GetOrthoUnitsPerPixel

(
    const FViewport * Viewport
)

The number of units per pixel displayed in this viewport

Public function

EViewModeInd ...

 

GetOrthoViewMode()

The view mode to use when this viewport is not of type LVT_Perspective

Public function

float

 

GetOrthoZoom()

The current ortho zoom amount

Public function

EViewModeInd ...

 

GetPerspViewMode()

The view mode to use when this viewport is of type LVT_Perspective

Public function

int32

 

GetPreviewScreenPercentage()

Preview screen percentage for UI.

Public function Virtual

FSceneInterf ...

 

GetScene()

The scene being rendered in this viewport

Public function

float

 

GetSceneDepthAtLocation

(
    int32 X,
    int32 Y
)

Returns the scene depth at the given viewport X,Y

Public function

const FVecto ...

 

GetViewLocation()

The current viewport camera location

Public function

EViewModeInd ...

 

GetViewMode()

The current view mode in this viewport, for the current viewport type

Public function

TMap < int32 ,...

 

GetViewModeParamNameMap()

Returns the map allowing to convert from the viewmode param to a name.

Public function

void

 

GetViewportDimensions

(
    FIntPoint & OutOrigin,
    FIntPoint & OutSize
)

Gets the dimensions of the viewport

Public function Virtual

ELevelViewpo ...

 

GetViewportType()

Returns the effective viewport type (taking into account any actor locking or camera possession)

Public function

const FRotat ...

 

GetViewRotation()

The current viewport camera rotation

Public function

FViewportCam ...

 

GetViewTransform()

Gets ViewportCameraTransform object for the current viewport type

Public function

const FViewp ...

 

GetViewTransform()

Public function Virtual

FMatrix

 

GetWidgetCoordSystem()

The current coordinate system for drawing and input of the transform widget.

Public function Virtual

ECoordSystem

 

GetWidgetCoordSystemSpace()

The coordinate system space (world or local) to display the widget in

Public function Virtual

FVector

 

GetWidgetLocation()

The world space location of the transform widget

Public function Virtual

FWidget::EWi ...

 

GetWidgetMode()

The current display mode for transform widget

Public function Virtual

bool

 

HandleIsShowFlagEnabled

(
    FEngineShowFlags::EShowFlag EngineS...
)

Delegate handler fired to determine the state of a show flag

Public function Virtual

void

 

HandleToggleShowFlag

(
    FEngineShowFlags::EShowFlag EngineS...
)

Delegate handler fired when a show flag is toggled

Public function Virtual

bool

 

HasDropPreviewActors()

Returns true if a placement dragging actor exists

Public function

void

 

InputAxisForOrbit

(
    FViewport * Viewport,
    const FVector & DragDelta,
    FVector & Drag,
    FRotator & Rot
)

Public function

bool

 

InputTakeScreenshot

(
    FViewport * Viewport,
    FKey Key,
    EInputEvent Event
)

Implements screenshot capture for editor viewports.

Public function Virtual

bool

 

InputWidgetDelta

(
    FViewport * InViewport,
    EAxisList::Type CurrentAxis,
    FVector & Drag,
    FRotator & Rot,
    FVector & Scale
)

Called to give the viewport client a chance to handle widgets being moved

Public function

void

 

Invalidate

(
    bool bInvalidateChildViews,
    bool bInvalidateHitProxies
)

Invalidates this viewport and optionally child views.

Protected function

void

 

InvalidateViewportWidget()

Invalidates the viewport widget (if valid) to register its active timer

Public function

bool

 

IsActiveViewportType

(
    ELevelViewportType InViewportType
)

If InViewportType is the active viewport type

Public function

bool

 

IsActiveViewportTypeInRotation()

If the viewport option in the array is the active viewport type

Public function

bool

 

IsAltPressed()

Utility functions to return the modifier key states.

Public function Virtual

bool

 

IsAspectRatioConstrained()

Is the aspect ratio currently constrained?

Public function

bool

 

IsBufferVisualizationModeSelected

(
    FName InName
)

Checks if a buffer visualization mode is selected

Public function

bool

 

IsCameraLocked()

Callback for checking the camera lock flag.

Public function

bool

 

IsCmdPressed()

Public function

bool

 

IsCtrlPressed()

Public function

bool

 

IsFlightCameraActive()

Returns whether or not the flight camera is active

true if the flight camera is active

Public function

bool

 

IsForcedRealtimeAudio()

Public function

bool

 

IsInImmersiveViewport()

True if the window is in an immersive viewport

Public function Virtual

bool

 

IsLevelEditorClient()

If true, this is a level editor viewport

Public function

bool

 

IsLowDPIPreview()

Whether previewing for low DPI.

Public function

bool

 

IsMatineeRecordingWindow()

Returns true if camera recoil is currently allowed

Public function

bool

 

IsMovingCamera()

Public function

bool

 

IsPerspective()

Returns true if this viewport is perspective.

Public function

bool

 

IsRealtime()

True if viewport is in realtime mode, false otherwise.

Public function

bool

 

IsSetShowBoundsChecked()

Callback for checking the bounds show flag.

Public function

bool

 

IsSetShowCollisionChecked()

Callback for checking the collision geometry show flag.

Public function

bool

 

IsSetShowGridChecked()

Callback for checking the grid show flag.

Public function

bool

 

IsShiftPressed()

Public function

bool

 

IsShowingAspectRatioBarDisplay()

Public function

bool

 

IsShowingSafeFrameBoxDisplay()

Public function

bool

 

IsSimulateInEditorViewport()

Public function

bool

 

IsTracking()

True if a mouse button is down and it's movement being tracked for operations inside the viewport

Public function

bool

 

IsUsingAbsoluteTranslation()

Determines whether this viewport is currently allowed to use Absolute Movement

Public function

bool

 

IsViewModeEnabled

(
    EViewModeIndex InViewModeIndex
)

True if InViewModeIndex is the current view mode index

Public function

bool

 

IsViewModeParam

(
    int32 InViewModeParam
)

True if InViewModeIndex is the current view mode param

Public function

bool

 

IsVisible()

True if the window is maximized or floating

Public function Virtual

TSharedPtr < ...

 

MakeDragTool

(
    EDragTool::Type DragToolType
)

Called to make a drag tool when the user starts dragging in the viewport

The new drag tool

Public function

void

 

MarkMouseMovedSinceClick()

Forces a cursor update and marks the window as a move has occurred

Public function

void

 

MoveViewportCamera

(
    const FVector & InDrag,
    const FRotator & InRot,
    bool bDollyCamera
)

Moves the viewport Scamera according to the specified drag and rotation.

Protected function Virtual

void

 

NudgeSelectedObjects

(
    const FInputEventState & InputState
)

Protected function

void

 

OnChangeCameraSpeed

(
    const FInputEventState & InputState
)

Called when a user changes the camera speed

Protected function

void

 

OnDollyPerspectiveCamera

(
    const FInputEventState & InputState
)

Called when a user dollys the perspective camera

Public function

void

 

OnEditorModeChanged

(
    FEdMode * EditorMode,
    bool bIsEntering
)

Called when an editor mode has been (de)activated

Protected function

void

 

OnOrthoZoom

(
    const FInputEventState & InputState,
    float Scale
)

Called when a user zooms the ortho viewport

Public function

void

 

OpenScreenshot

(
    FString SourceFilePath
)

Opens the screenshot in the uses default bitmap viewer (determined by OS)

Public function

void

 

OverrideFarClipPlane

(
    const float InFarPlane
)

Override the far clipping plane. Set to a negative value to disable the override.

Protected function

void

 

OverrideNearClipPlane

(
    float InNearPlane
)

Subclasses may override the near clipping plane. Set to a negative value to disable the override.

Public function Virtual

void

 

OverridePostProcessSettings

(
    FSceneView & View
)

Called to override any post process settings for the view

Protected function Virtual

void

 

PerspectiveCameraMoved()

Called when the perspective viewport camera moves

Public function Virtual

void

 

ProcessClick

(
    FSceneView & View,
    HHitProxy * HitProxy,
    FKey Key,
    EInputEvent Event,
    uint32 HitX,
    uint32 HitY
)

Called when the user clicks in the viewport

Protected function

void

 

ProcessClickInViewport

(
    const FInputEventState & InputState,
    FSceneView & View
)

Handles clicking in the viewport

Protected function

void

 

ProcessDoubleClickInViewport

(
    const FInputEventState & InputState,
    FSceneView & View
)

Handles double clicking in the viewport

Protected function Virtual

void

 

RedrawAllViewportsIntoThisScene()

Invalidates this and other linked viewports (anything viewing the same scene)

Public function

void

 

RemoveCameraRoll()

Public function

void

 

RenderDragTool

(
    const FSceneView * View,
    FCanvas * Canvas
)

Render the drag tool in the viewport

Public function

void

 

RequestRealTimeFrames

(
    uint32 NumRealTimeFrames
)

Get the number of real-time frames to draw (overrides bRealtime)

Public function

void

 

RestoreRealtime

(
    const bool bAllowDisable
)

Restores realtime setting to stored value.

Public function Virtual

void

 

RotateViewportType()

Rotate through viewport view options

Public function

void

 

SetAllowCinematicControl

(
    bool bInAllowCinematicControl
)

Sets whether or not this viewport is allowed to be possessed by cinematic/scrubbing tools

Public function

void

 

SetAudioFocus()

Public function Virtual

void

 

SetCameraLock()

Callback for toggling the camera lock flag.

Public function

void

 

SetCameraSetup

(
    const FVector & LocationForOrbiting,
    const FRotator & InOrbitRotation,
    const FVector & InOrbitZoom,
    const FVector & InOrbitLookAt,
    const FVector & InViewLocation,
    const FRotator & InViewRotation
)

This set ups camera for both orbit and non orbit control

Public function Virtual

void

 

SetCameraSpeedScalar

(
    float SpeedScalar
)

Set the camera speed scalar for this viewport

Public function Virtual

void

 

SetCameraSpeedSetting

(
    int32 SpeedSetting
)

Set the speed setting for the camera in this viewport

Public function Virtual

void

 

SetCurrentWidgetAxis

(
    EAxisList::Type InAxis
)

Sets the current axis being manipulated by the transform widget

Public function

void

 

SetForcedAudioRealtime

(
    bool bShouldForceAudioRealtime
)

True to force realtime audio to be true, false to stop forcing it

Public function

void

 

SetGameView

(
    bool bGameViewEnable
)

Public function

void

 

SetInitialViewTransform

(
    ELevelViewportType ViewportType,
    const FVector & ViewLocation,
    const FRotator & ViewRotation,
    float InOrthoZoom
)

Public function

void

 

SetLookAtLocation

(
    const FVector & LookAt,
    bool bRecalculateView
)

Sets the look at location of the viewports camera for orbit *

Public function

void

 

SetLowDPIPreview

(
    bool LowDPIPreview
)

Set whether previewing for low DPI.

Public function

void

 

SetMatineeRecordingWindow

(
    IMatineeBase * InInterpEd
)

Allows custom disabling of camera recoil

Public function

void

 

SetOrthoZoom

(
    float InOrthoZoom
)

Sets ortho zoom amount

Public function

void

 

SetPreviewScreenPercentage

(
    int32 PreviewScreenPercentage
)

Set preview screen percentage on UI behalf.

Public function

void

 

SetRealtime

(
    bool bInRealtime,
    bool bStoreCurrentValue
)

Sets whether or not the viewport updates in realtime.

Public function

void

 

SetRealtimePreview()

Callback for toggling the realtime preview flag.

Protected function

void

 

SetRequiredCursor

(
    const bool bHardwareCursorVisible,
    const bool bSoftwareCursorVisible
)

Sets the required hardware and software cursor.

Public function

void

 

SetRequiredCursorOverride

(
    bool WantOverride,
    EMouseCursor::Type RequiredCursor
)

Public function

void

 

SetShowAspectRatioBarDisplay

(
    bool bEnable
)

Aspect ratio bar display settings

Public function

void

 

SetShowBounds

(
    bool bShow
)

Sets the show bounds flag

Public function

void

 

SetShowCollision()

Callback for toggling the collision geometry show flag.

Public function

void

 

SetShowGrid()

Callback for toggling the grid show flag.

Public function

void

 

SetShowSafeFrameBoxDisplay

(
    bool bEnable
)

Public function Virtual

void

 

SetupViewForRendering

(
    FSceneViewFamily & ViewFamily,
    FSceneView & View
)

Called to do any additional set up of the view for rendering

Public function

void

 

SetViewLocation

(
    const FVector & NewLocation
)

Sets the location of the viewport's camera

Public function

void

 

SetViewLocationForOrbiting

(
    const FVector & LookAtPoint,
    float DistanceToCamera
)

Sets the camera view location such that the LookAtPoint point is at the specified location.

Public function Virtual

void

 

SetViewMode

(
    EViewModeIndex InViewModeIndex
)

Sets how the viewport is displayed (lit, wireframe, etc) for the current viewport type

Public function

void

 

SetViewModeParam

(
    int32 InViewModeParam
)

Set the viewmode param.

Public function

void

 

SetViewModes

(
    const EViewModeIndex InPerspViewMod...,
    const EViewModeIndex InOrthoViewMod...
)

Sets how the viewport is displayed (lit, wireframe, etc)

Public function Virtual

void

 

SetViewportType

(
    ELevelViewportType InViewportType
)

Set the viewport type of the client

Public function

void

 

SetViewRotation

(
    const FRotator & NewRotation
)

Sets the location of the viewport's camera

Public function Virtual

void

 

SetVREditView

(
    bool bGameViewEnable
)

Public function Virtual

void

 

SetWidgetCoordSystemSpace

(
    ECoordSystem NewCoordSystem
)

Sets the coordinate system space to use

Public function Virtual

void

 

SetWidgetMode

(
    FWidget::EWidgetMode NewMode
)

Sets the current widget mode

Public function Virtual

bool

 

ShouldLockPitch()

True to lock the pitch of the viewport camera

Public function Virtual

bool

 

ShouldOrbitCamera()

Whether or not to orbit the camera

Public function

bool

 

ShouldShowStats()

Returns true if status information should be displayed over the viewport

Protected function

bool

 

ShouldUseMoveCanvasMovement()

Determines if the new MoveCanvas movement should be used

Public function

void

 

ShowWidget

(
    const bool bShow
)

Show or hide the widget.

Protected function

void

 

StartTrackingDueToInput

(
    const FInputEventState & InputState,
    FSceneView & View
)

Starts tracking the mouse due to mouse input

Protected function

void

 

StopTracking()

Stops any mouse tracking

Public function

bool

 

SupportsLowDPIPreview()

True if DPI preview is supported.

Public function

bool

 

SupportsPreviewResolutionFraction()

True if PreviewResolutionFraction is supported.

Public function

void

 

TakeHighResScreenShot()

Public function

void

 

TakeScreenshot

(
    FViewport * Viewport,
    bool bInvalidateViewport
)

Takes the screenshot capture, this is called by keybinded events as well InputTakeScreenshot

Public function Virtual

void

 

Tick

(
    float DeltaSeconds
)

Ticks this viewport client

Public function

void

 

ToggleOrbitCamera

(
    bool bEnableOrbitCamera
)

Toggle between orbit camera and fly camera

Public function

bool

 

ToggleRealtime()

Toggles whether or not the viewport updates in realtime and returns the updated state.

Public function

void

 

ToggleShowBounds()

Callback for toggling the bounds show flag.

Public function Virtual

void

 

TrackingStarted

(
    const FInputEventState & InInputSta...,
    bool bIsDraggingWidget,
    bool bNudge
)

Called when mouse movement tracking begins

Public function Virtual

void

 

TrackingStopped()

Called when mouse movement tracking stops

Public function

FVector

 

TranslateDelta

(
    FKey InKey,
    float InDelta,
    bool InNudge
)

Determines which axis InKey and InDelta most refer to and returns a corresponding FVector .

Public function Static

FString

 

UnrealUnitsToSiUnits

(
    float UnrealUnits
)

Get a prettified string representation of the specified unreal units

Protected function

void

 

UpdateAndApplyCursorVisibility()

Updates the visibility of the hardware and software cursors according to the viewport's state.

Public function Virtual

bool

 

UpdateDropPreviewActors

(
    int32 MouseX,
    int32 MouseY,
    const TArray < UObject * >& Dro...,
    bool& out_bDroppedObjectsVisible,
    UActorFactory * FactoryToUse
)

If dragging an actor for placement, this function updates its position.

Public function Virtual

void

 

UpdateGestureDelta()

Called each frame to update the viewport based on delta trackpad gestures

Public function

void

 

UpdateHiddenCollisionDrawing()

When collision draw mode changes, this function allows hidden objects to be drawn, so hidden colliding objects can be seen

Public function Virtual

void

 

UpdateLinkedOrthoViewports

(
    bool bInvalidate
)

Public function Virtual

void

 

UpdateMouseDelta()

Called each frame to update the viewport based on delta mouse movements

Protected function

void

 

UpdateRequiredCursorVisibility()

Setup the cursor visibility state we require and store in RequiredCursorVisibiltyAndAppearance struct

Overridden from FCommonViewportClient

Name Description

Protected function Virtual

float

 

UpdateViewportClientWindowDPIScale()

FCommonViewportClient interface

Overridden from FViewportClient

Name Description

Public function Virtual

void

 

CapturedMouseMove

(
    FViewport * InViewport,
    int32 InMouseX,
    int32 InMouseY
)

Called when the mouse is moved while a window input capture is in effect

Public function Virtual

void

 

Draw

(
    FViewport * Viewport,
    FCanvas * Canvas
)

Public function Virtual

EMouseCursor ...

 

GetCursor

(
    FViewport * Viewport,
    int32 X,
    int32 Y
)

Retrieves the cursor that should be displayed by the OS

the cursor that the OS should display

Public function Virtual

const TArray ...

 

GetEnabledStats()

Get a ptr to the enabled stats list

Public function Virtual

FStatHitches ...

 

GetStatHitchesData()

Get a ptr to the stat unit data for this viewport

Public function Virtual

FStatUnitDat ...

 

GetStatUnitData()

Get a ptr to the stat unit data for this viewport

Public function Virtual

UWorld *

 

GetWorld()

Use the viewports Scene to get a world.

Public function Virtual

bool

 

InputAxis

(
    FViewport * Viewport,
    int32 ControllerId,
    FKey Key,
    float Delta,
    float DeltaTime,
    int32 NumSamples,
    bool bGamepad
)

Check an axis movement received by the viewport.

Public function Virtual

bool

 

InputGesture

(
    FViewport * Viewport,
    EGestureEvent GestureType,
    const FVector2D & GestureDelta,
    bool bIsDirectionInvertedFromDevice
)

Check a gesture event received by the viewport.

Public function Virtual

bool

 

InputKey

(
    FViewport * Viewport,
    int32 ControllerId,
    FKey Key,
    EInputEvent Event,
    float AmountDepressed,
    bool bGamepad
)

Check a key event received by the viewport.

Public function Virtual

bool

 

IsInGameView()

Returns true if this viewport is excluding non-game elements from its display

Public function Virtual

bool

 

IsOrtho()

Returns true if this viewport is orthogonal.

Public function Virtual

bool

 

IsStatEnabled

(
    const FString & InName
)

Check whether a specific stat is enabled for this viewport

Public function Virtual

void

 

LostFocus

(
    FViewport * Viewport
)

Public function Virtual

void

 

MouseEnter

(
    FViewport * Viewport,
    int32 x,
    int32 y
)

Public function Virtual

void

 

MouseLeave

(
    FViewport * Viewport
)

Public function Virtual

void

 

MouseMove

(
    FViewport * Viewport,
    int32 x,
    int32 y
)

Public function Virtual

void

 

ProcessScreenShots

(
    FViewport * Viewport
)

FViewportClient interface

Public function Virtual

void

 

ReceivedFocus

(
    FViewport * Viewport
)

Public function Virtual

void

 

RedrawRequested

(
    FViewport * Viewport
)

Public function Virtual

void

 

RequestInvalidateHitProxy

(
    FViewport * Viewport
)

Public function Virtual

void

 

SetEnabledStats

(
    const TArray < FString >& InEnabled...
)

Sets all the stats that should be enabled for the viewport

Public function Virtual

void

 

SetShowStats

(
    bool bWantStats
)

Sets whether or not stats info is displayed over the viewport

Overridden from FViewElementDrawer

Name Description

Public function Virtual

void

 

Draw

(
    const FSceneView * View,
    FPrimitiveDrawInterface * PDI
)

FViewElementDrawer interface

Overridden from FGCObject

Name Description

Public function Virtual

void

 

AddReferencedObjects

(
    FReferenceCollector & Collector
)

FGCObject interface

Operators

Name Description

Public function

FEditorViewp ...

 

operator=

(
    const FEditorViewportClient &
)

Classes

Name

Description

Protected struct

FRequiredCursorState

Used to store the required cursor visibility states and override cursor appearance

Enums

Name

Description

Private enum

ESceneDPIMode

DPI mode for scene rendering.

Constants

Name

Description

DefaultOrthoViewMode

Default view mode for orthographic viewports

DefaultPerspectiveViewMode

Default view mode for perspective viewports

MaxCameraSpeeds

The Maximum Mouse/Camera Speeds Setting supported

SafePadding

Constant for how much the camera safe zone rectangle is inset when being displayed in the editor

References

Module

UnrealEd

Header

Editor/UnrealEd/Public/EditorViewportClient.h