Commit 0a16a815 authored by Jan Kremer's avatar Jan Kremer

Added brushing for parallel coordinate plots

parent 22aa33be
No preview for this file type
......@@ -242,6 +242,16 @@ void UDataComponent::UpdateDataScaleFactor()
DataScaleFactor = 2 / Range;
}
void UDataComponent::RebuildAll()
{
APawnBase* BasePawn = Cast<APawnBase>(GetOwner());
BasePawn->Plot3D->RebuildCloud();
for (APlot2D* Plot2D : BasePawn->Plots2D)
{
Plot2D->Redraw();
}
}
void UDataComponent::AddFilter_Planes(FVector NormalRight, FVector LocationRight, bool UseTwoPlanes, FVector NormalLeft, FVector LocationLeft, bool Add, bool Rebuild, bool Invert)
{
TArray<int32> Indexes = TArray<int32>();
......@@ -419,9 +429,12 @@ void UDataComponent::BrushPoints(TArray<int32> BrushPoints, bool Add, bool Rebui
APawnBase* BasePawn = Cast<APawnBase>(GetOwner());
BasePawn->Plot3D->BrushPoints(BrushPoints, Rebuild);
for (APlot2D* Plot2D : BasePawn->Plots2D)
if (Rebuild)
{
Plot2D->Redraw();
for (APlot2D* Plot2D : BasePawn->Plots2D)
{
Plot2D->Redraw();
}
}
}
......@@ -445,9 +458,12 @@ void UDataComponent::ResetPoints(bool Rebuild)
APawnBase* BasePawn = Cast<APawnBase>(GetOwner());
BasePawn->Plot3D->ResetPoints(Rebuild);
for (APlot2D* Plot2D : BasePawn->Plots2D)
if (Rebuild)
{
Plot2D->Redraw();
for (APlot2D* Plot2D : BasePawn->Plots2D)
{
Plot2D->Redraw();
}
}
}
......@@ -476,8 +492,11 @@ void UDataComponent::InvertPoints(bool Rebuild)
APawnBase* BasePawn = Cast<APawnBase>(GetOwner());
BasePawn->Plot3D->InvertPoints(Rebuild);
for (APlot2D* Plot2D : BasePawn->Plots2D)
if (Rebuild)
{
Plot2D->Redraw();
for (APlot2D* Plot2D : BasePawn->Plots2D)
{
Plot2D->Redraw();
}
}
}
\ No newline at end of file
......@@ -73,6 +73,9 @@ public:
UFUNCTION(BlueprintCallable)
void InvertPoints(bool Rebuild);
UFUNCTION(BlueprintCallable)
void RebuildAll();
// 3d settings
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Default)
......
......@@ -26,8 +26,6 @@ protected:
virtual void BeginPlay() override;
private:
void RebuildCloud();
void UpdatePoints(bool KeepBrushedIndexes);
FVector Center;
......@@ -52,6 +50,7 @@ public:
void BrushPoint(int32 PointIndex, bool Add);
void ResetPoints(bool Rebuild);
void InvertPoints(bool Rebuild);
void RebuildCloud();
// aux
......
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