Commit 74a5ea16 authored by Jan Kremer's avatar Jan Kremer

Added transfer function. Fixed a bug in the cloud plugin that prevented particles to be disabled.

parent 460f047e
......@@ -9,3 +9,4 @@
/Plugins/PointCloudPlugin/Binaries
/Plugins/PointCloudPlugin/Intermediate
/Saved/Config/Windows/EditorPerProjectUserSettings.ini
/Intermediate/ProjectFiles
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -3,15 +3,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.25807.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{34F53C3D-7407-4FFA-9F95-D99F1A14F4B0}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{FC9156AB-A968-4F96-B505-AB7DB3BA26BD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{732009E9-1E72-4AF5-95BE-307829877526}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Games", "Games", "{0A5A5378-D693-4DBD-BBAF-E31667ED78FF}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UE4", "Intermediate\ProjectFiles\UE4.vcxproj", "{F573F3DC-5496-40FD-A082-2CB1A290878E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImmersiveAnalytics", "Intermediate\ProjectFiles\ImmersiveAnalytics.vcxproj", "{7AA4961B-F051-40D1-803A-5028C2686C79}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{B5AB45ED-19E2-43D2-9300-768C6FDBF111}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Visualizers", "Visualizers", "{B6E1E0DF-BE55-42A2-8C02-B59A7286E0B1}"
ProjectSection(SolutionItems) = preProject
..\..\UE_4.21\Engine\Extras\VisualStudioDebugging\UE4.natvis = ..\..\UE_4.21\Engine\Extras\VisualStudioDebugging\UE4.natvis
EndProjectSection
......@@ -99,7 +99,7 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{F573F3DC-5496-40FD-A082-2CB1A290878E} = {34F53C3D-7407-4FFA-9F95-D99F1A14F4B0}
{7AA4961B-F051-40D1-803A-5028C2686C79} = {732009E9-1E72-4AF5-95BE-307829877526}
{F573F3DC-5496-40FD-A082-2CB1A290878E} = {FC9156AB-A968-4F96-B505-AB7DB3BA26BD}
{7AA4961B-F051-40D1-803A-5028C2686C79} = {0A5A5378-D693-4DBD-BBAF-E31667ED78FF}
EndGlobalSection
EndGlobal
......@@ -9,7 +9,8 @@
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"Engine"
"Engine",
"CoreUObject"
]
}
],
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugGame|Win32'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugGame|x64'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugGame_Editor|x64'">
<LocalDebuggerCommandArguments>"$(SolutionDir)$(ProjectName).uproject" -skipcompile</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Development|Win32'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Development|x64'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Development_Editor|x64'">
<LocalDebuggerCommandArguments>"$(SolutionDir)$(ProjectName).uproject" -skipcompile</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Shipping|Win32'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Shipping|x64'">
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
......@@ -458,7 +458,7 @@ void UPointCloud::Rebuild(bool bForced)
for (int32 i = 0; i < Points.Num(); i++)
{
Points[i].Location = Points[i].OriginalLocation * CorrectedScale;
Points[i].SetEnabled(true);
//Points[i].SetEnabled(true);
}
Progress.EnterProgressFrame(1.f, LOCTEXT("RebuildDensity", "Reducing Density"));
......
......@@ -33,6 +33,7 @@ struct POINTCLOUDRUNTIME_API FPointCloudPoint
FVector OriginalLocation;
FVector Location;
FColor OriginalColor;
FColor Color;
/** Enabled | 7x Unused */
......@@ -45,6 +46,7 @@ struct POINTCLOUDRUNTIME_API FPointCloudPoint
FPointCloudPoint(FVector Location, FColor Color, bool bEnabled)
: OriginalLocation(Location)
, Location(Location)
, OriginalColor(FLinearColor(Color).ToFColor(true))
, Color(FLinearColor(Color).ToFColor(true))
, Flags(0x00000000)
{
......@@ -56,22 +58,25 @@ struct POINTCLOUDRUNTIME_API FPointCloudPoint
Location.X = X;
Location.Y = Y;
Location.Z = Z;
OriginalColor = FColor::White;
Color = FColor::White;
OriginalLocation = Location;
}
FPointCloudPoint(float &X, float &Y, float &Z, float &I)
: FPointCloudPoint(X, Y, Z)
{
OriginalColor.R = FMath::FloorToInt(FMath::Clamp(I, 0.0f, 1.0f) * 255.999f);
Color.R = FMath::FloorToInt(FMath::Clamp(I, 0.0f, 1.0f) * 255.999f);
}
FPointCloudPoint(float &X, float &Y, float &Z, float &R, float &G, float &B, float &A)
: FPointCloudPoint(X, Y, Z)
{
OriginalColor = FLinearColor(R, G, B, A).ToFColor(false);
Color = FLinearColor(R, G, B, A).ToFColor(false);
}
FORCEINLINE bool IsEnabled() const { return (Flags & 0x00000001) == 0x00000001; }
FORCEINLINE void SetEnabled(bool NewEnabled) { Flags = NewEnabled ? (Flags | 0x00000001) : (Flags & 0x11111110); }
FORCENOINLINE bool IsEnabled() const { return (Flags & 0x00000001) == 0x00000001; }
FORCENOINLINE void SetEnabled(bool NewEnabled) { Flags = NewEnabled ? (Flags | 0x00000001) : (Flags & 0x11111110); }
FORCEINLINE float GridDistance(FPointCloudPoint *point) const { return (point->Location - Location).GetAbsMax(); }
FORCEINLINE void AddColor(FLinearColor InColor) { Color = InColor.ToFColor(false); }
......
......@@ -31,6 +31,9 @@ public:
UFUNCTION(BlueprintPure, Category = "Point Cloud")
static FORCEINLINE FVector GetLocation(FPointCloudPoint InPoint) { return InPoint.Location; }
UFUNCTION(BlueprintPure, Category = "Point Cloud")
static FORCEINLINE FColor GetOriginalColor(FPointCloudPoint InPoint) { return InPoint.OriginalColor; }
UFUNCTION(BlueprintPure, Category = "Point Cloud")
static FORCEINLINE FColor GetColor(FPointCloudPoint InPoint) { return InPoint.Color; }
......@@ -41,6 +44,9 @@ public:
UFUNCTION(BlueprintCallable, Category = "Point Cloud")
static void SetOriginalLocation(UPARAM(ref) FPointCloudPoint &InPoint, FVector NewOriginalLocation) { InPoint.OriginalLocation = NewOriginalLocation; }
UFUNCTION(BlueprintCallable, Category = "Point Cloud")
static void SetOriginalColor(UPARAM(ref) FPointCloudPoint &InPoint, FColor NewColor) { InPoint.OriginalColor = NewColor; }
UFUNCTION(BlueprintCallable, Category = "Point Cloud")
static void SetColor(UPARAM(ref) FPointCloudPoint &InPoint, FColor NewColor) { InPoint.Color = NewColor; }
......
......@@ -59,6 +59,27 @@ bool UHDF5Library::TestHDF5(TArray<float>& X, TArray<float>& Y, TArray<float>& Z
dataset.read(data_out, PredType::NATIVE_FLOAT);
Z = TArray<float>(data_out, dims_out[0]);
/*
* Read U
*/
dataset = group.openDataSet("u");
dataset.read(data_out, PredType::NATIVE_FLOAT);
U = TArray<float>(data_out, dims_out[0]);
/*
* Read V
*/
dataset = group.openDataSet("v");
dataset.read(data_out, PredType::NATIVE_FLOAT);
V = TArray<float>(data_out, dims_out[0]);
/*
* Read W
*/
dataset = group.openDataSet("w");
dataset.read(data_out, PredType::NATIVE_FLOAT);
W = TArray<float>(data_out, dims_out[0]);
delete[] data_out;
// success
......
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