Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
localize_for_ppk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangdawei
localize_for_ppk
Commits
4f9eeeb3
Commit
4f9eeeb3
authored
May 23, 2023
by
wangdawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
dfd6f7ef
Pipeline
#1540
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
19 deletions
+25
-19
maparea.cpp
libs/voxel_map/libs/area/maparea.cpp
+25
-19
No files found.
libs/voxel_map/libs/area/maparea.cpp
View file @
4f9eeeb3
...
...
@@ -117,27 +117,33 @@ void MapArea::init()
map
<
ulong
,
MapArea
::
MeshInfo
>
MapArea
::
getMeshInfoMap
()
{
directory_iterator
mesh_iter
(
mapPath_
);
directory_iterator
mesh_end_iter
;
// directory_iterator mesh_iter(mapPath_);
// directory_iterator mesh_end_iter;
// map<ulong, MeshInfo> meshInfoMap;
// for(; mesh_iter != mesh_end_iter; mesh_iter++) {
// if(mesh_iter->path().extension().string() != ".stream"){
// continue;
// }
// string mesh_path = mesh_iter->path().string();
// string mesh_name = mesh_iter->path().stem().string();
// ulong meshId = 000;
// try {
// meshId = stoi(mesh_name);
// }
// catch (std::invalid_argument&){
// LOG(INFO) << "header.mesh_id() is not int";
// }
// MeshInfo meshInfo;
// meshInfo.meshId = meshId;
// meshInfo.meshPath = mesh_path;
// meshInfoMap.insert(make_pair(meshId, meshInfo));
// }
map
<
ulong
,
MeshInfo
>
meshInfoMap
;
for
(;
mesh_iter
!=
mesh_end_iter
;
mesh_iter
++
)
{
if
(
mesh_iter
->
path
().
extension
().
string
()
!=
".stream"
){
continue
;
}
string
mesh_path
=
mesh_iter
->
path
().
string
();
string
mesh_name
=
mesh_iter
->
path
().
stem
().
string
();
ulong
meshId
=
000
;
try
{
meshId
=
stoi
(
mesh_name
);
}
catch
(
std
::
invalid_argument
&
){
LOG
(
INFO
)
<<
"header.mesh_id() is not int"
;
}
MeshInfo
meshInfo
;
meshInfo
.
meshId
=
meshId
;
meshInfo
.
meshPath
=
mesh_path
;
meshInfoMap
.
insert
(
make_pair
(
meshId
,
meshInfo
));
}
meshInfo
.
meshId
=
stoi
(
path
(
mapPath_
).
stem
().
string
());
meshInfo
.
meshPath
=
mapPath_
;
meshInfoMap
.
insert
(
make_pair
(
meshInfo
.
meshId
,
meshInfo
));
return
meshInfoMap
;
}
...
...
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