Commit 5bab7504 authored by Jan Kremer's avatar Jan Kremer

Working on 2D plots. Brushing, Linking, histogram, etc.

parent 40550007
......@@ -58,7 +58,7 @@ DoubleClickTime=0.200000
+ActionMappings=(ActionName="Brush",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=BackSpace)
+ActionMappings=(ActionName="ToggleAdditive",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Right_FaceButton1)
+ActionMappings=(ActionName="ToggleInverted",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Right_FaceButton2)
+ActionMappings=(ActionName="New2DPlot",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=N)
+ActionMappings=(ActionName="NewScatterPlot",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=N)
+ActionMappings=(ActionName="GrabLeft",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_LeftTrigger)
+ActionMappings=(ActionName="GrabRight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_RightTrigger)
+ActionMappings=(ActionName="ToggleInverted",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Zero)
......@@ -71,7 +71,13 @@ DoubleClickTime=0.200000
+ActionMappings=(ActionName="InterfaceClickRight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Right_FaceButton1)
+ActionMappings=(ActionName="Brush",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Left_Trigger)
+ActionMappings=(ActionName="Brush",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Right_Trigger)
+ActionMappings=(ActionName="New2DPlot",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_Special_Right)
+ActionMappings=(ActionName="InterfaceClickLeft",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Z)
+ActionMappings=(ActionName="InterfaceClickRight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=X)
+ActionMappings=(ActionName="ToggleMainMenu",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_Special_Right)
+ActionMappings=(ActionName="GrabLeft",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=NumPadEight)
+ActionMappings=(ActionName="GrabRight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=NumPadFive)
+ActionMappings=(ActionName="ToggleMainMenu",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Enter)
+ActionMappings=(ActionName="NewHistogram",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=M)
+AxisMappings=(AxisName="NonVR_MoveX",Scale=1.000000,Key=W)
+AxisMappings=(AxisName="NonVR_MoveY",Scale=-1.000000,Key=A)
+AxisMappings=(AxisName="NonVR_Turn",Scale=1.000000,Key=MouseX)
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -55,7 +55,7 @@ ActionMappings=(ActionName="SelectMode_Sphere",bShift=False,bCtrl=False,bAlt=Fal
ActionMappings=(ActionName="Brush",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=BackSpace)
ActionMappings=(ActionName="ToggleAdditive",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Right_FaceButton1)
ActionMappings=(ActionName="ToggleInverted",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Right_FaceButton2)
ActionMappings=(ActionName="New2DPlot",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=N)
ActionMappings=(ActionName="NewScatterPlot",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=N)
ActionMappings=(ActionName="GrabLeft",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_LeftTrigger)
ActionMappings=(ActionName="GrabRight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_RightTrigger)
ActionMappings=(ActionName="ToggleInverted",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Zero)
......@@ -68,7 +68,13 @@ ActionMappings=(ActionName="InterfaceClickLeft",bShift=False,bCtrl=False,bAlt=Fa
ActionMappings=(ActionName="InterfaceClickRight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Right_FaceButton1)
ActionMappings=(ActionName="Brush",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Left_Trigger)
ActionMappings=(ActionName="Brush",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MotionController_Right_Trigger)
ActionMappings=(ActionName="New2DPlot",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_Special_Right)
ActionMappings=(ActionName="InterfaceClickLeft",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Z)
ActionMappings=(ActionName="InterfaceClickRight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=X)
ActionMappings=(ActionName="ToggleMainMenu",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_Special_Right)
ActionMappings=(ActionName="GrabLeft",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=NumPadEight)
ActionMappings=(ActionName="GrabRight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=NumPadFive)
ActionMappings=(ActionName="ToggleMainMenu",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Enter)
ActionMappings=(ActionName="NewHistogram",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=M)
AxisMappings=(AxisName="NonVR_MoveX",Scale=1.000000,Key=W)
AxisMappings=(AxisName="NonVR_MoveY",Scale=-1.000000,Key=A)
AxisMappings=(AxisName="NonVR_Turn",Scale=1.000000,Key=MouseX)
......
This diff is collapsed.
......@@ -50,12 +50,4 @@ bHQBuffer=False
bHQDistortion=False
bUpdateOnRT=True
[WindowsApplication.Accessibility]
StickyKeysHotkey=False
ToggleKeysHotkey=False
FilterKeysHotkey=False
StickyKeysConfirmation=False
ToggleKeysConfirmation=False
FilterKeysConfirmation=False
// Fill out your copyright notice in the Description page of Project Settings.
#include "MyObject.h"
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "MyObject.generated.h"
UENUM(BlueprintType) //"BlueprintType" is essential to include
enum class EAxisType : uint8
{
X, Y, Z, U, V, W, LengthUVW, Count
};
/**
*
*/
UCLASS()
class IMMERSIVEANALYTICS_API UMyObject : public UObject
{
GENERATED_BODY()
};
......@@ -40,6 +40,9 @@ void APlot3D::InitPoints()
{
Num = X.Num();
}
IsBrushed = TArray<bool>();
IsBrushed.Init(false, Num);
for (int32 i = 0; i < Num; i++)
{
......@@ -138,6 +141,7 @@ void APlot3D::BrushPoint(int32 PointIndex, bool Add)
}
Points[PointIndex].SetEnabled(!Add);
IsBrushed[PointIndex] = Add;
/*
if (Add)
......@@ -229,7 +233,7 @@ void APlot3D::AddFilter_Planes(FVector NormalRight, FVector LocationRight, bool
BrushPoints(Indexes, Add, Rebuild);
}
void APlot3D::AddFilter_ValueRange(EAxisType XType, float XMin, float XMax, EAxisType YType, float YMin, float YMax, bool Add, bool Rebuild)
void APlot3D::AddFilter_ValueRange(EAxisType XType, float XMin, float XMax, EAxisType YType, float YMin, float YMax, bool Add, bool Rebuild, bool UseTwoValues)
{
TArray<float> * XArray = nullptr;
TArray<float> * YArray = nullptr;
......@@ -301,7 +305,7 @@ void APlot3D::AddFilter_ValueRange(EAxisType XType, float XMin, float XMax, EAxi
for (int i = 0; i < Points.Num(); ++i)
{
if ((*XArray)[i] >= XMin && (*XArray)[i] <= XMax && (*YArray)[i] >= YMin && (*YArray)[i] <= YMax)
if ((*XArray)[i] >= XMin && (*XArray)[i] <= XMax && ( !UseTwoValues || ((*YArray)[i] >= YMin && (*YArray)[i] <= YMax) ) )
{
Indexes.Emplace(i);
}
......
......@@ -7,14 +7,9 @@
#include "PointCloud.h"
#include "PointCloudActor.h"
#include "Runtime/Engine/Classes/Curves/CurveVector.h"
#include "MyObject.h"
#include "Plot3D.generated.h"
UENUM(BlueprintType) //"BlueprintType" is essential to include
enum class EAxisType : uint8
{
X,Y,Z,U,V,W,LengthUVW,Count
};
UCLASS()
class IMMERSIVEANALYTICS_API APlot3D : public AActor
{
......@@ -42,73 +37,76 @@ public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
TArray<FPointCloudPoint> Points;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadWrite)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<bool> IsBrushed;
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<float> X;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadWrite)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<float> Y;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadWrite)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<float> Z;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadWrite)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<FVector> Color;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadWrite)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<float> U;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadWrite)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<float> V;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadWrite)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<float> W;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadWrite)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadWrite)
TArray<float> Length;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MinLength;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MaxLength;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MinX;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MaxX;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MinY;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MaxY;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MinZ;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MaxZ;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MinU;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MaxU;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MinV;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MaxV;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MinW;
UPROPERTY(Category = Plot3D, VisibleAnywhere, BlueprintReadOnly)
UPROPERTY(Category = Plot3D, VisibleDefaultsOnly, BlueprintReadOnly)
float MaxW;
UPROPERTY(EditDefaultsOnly, Category = Plot3D)
......@@ -139,7 +137,7 @@ public:
void AddFilter_Planes(FVector Normal, FVector Location, bool UseTwoPlanes, FVector NormalLeft, FVector LocationLeft, bool Add, bool Rebuild, bool Invert);
UFUNCTION(BlueprintCallable)
void AddFilter_ValueRange(EAxisType XType, float XMin, float XMax, EAxisType YType, float YMin, float YMax, bool Add, bool Rebuild);
void AddFilter_ValueRange(EAxisType XType, float XMin, float XMax, EAxisType YType, float YMin, float YMax, bool Add, bool Rebuild, bool UseTwoValues);
UFUNCTION(BlueprintCallable)
void AddFilter_Box(FTransform Transform, FVector Extent, bool Add, bool Rebuild);
......
......@@ -4,7 +4,101 @@
#include "PawnBase.h"
#include "Plot3D.h"
#include "Runtime/Engine/Classes/Kismet/GameplayStatics.h"
#include "Runtime/Engine/Classes/Kismet/KismetMathLibrary.h"
void UPlotCanvas::SetXAxisType(EAxisType Type)
{
APawn* Pawn = UGameplayStatics::GetPlayerPawn(this, 0);
APawnBase* PawnBase = Cast<APawnBase>(Pawn);
switch (Type)
{
case EAxisType::X:
XArray = &PawnBase->Plot3D->X;
XMin = PawnBase->Plot3D->MinX;
XMax = PawnBase->Plot3D->MaxX;
break;
case EAxisType::Y:
XArray = &PawnBase->Plot3D->Y;
XMin = PawnBase->Plot3D->MinY;
XMax = PawnBase->Plot3D->MaxY;
break;
case EAxisType::Z:
XArray = &PawnBase->Plot3D->Z;
XMin = PawnBase->Plot3D->MinZ;
XMax = PawnBase->Plot3D->MaxZ;
break;
case EAxisType::U:
XArray = &PawnBase->Plot3D->U;
XMin = PawnBase->Plot3D->MinU;
XMax = PawnBase->Plot3D->MaxU;
break;
case EAxisType::V:
XArray = &PawnBase->Plot3D->V;
XMin = PawnBase->Plot3D->MinV;
XMax = PawnBase->Plot3D->MaxV;
break;
case EAxisType::W:
XArray = &PawnBase->Plot3D->W;
XMin = PawnBase->Plot3D->MinW;
XMax = PawnBase->Plot3D->MaxW;
break;
case EAxisType::LengthUVW:
XArray = &PawnBase->Plot3D->Length;
XMin = PawnBase->Plot3D->MinLength;
XMax = PawnBase->Plot3D->MaxLength;
break;
default:
break;
}
}
void UPlotCanvas::SetYAxisType(EAxisType Type)
{
APawn* Pawn = UGameplayStatics::GetPlayerPawn(this, 0);
APawnBase* PawnBase = Cast<APawnBase>(Pawn);
switch (Type)
{
case EAxisType::X:
YArray = &PawnBase->Plot3D->X;
YMin = PawnBase->Plot3D->MinX;
YMax = PawnBase->Plot3D->MaxX;
break;
case EAxisType::Y:
YArray = &PawnBase->Plot3D->Y;
YMin = PawnBase->Plot3D->MinY;
YMax = PawnBase->Plot3D->MaxY;
break;
case EAxisType::Z:
YArray = &PawnBase->Plot3D->Z;
YMin = PawnBase->Plot3D->MinZ;
YMax = PawnBase->Plot3D->MaxZ;
break;
case EAxisType::U:
YArray = &PawnBase->Plot3D->U;
YMin = PawnBase->Plot3D->MinU;
YMax = PawnBase->Plot3D->MaxU;
break;
case EAxisType::V:
YArray = &PawnBase->Plot3D->V;
YMin = PawnBase->Plot3D->MinV;
YMax = PawnBase->Plot3D->MaxV;
break;
case EAxisType::W:
YArray = &PawnBase->Plot3D->W;
YMin = PawnBase->Plot3D->MinW;
YMax = PawnBase->Plot3D->MaxW;
break;
case EAxisType::LengthUVW:
YArray = &PawnBase->Plot3D->Length;
YMin = PawnBase->Plot3D->MinLength;
YMax = PawnBase->Plot3D->MaxLength;
break;
default:
break;
}
}
void UPlotCanvas::InitializeCanvas(const int32 pixelsH, const int32 pixelsV)
{
//dynamic texture initialization
......@@ -58,22 +152,101 @@ void UPlotCanvas::InitializeDrawingTools(const int32 brushRadius, uint8 r, uint8
}
}
void UPlotCanvas::DrawFromData()
void UPlotCanvas::DrawScatterPlot()
{
ClearCanvas();
APawn* Pawn = UGameplayStatics::GetPlayerPawn(this, 0);
APawnBase* PawnBase = Cast<APawnBase>(Pawn);
for (int i = 0; i < PawnBase->Plot3D->Points.Num(); ++i)
{
InitializeDrawingTools(1, PawnBase->Plot3D->Points[i].Color.R, PawnBase->Plot3D->Points[i].Color.G, PawnBase->Plot3D->Points[i].Color.B);
DrawDot((PawnBase->Plot3D->Points[i].Location.X - PawnBase->Plot3D->MinX) / (PawnBase->Plot3D->MaxX - PawnBase->Plot3D->MinX) * canvasWidth, (PawnBase->Plot3D->U[i] - PawnBase->Plot3D->MinU) / (PawnBase->Plot3D->MaxU - PawnBase->Plot3D->MinU) * canvasHeight);
if (PawnBase->Plot3D->IsBrushed[i])
{
InitializeDrawingTools(1, 0, 0, 0);
}
else
{
InitializeDrawingTools(1, PawnBase->Plot3D->Points[i].Color.R, PawnBase->Plot3D->Points[i].Color.G, PawnBase->Plot3D->Points[i].Color.B);
}
DrawDot(((*XArray)[i] - XMin) / (XMax - XMin) * canvasWidth, ((*YArray)[i] - YMin) / (YMax - YMin) * canvasHeight);
}
UpdateCanvas();
}
void UPlotCanvas::DrawHistogramPlot(int32 bins)
{
ClearCanvas();
APawn* Pawn = UGameplayStatics::GetPlayerPawn(this, 0);
APawnBase* PawnBase = Cast<APawnBase>(Pawn);
float Diff = XMax - XMin;
float Thickness = canvasWidth / (float)bins;
TArray<int32> XCount = TArray<int32>();
TArray<int32> XBrushedCount = TArray<int32>();
XCount.Init(0, bins);
XBrushedCount.Init(0, bins);
for (int i = 0; i < PawnBase->Plot3D->Points.Num(); ++i)
{
float CurX = (*XArray)[i];
int32 MyIndex = (CurX - XMin) / Diff * (bins - 1);
++XCount[MyIndex];
if (PawnBase->Plot3D->IsBrushed[i])
{
++XBrushedCount[MyIndex];
}
}
int32 MaxIndex, MaxCount;
UKismetMathLibrary::MaxOfIntArray(XCount, MaxIndex, MaxCount);
for (int i = 0; i < bins; ++i)
{
int32 x0 = i * Thickness;
int32 x1 = x0 + Thickness;
int32 y0 = 0;
int32 y1 = XCount[i] / (float)MaxCount * canvasHeight;
FVector ColorVec;
if (XBrushedCount[i] == XCount[i])
{
ColorVec = FVector(0, 0, 0);
}
else
{
ColorVec = PawnBase->Plot3D->TransferFunction->GetVectorValue((i + 0.5) / (float)bins);
}
uint8 r = ColorVec.X * 255;
uint8 g = ColorVec.Y * 255;
uint8 b = ColorVec.Z * 255;
DrawRectangle(x0, y0, x1, y1, r, g, b, 255);
}
UpdateCanvas();
}
void UPlotCanvas::DrawRectangle(int32 x1, int32 y1, int32 x2, int32 y2, const uint8 r, const uint8 g, const uint8 b, const uint8 a)
{
for (int x = x1; x < x2; ++x)
{
for (int y = y1; y < y2; ++y)
{
DrawPixel(x, y, r, g, b, 255);
}
}
}
void UPlotCanvas::DrawParallelCoordinatesPlot()
{
ClearCanvas();
APawn* Pawn = UGameplayStatics::GetPlayerPawn(this, 0);
APawnBase* PawnBase = Cast<APawnBase>(Pawn);
......
......@@ -6,6 +6,7 @@
#include "UObject/NoExportTypes.h"
#include "Engine/Texture2D.h"
#include <memory>
#include "MyObject.h"
#include "PlotCanvas.generated.h"
/**
......@@ -21,6 +22,12 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Variables)
UTexture2D* dynamicCanvas;
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void SetXAxisType(EAxisType Type);
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void SetYAxisType(EAxisType Type);
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void InitializeCanvas(const int32 pixelsH, const int32 pixelsV);
UFUNCTION(BlueprintCallable, Category = DrawingTools)
......@@ -32,7 +39,10 @@ public:
void InitializeDrawingTools(const int32 brushRadius, uint8 r, uint8 g, uint8 b);
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void DrawFromData();
void DrawScatterPlot();
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void DrawHistogramPlot(int32 bins);
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void DrawParallelCoordinatesPlot();
......@@ -43,9 +53,16 @@ public:
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void DrawPixel(const int32 x, const int32 y, const uint8 r, const uint8 g, const uint8 b, const uint8 a);
UFUNCTION(BlueprintCallable)
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void DrawLine(int32 x1, int32 y1, int32 x2, int32 y2, const uint8 r, const uint8 g, const uint8 b, const uint8 a);
void BrushPoints(TArray<int32> BrushPoints, bool Add, bool Rebuild);
void BrushPoint(int32 PointIndex, bool Add);
UFUNCTION(BlueprintCallable, Category = DrawingTools)
void DrawRectangle(int32 x1, int32 y1, int32 x2, int32 y2, const uint8 r, const uint8 g, const uint8 b, const uint8 a);
private:
// canvas
......@@ -63,4 +80,11 @@ private:
std::unique_ptr<FUpdateTextureRegion2D> echoUpdateTextureRegion;
void setPixelColor(uint8*& pointer, uint8 red, uint8 green, uint8 blue, uint8 alpha);
TArray<float>* XArray;
float XMin;
float XMax;
TArray<float>* YArray;
float YMin;
float YMax;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment