You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Brings over the necessary engine changes for embedding UE4 mobile as a dylib/so in native mobile app - Various changes for facial animation, screen recording, others - ARKit and ARCore plugins were removed, as deemed "not ready" #rb many people #ROBOMERGE-OWNER: ryan.vance #ROBOMERGE-AUTHOR: josh.adams #ROBOMERGE-SOURCE: CL 5201138 via CL 5203024 via CL 5226277 #ROBOMERGE-BOT: DEVVR (Main -> Dev-VR) [CL 5244512 by josh adams in Dev-VR branch]
79 lines
1.9 KiB
C++
79 lines
1.9 KiB
C++
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
class SWindow;
|
|
class SWidget;
|
|
class FSlateDrawElement;
|
|
class FSlateClippingState;
|
|
class FSlateWindowElementList;
|
|
class FPaintArgs;
|
|
struct FGeometry;
|
|
class FSlateRect;
|
|
|
|
class FVisualEntry
|
|
{
|
|
public:
|
|
FVector2D TopLeft;
|
|
FVector2D TopRight;
|
|
FVector2D BottomLeft;
|
|
FVector2D BottomRight;
|
|
|
|
int32 LayerId;
|
|
int32 ClippingIndex;
|
|
int32 ElementIndex;
|
|
TWeakPtr<const SWidget> Widget;
|
|
|
|
FVisualEntry(int32 InElementIndex);
|
|
|
|
void Resolve(const FSlateWindowElementList& ElementList);
|
|
|
|
bool IsPointInside(const FVector2D& Point) const;
|
|
};
|
|
|
|
class FVisualTreeSnapshot : public TSharedFromThis<FVisualTreeSnapshot>
|
|
{
|
|
public:
|
|
TSharedPtr<const SWidget> Pick(FVector2D Point);
|
|
|
|
public:
|
|
TArray<FVisualEntry> Entries;
|
|
TArray<FSlateClippingState> ClippingStates;
|
|
TArray<TWeakPtr<const SWidget>> WidgetStack;
|
|
};
|
|
|
|
class FVisualTreeCapture
|
|
{
|
|
public:
|
|
FVisualTreeCapture();
|
|
~FVisualTreeCapture();
|
|
|
|
/** Enables visual tree capture */
|
|
void Enable();
|
|
|
|
/** Disables visual tree capture */
|
|
void Disable();
|
|
|
|
/** Resets the visual tree capture to a pre-capture state and destroys the cached visual tree captured last. */
|
|
void Reset();
|
|
|
|
TSharedPtr<FVisualTreeSnapshot> GetVisualTreeForWindow(SWindow* InWindow);
|
|
|
|
private:
|
|
void BeginWindow(const FSlateWindowElementList& ElementList);
|
|
void EndWindow(const FSlateWindowElementList& ElementList);
|
|
|
|
void BeginWidgetPaint(const SWidget* Widget, const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, const FSlateWindowElementList& ElementList, int32 LayerId);
|
|
|
|
/** */
|
|
void EndWidgetPaint(const SWidget* Widget, const FSlateWindowElementList& ElementList, int32 LayerId);
|
|
|
|
/** */
|
|
void ElementAdded(const FSlateWindowElementList& ElementList, int32 InElementIndex);
|
|
|
|
void OnWindowBeingDestroyed(const SWindow& WindowBeingDestoyed);
|
|
private:
|
|
TMap<const SWindow*, TSharedPtr<FVisualTreeSnapshot>> VisualTrees;
|
|
}; |