Commit ed809578 authored by Jan Kremer's avatar Jan Kremer

Cleanup

parent 458d783d
......@@ -11,3 +11,5 @@
/Saved/Config/Windows/EditorPerProjectUserSettings.ini
/Intermediate/ProjectFiles
/Resources/*.h5part
/Content/Scripts/__pycache__
/enc_temp_folder
This diff is collapsed.
......@@ -6,6 +6,7 @@
#include "HDF5Library.h"
#include "Plot3D.h"
#include "PawnBase.h"
#include "Plot2D.h"
#include "Runtime/Engine/Classes/Engine/World.h"
#include "Runtime/Engine/Classes/Kismet/KismetMathLibrary.h"
#include "Runtime/Core/Public/Async/ParallelFor.h"
......@@ -326,8 +327,12 @@ void UDataComponent::BrushPoints(TArray<int32> BrushPoints, bool Add, bool Rebui
BrushPoint(BrushPoints[i], Add);
}
Cast<APawnBase>(GetOwner())->Plot3D->BrushPoints(BrushPoints, Rebuild);
// TODO For all 2D Plots
APawnBase* BasePawn = Cast<APawnBase>(GetOwner());
BasePawn->Plot3D->BrushPoints(BrushPoints, Rebuild);
for (APlot2D* Plot2D : BasePawn->Plots2D)
{
Plot2D->Redraw();
}
}
void UDataComponent::BrushPoint(int32 PointIndex, bool Add)
......@@ -348,8 +353,12 @@ void UDataComponent::ResetPoints(bool Rebuild)
BrushPoint(i, false);
}
Cast<APawnBase>(GetOwner())->Plot3D->ResetPoints(Rebuild);
// TODO For all 2D Plots
APawnBase* BasePawn = Cast<APawnBase>(GetOwner());
BasePawn->Plot3D->ResetPoints(Rebuild);
for (APlot2D* Plot2D : BasePawn->Plots2D)
{
Plot2D->Redraw();
}
}
// does not use the standard BrushPoints, for performance reasons
......@@ -375,6 +384,10 @@ void UDataComponent::InvertPoints(bool Rebuild)
}
});*/
Cast<APawnBase>(GetOwner())->Plot3D->InvertPoints(Rebuild);
// TODO For all 2D Plots
APawnBase* BasePawn = Cast<APawnBase>(GetOwner());
BasePawn->Plot3D->InvertPoints(Rebuild);
for (APlot2D* Plot2D : BasePawn->Plots2D)
{
Plot2D->Redraw();
}
}
\ No newline at end of file
......@@ -20,6 +20,9 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadOnly)
APlot3D* Plot3D;
UPROPERTY(EditAnywhere, BlueprintReadOnly)
TArray<class APlot2D*> Plots2D;
UPROPERTY(Category = DataComponent, VisibleAnywhere, BlueprintReadOnly)
class UDataComponent* Data;
......
// Fill out your copyright notice in the Description page of Project Settings.
#include "Plot2D.h"
#include "PlotCanvas.h"
// Sets default values
APlot2D::APlot2D()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
void APlot2D::Redraw()
{
switch (PlotType)
{
case EPlotType::Histo:
PlotCanvas->DrawHistogramPlot(1024);
break;
case EPlotType::Scatter:
PlotCanvas->DrawScatterPlot();
break;
case EPlotType::ParallelCoordinates:
PlotCanvas->DrawParallelCoordinatesPlot();
break;
case EPlotType::None:
default:
break;
}
}
// Called when the game starts or when spawned
void APlot2D::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void APlot2D::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Plot2D.generated.h"
UENUM(BlueprintType)
enum class EPlotType : uint8
{
None, Scatter, Histo, ParallelCoordinates
};
UCLASS()
class IMMERSIVEANALYTICS_API APlot2D : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
APlot2D();
UFUNCTION(BlueprintCallable)
void Redraw();
UPROPERTY(BlueprintReadWrite)
EPlotType PlotType;
UPROPERTY(BlueprintReadWrite)
class UPlotCanvas* PlotCanvas;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};
......@@ -190,7 +190,7 @@ void APlot3D::InvertPoints(bool Rebuild)
{
for (int i = 0; i < Points.Num(); ++i)
{
BrushPoint(i, !Data->IsBrushed[i]);
BrushPoint(i, Data->IsBrushed[i]);
}
/*ParallelFor(Points.Num(), [this](int32 CurrIdx)
......
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