Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ufdvw
ImmersiveAnalytics
Commits
76fb3c76
Commit
76fb3c76
authored
Mar 13, 2019
by
Jan Kremer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the file path of the data set relative to the project dir.
parent
74a5ea16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
.gitignore
.gitignore
+1
-0
Source/ImmersiveAnalytics/HDF5Library.cpp
Source/ImmersiveAnalytics/HDF5Library.cpp
+15
-5
No files found.
.gitignore
View file @
76fb3c76
...
...
@@ -10,3 +10,4 @@
/Plugins/PointCloudPlugin/Intermediate
/Saved/Config/Windows/EditorPerProjectUserSettings.ini
/Intermediate/ProjectFiles
/Resources/*.h5part
Source/ImmersiveAnalytics/HDF5Library.cpp
View file @
76fb3c76
// Fill out your copyright notice in the Description page of Project Settings.
#include "HDF5Library.h"
#include "Runtime/Core/Public/Misc/Paths.h"
#include "Runtime/Core/Public/GenericPlatform/GenericPlatformFile.h"
#include "H5Cpp.h"
using
namespace
H5
;
const
H5std_string
FILE_NAME
(
"D:
\\
HDF Test
\\
data.h5part"
);
bool
UHDF5Library
::
TestHDF5
(
TArray
<
float
>&
X
,
TArray
<
float
>&
Y
,
TArray
<
float
>&
Z
,
TArray
<
float
>&
U
,
TArray
<
float
>&
V
,
TArray
<
float
>&
W
)
{
/*
...
...
@@ -19,7 +17,19 @@ bool UHDF5Library::TestHDF5(TArray<float>& X, TArray<float>& Y, TArray<float>& Z
/*
* Open the file and group
*/
H5File
file
(
FILE_NAME
,
H5F_ACC_RDONLY
);
FString
relpath
=
FPaths
::
ProjectDir
();
TCHAR
*
dirname
=
TEXT
(
"Resources"
);
relpath
.
PathAppend
(
dirname
,
_tcslen
(
dirname
));
TCHAR
*
filename
=
TEXT
(
"data.h5part"
);
relpath
.
PathAppend
(
filename
,
_tcslen
(
filename
));
FString
abspath
=
IFileManager
::
Get
().
ConvertToAbsolutePathForExternalAppForRead
(
*
relpath
);
char
*
pathAsCharArray
=
TCHAR_TO_ANSI
(
*
abspath
);
H5File
file
(
pathAsCharArray
,
H5F_ACC_RDONLY
);
Group
group
=
file
.
openGroup
(
"Step#150"
);
/*
...
...
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