Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
ImmersiveAnalytics
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ufdvw
ImmersiveAnalytics
Commits
72d7c5da
Commit
72d7c5da
authored
Apr 23, 2019
by
Jan Kremer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option for file wide bounds.
parent
54f628e0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
17 deletions
+94
-17
Content/BP_MainMenu.uasset
Content/BP_MainMenu.uasset
+0
-0
Content/W_MainMenu.uasset
Content/W_MainMenu.uasset
+0
-0
Content/W_MainMenuTest.uasset
Content/W_MainMenuTest.uasset
+0
-0
Source/ImmersiveAnalytics/DataComponent.cpp
Source/ImmersiveAnalytics/DataComponent.cpp
+90
-17
Source/ImmersiveAnalytics/DataComponent.h
Source/ImmersiveAnalytics/DataComponent.h
+4
-0
No files found.
Content/BP_MainMenu.uasset
View file @
72d7c5da
No preview for this file type
Content/W_MainMenu.uasset
View file @
72d7c5da
No preview for this file type
Content/W_MainMenuTest.uasset
View file @
72d7c5da
No preview for this file type
Source/ImmersiveAnalytics/DataComponent.cpp
View file @
72d7c5da
...
...
@@ -20,6 +20,7 @@ UDataComponent::UDataComponent()
D3_BrushColor
=
FColor
(
0
,
0
,
0
,
0
);
D3_UseTransparency
=
true
;
D3_SpriteSizeFactor
=
50
;
UseFileBounds
=
false
;
}
...
...
@@ -88,6 +89,11 @@ void UDataComponent::LoadFile(FString FileName)
GroupNames
.
Emplace
(
String
);
}
if
(
UseFileBounds
)
{
SetFileBounds
();
}
IsFirstTime
=
true
;
LoadStep
(
GroupNames
[
0
],
true
);
}
...
...
@@ -112,27 +118,30 @@ void UDataComponent::LoadStep(FString GroupName, bool ResetBrush)
}
Length
.
Empty
();
for
(
int32
i
=
0
;
i
<
Num
;
i
++
)
for
(
int32
i
=
0
;
i
<
X
.
Num
()
;
i
++
)
{
Length
.
Emplace
(
FVector
(
U
[
i
],
V
[
i
],
W
[
i
]).
Size
());
}
int32
MaxIndex
,
MinIndex
;
UKismetMathLibrary
::
MaxOfFloatArray
(
Length
,
MaxIndex
,
MaxLength
);
UKismetMathLibrary
::
MinOfFloatArray
(
Length
,
MinIndex
,
MinLength
);
UKismetMathLibrary
::
MaxOfFloatArray
(
X
,
MaxIndex
,
MaxX
);
UKismetMathLibrary
::
MinOfFloatArray
(
X
,
MinIndex
,
MinX
);
UKismetMathLibrary
::
MaxOfFloatArray
(
Y
,
MaxIndex
,
MaxY
);
UKismetMathLibrary
::
MinOfFloatArray
(
Y
,
MinIndex
,
MinY
);
UKismetMathLibrary
::
MaxOfFloatArray
(
Z
,
MaxIndex
,
MaxZ
);
UKismetMathLibrary
::
MinOfFloatArray
(
Z
,
MinIndex
,
MinZ
);
UKismetMathLibrary
::
MaxOfFloatArray
(
U
,
MaxIndex
,
MaxU
);
UKismetMathLibrary
::
MinOfFloatArray
(
U
,
MinIndex
,
MinU
);
UKismetMathLibrary
::
MaxOfFloatArray
(
V
,
MaxIndex
,
MaxV
);
UKismetMathLibrary
::
MinOfFloatArray
(
V
,
MinIndex
,
MinV
);
UKismetMathLibrary
::
MaxOfFloatArray
(
W
,
MaxIndex
,
MaxW
);
UKismetMathLibrary
::
MinOfFloatArray
(
W
,
MinIndex
,
MinW
);
if
(
!
UseFileBounds
)
{
int32
MaxIndex
,
MinIndex
;
UKismetMathLibrary
::
MaxOfFloatArray
(
Length
,
MaxIndex
,
MaxLength
);
UKismetMathLibrary
::
MinOfFloatArray
(
Length
,
MinIndex
,
MinLength
);
UKismetMathLibrary
::
MaxOfFloatArray
(
X
,
MaxIndex
,
MaxX
);
UKismetMathLibrary
::
MinOfFloatArray
(
X
,
MinIndex
,
MinX
);
UKismetMathLibrary
::
MaxOfFloatArray
(
Y
,
MaxIndex
,
MaxY
);
UKismetMathLibrary
::
MinOfFloatArray
(
Y
,
MinIndex
,
MinY
);
UKismetMathLibrary
::
MaxOfFloatArray
(
Z
,
MaxIndex
,
MaxZ
);
UKismetMathLibrary
::
MinOfFloatArray
(
Z
,
MinIndex
,
MinZ
);
UKismetMathLibrary
::
MaxOfFloatArray
(
U
,
MaxIndex
,
MaxU
);
UKismetMathLibrary
::
MinOfFloatArray
(
U
,
MinIndex
,
MinU
);
UKismetMathLibrary
::
MaxOfFloatArray
(
V
,
MaxIndex
,
MaxV
);
UKismetMathLibrary
::
MinOfFloatArray
(
V
,
MinIndex
,
MinV
);
UKismetMathLibrary
::
MaxOfFloatArray
(
W
,
MaxIndex
,
MaxW
);
UKismetMathLibrary
::
MinOfFloatArray
(
W
,
MinIndex
,
MinW
);
}
PColor
.
Empty
();
for
(
int32
i
=
0
;
i
<
Num
;
i
++
)
{
...
...
@@ -161,6 +170,70 @@ FColor UDataComponent::CalculateColorOfPoint(int32 Index, float Min, float Max)
return
Color
;
}
void
UDataComponent
::
SetFileBounds
()
{
TArray
<
float
>
XMinTemp
=
TArray
<
float
>
();
TArray
<
float
>
XMaxTemp
=
TArray
<
float
>
();
TArray
<
float
>
YMinTemp
=
TArray
<
float
>
();
TArray
<
float
>
YMaxTemp
=
TArray
<
float
>
();
TArray
<
float
>
ZMinTemp
=
TArray
<
float
>
();
TArray
<
float
>
ZMaxTemp
=
TArray
<
float
>
();
TArray
<
float
>
UMinTemp
=
TArray
<
float
>
();
TArray
<
float
>
UMaxTemp
=
TArray
<
float
>
();
TArray
<
float
>
VMinTemp
=
TArray
<
float
>
();
TArray
<
float
>
VMaxTemp
=
TArray
<
float
>
();
TArray
<
float
>
WMinTemp
=
TArray
<
float
>
();
TArray
<
float
>
WMaxTemp
=
TArray
<
float
>
();
TArray
<
float
>
LengthTemp
=
TArray
<
float
>
();
for
(
FString
Group
:
GroupNames
)
{
TArray
<
float
>
XTemp
=
TArray
<
float
>
();
TArray
<
float
>
YTemp
=
TArray
<
float
>
();
TArray
<
float
>
ZTemp
=
TArray
<
float
>
();
TArray
<
float
>
UTemp
=
TArray
<
float
>
();
TArray
<
float
>
VTemp
=
TArray
<
float
>
();
TArray
<
float
>
WTemp
=
TArray
<
float
>
();
UHDF5Library
::
LoadGroup
(
LoadedFile
,
Group
,
XTemp
,
YTemp
,
ZTemp
,
UTemp
,
VTemp
,
WTemp
);
for
(
int32
i
=
0
;
i
<
XTemp
.
Num
();
i
++
)
{
LengthTemp
.
Emplace
(
FVector
(
UTemp
[
i
],
VTemp
[
i
],
WTemp
[
i
]).
Size
());
}
float
TempMaxX
,
TempMaxY
,
TempMaxZ
,
TempMaxU
,
TempMaxV
,
TempMaxW
,
TempMinX
,
TempMinY
,
TempMinZ
,
TempMinU
,
TempMinV
,
TempMinW
;
int32
MaxIndex
,
MinIndex
;
UKismetMathLibrary
::
MaxOfFloatArray
(
XTemp
,
MaxIndex
,
TempMaxX
);
XMaxTemp
.
Emplace
(
TempMaxX
);
UKismetMathLibrary
::
MinOfFloatArray
(
XTemp
,
MinIndex
,
TempMinX
);
XMinTemp
.
Emplace
(
TempMinX
);
UKismetMathLibrary
::
MaxOfFloatArray
(
YTemp
,
MaxIndex
,
TempMaxY
);
YMaxTemp
.
Emplace
(
TempMaxY
);
UKismetMathLibrary
::
MinOfFloatArray
(
YTemp
,
MinIndex
,
TempMinY
);
YMinTemp
.
Emplace
(
TempMinY
);
UKismetMathLibrary
::
MaxOfFloatArray
(
ZTemp
,
MaxIndex
,
TempMaxZ
);
ZMaxTemp
.
Emplace
(
TempMaxZ
);
UKismetMathLibrary
::
MinOfFloatArray
(
ZTemp
,
MinIndex
,
TempMinZ
);
ZMinTemp
.
Emplace
(
TempMinZ
);
UKismetMathLibrary
::
MaxOfFloatArray
(
UTemp
,
MaxIndex
,
TempMaxU
);
UMaxTemp
.
Emplace
(
TempMaxU
);
UKismetMathLibrary
::
MinOfFloatArray
(
UTemp
,
MinIndex
,
TempMinU
);
UMinTemp
.
Emplace
(
TempMinU
);
UKismetMathLibrary
::
MaxOfFloatArray
(
VTemp
,
MaxIndex
,
TempMaxV
);
VMaxTemp
.
Emplace
(
TempMaxV
);
UKismetMathLibrary
::
MinOfFloatArray
(
VTemp
,
MinIndex
,
TempMinV
);
VMinTemp
.
Emplace
(
TempMinV
);
UKismetMathLibrary
::
MaxOfFloatArray
(
WTemp
,
MaxIndex
,
TempMaxW
);
WMaxTemp
.
Emplace
(
TempMaxW
);
UKismetMathLibrary
::
MinOfFloatArray
(
WTemp
,
MinIndex
,
TempMinW
);
WMinTemp
.
Emplace
(
TempMinW
);
}
int32
MaxIndex
,
MinIndex
;
UKismetMathLibrary
::
MaxOfFloatArray
(
LengthTemp
,
MaxIndex
,
MaxLength
);
UKismetMathLibrary
::
MinOfFloatArray
(
LengthTemp
,
MinIndex
,
MinLength
);
UKismetMathLibrary
::
MaxOfFloatArray
(
XMaxTemp
,
MaxIndex
,
MaxX
);
UKismetMathLibrary
::
MinOfFloatArray
(
XMinTemp
,
MinIndex
,
MinX
);
UKismetMathLibrary
::
MaxOfFloatArray
(
YMaxTemp
,
MaxIndex
,
MaxY
);
UKismetMathLibrary
::
MinOfFloatArray
(
YMinTemp
,
MinIndex
,
MinY
);
UKismetMathLibrary
::
MaxOfFloatArray
(
ZMaxTemp
,
MaxIndex
,
MaxZ
);
UKismetMathLibrary
::
MinOfFloatArray
(
ZMinTemp
,
MinIndex
,
MinZ
);
UKismetMathLibrary
::
MaxOfFloatArray
(
UMaxTemp
,
MaxIndex
,
MaxU
);
UKismetMathLibrary
::
MinOfFloatArray
(
UMinTemp
,
MinIndex
,
MinU
);
UKismetMathLibrary
::
MaxOfFloatArray
(
VMaxTemp
,
MaxIndex
,
MaxV
);
UKismetMathLibrary
::
MinOfFloatArray
(
VMinTemp
,
MinIndex
,
MinV
);
UKismetMathLibrary
::
MaxOfFloatArray
(
WMaxTemp
,
MaxIndex
,
MaxW
);
UKismetMathLibrary
::
MinOfFloatArray
(
WMinTemp
,
MinIndex
,
MinW
);
}
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
>
();
...
...
Source/ImmersiveAnalytics/DataComponent.h
View file @
72d7c5da
...
...
@@ -46,6 +46,9 @@ public:
UPROPERTY
(
Category
=
Plot3D
,
EditAnywhere
,
BlueprintReadWrite
)
int32
OverrideMaxPointCount
;
UPROPERTY
(
Category
=
Plot3D
,
EditAnywhere
,
BlueprintReadWrite
)
bool
UseFileBounds
;
UFUNCTION
(
BlueprintCallable
)
void
AddFilter_Planes
(
FVector
Normal
,
FVector
Location
,
bool
UseTwoPlanes
,
FVector
NormalLeft
,
FVector
LocationLeft
,
bool
Add
,
bool
Rebuild
,
bool
Invert
);
...
...
@@ -103,6 +106,7 @@ private:
H5File
LoadedFile
;
FColor
CalculateColorOfPoint
(
int32
Index
,
float
Min
,
float
Max
);
bool
IsFirstTime
;
void
SetFileBounds
();
public:
UPROPERTY
(
Category
=
Plot3D
,
BlueprintReadWrite
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment