Agrarsense
Public Member Functions | Public Attributes | List of all members
SUnrealWindowViewport Class Reference

#include <UnrealWindowViewport.h>

Inheritance diagram for SUnrealWindowViewport:
Inheritance graph
[legend]
Collaboration diagram for SUnrealWindowViewport:
Collaboration graph
[legend]

Public Member Functions

 SLATE_BEGIN_ARGS (SUnrealWindowViewport)
 
void Construct (const FArguments &InArgs)
 
virtual void Tick (const FGeometry &AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override
 

Public Attributes

TSharedPtr< FUnrealWindowViewportClientViewportClient
 
TSharedPtr< FSceneViewport > SceneViewport
 
TSharedPtr< SViewport > Viewport
 
bool DrawToScreen = true
 

Detailed Description

Implements Capture viewport

Definition at line 22 of file UnrealWindowViewport.h.

Member Function Documentation

◆ Construct()

void SUnrealWindowViewport::Construct ( const FArguments &  InArgs)

Definition at line 8 of file UnrealWindowViewport.cpp.

9{
10 // Create viewport widget
11 Viewport = SNew(SViewport)
12 .IsEnabled(true)
13 .EnableGammaCorrection(false)
14 .ShowEffectWhenDisabled(false)
15 .EnableBlending(true);
16 //.ToolTip(SNew(SToolTip).Text(FText::FromString("SUnrealWindowViewport")));
17
18 // Create viewport client
19 ViewportClient = MakeShareable(new FUnrealWindowViewportClient());
20
21 // Create scene viewport
22 SceneViewport = MakeShareable(new FSceneViewport(ViewportClient.Get(), Viewport));
23
24 // Assign SceneViewport to Viewport widget. Needed for rendering
25 Viewport->SetViewportInterface(SceneViewport.ToSharedRef());
26
27 // Assign Viewport widget for our custom Viewport
28 this->ChildSlot
29 [
30 Viewport.ToSharedRef()
31 ];
32}
TSharedPtr< FSceneViewport > SceneViewport
TSharedPtr< FUnrealWindowViewportClient > ViewportClient
TSharedPtr< SViewport > Viewport

References SceneViewport, Viewport, and ViewportClient.

◆ SLATE_BEGIN_ARGS()

SUnrealWindowViewport::SLATE_BEGIN_ARGS ( SUnrealWindowViewport  )
inline

Definition at line 27 of file UnrealWindowViewport.h.

27{ }

◆ Tick()

void SUnrealWindowViewport::Tick ( const FGeometry &  AllottedGeometry,
const double  InCurrentTime,
const float  InDeltaTime 
)
overridevirtual

Definition at line 34 of file UnrealWindowViewport.cpp.

35{
36 if (DrawToScreen)
37 {
38 SceneViewport->Draw();
39 }
40}

References DrawToScreen, and SceneViewport.

Member Data Documentation

◆ DrawToScreen

bool SUnrealWindowViewport::DrawToScreen = true

Definition at line 38 of file UnrealWindowViewport.h.

Referenced by Tick().

◆ SceneViewport

TSharedPtr<FSceneViewport> SUnrealWindowViewport::SceneViewport

Definition at line 35 of file UnrealWindowViewport.h.

Referenced by Construct(), and Tick().

◆ Viewport

TSharedPtr<SViewport> SUnrealWindowViewport::Viewport

Definition at line 36 of file UnrealWindowViewport.h.

Referenced by Construct().

◆ ViewportClient

TSharedPtr<FUnrealWindowViewportClient> SUnrealWindowViewport::ViewportClient

Definition at line 34 of file UnrealWindowViewport.h.

Referenced by Construct().


The documentation for this class was generated from the following files: