2019-12-26 15:32:37 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2014-11-19 07:43:07 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
2016-11-23 15:48:37 -05:00
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "VisualLogger/VisualLoggerTypes.h"
|
|
|
|
|
|
|
|
|
|
struct FVisualLoggerDBRow;
|
|
|
|
|
|
2014-11-19 07:43:07 -05:00
|
|
|
struct FVisualLoggerCanvasRenderer
|
|
|
|
|
{
|
2015-08-27 05:21:28 -04:00
|
|
|
struct FGraphLineData
|
|
|
|
|
{
|
|
|
|
|
FName DataName;
|
|
|
|
|
FVector2D LeftExtreme, RightExtreme;
|
|
|
|
|
TArray<FVector2D> Samples;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct FGraphData
|
|
|
|
|
{
|
2016-01-08 19:10:43 -05:00
|
|
|
FGraphData() : Min(FVector2D(FLT_MAX, FLT_MAX)), Max(FVector2D(-FLT_MAX, -FLT_MAX)) {}
|
2015-08-27 05:21:28 -04:00
|
|
|
|
|
|
|
|
FVector2D Min, Max;
|
|
|
|
|
TMap<FName, FGraphLineData> GraphLines;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
TMap<FName, FGraphData> CollectedGraphs;
|
|
|
|
|
|
2015-05-20 10:04:17 -04:00
|
|
|
public:
|
2015-08-27 05:21:28 -04:00
|
|
|
FVisualLoggerCanvasRenderer();
|
|
|
|
|
~FVisualLoggerCanvasRenderer();
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
void DrawOnCanvas(class UCanvas* Canvas, class APlayerController*);
|
2015-08-27 05:21:28 -04:00
|
|
|
void OnItemSelectionChanged(const FVisualLoggerDBRow& ChangedRow, int32 SelectedItemIndex);
|
|
|
|
|
void ObjectSelectionChanged(const TArray<FName>& RowNames);
|
2015-05-20 10:04:17 -04:00
|
|
|
void DirtyCachedData() { bDirtyData = true; }
|
2015-08-27 05:21:28 -04:00
|
|
|
void ResetData();
|
2014-11-19 07:43:07 -05:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void DrawHistogramGraphs(class UCanvas* Canvas, class APlayerController* );
|
|
|
|
|
|
|
|
|
|
private:
|
2015-05-20 10:04:17 -04:00
|
|
|
bool bDirtyData;
|
2014-11-19 12:00:49 -05:00
|
|
|
FVisualLogEntry SelectedEntry;
|
2014-11-19 07:43:07 -05:00
|
|
|
TMap<FString, TArray<FString> > UsedGraphCategories;
|
|
|
|
|
};
|