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
d99fda88
Commit
d99fda88
authored
May 30, 2023
by
wangdawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
5d79dca7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
mesharea.cpp
libs/voxel_map/libs/area/mesharea.cpp
+4
-3
mesharea.h
libs/voxel_map/libs/area/mesharea.h
+1
-1
No files found.
libs/voxel_map/libs/area/mesharea.cpp
View file @
d99fda88
...
@@ -236,10 +236,10 @@ void MeshArea::reSetupNeighBorMesh()
...
@@ -236,10 +236,10 @@ void MeshArea::reSetupNeighBorMesh()
}
}
bool
MeshArea
::
checkBlockAtAreaToLoad
(
bool
MeshArea
::
checkBlockAtAreaToLoad
(
const
Vector2i
&
shiftedIndexTo
Load
)
const
Vector2i
&
shiftedIndexTo
Check
)
{
{
LOG
(
INFO
)
<<
"shiftedIndexTo
Load: "
<<
shiftedIndexToLoad
.
transpose
();
LOG
(
INFO
)
<<
"shiftedIndexTo
Check: "
<<
shiftedIndexToCheck
.
transpose
();
Vector2i
centerIndex
(
shiftedIndexTo
Load
.
x
(),
shiftedIndexToLoad
.
y
());
Vector2i
centerIndex
(
shiftedIndexTo
Check
.
x
(),
shiftedIndexToCheck
.
y
());
for
(
unsigned
int
i
=
0
;
i
<
checkNeighbors_
.
size
();
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
checkNeighbors_
.
size
();
i
++
){
Vector2i
curr_index
=
centerIndex
+
checkNeighbors_
[
i
];
Vector2i
curr_index
=
centerIndex
+
checkNeighbors_
[
i
];
const
BlockContent
&
blockContent
=
blockAreaTable_
[
curr_index
.
x
()][
curr_index
.
y
()];
const
BlockContent
&
blockContent
=
blockAreaTable_
[
curr_index
.
x
()][
curr_index
.
y
()];
...
@@ -270,6 +270,7 @@ void MeshArea::loadBlockAtArea(const Vector3d &position)
...
@@ -270,6 +270,7 @@ void MeshArea::loadBlockAtArea(const Vector3d &position)
uint16_t
blockCntLoaded
=
0
;
uint16_t
blockCntLoaded
=
0
;
Vector2i
centerIndex
=
Vector2i
centerIndex
=
calShiftedIndex
(
position
.
x
(),
position
.
y
());
calShiftedIndex
(
position
.
x
(),
position
.
y
());
LOG
(
INFO
)
<<
"shiftedIndexToLoad: "
<<
centerIndex
.
transpose
();
vector
<
Vector2i
>
neighbors
;
vector
<
Vector2i
>
neighbors
;
if
(
fstLoadMap
){
if
(
fstLoadMap
){
neighbors
=
firstLoadNeighbors_
;
neighbors
=
firstLoadNeighbors_
;
...
...
libs/voxel_map/libs/area/mesharea.h
View file @
d99fda88
...
@@ -263,7 +263,7 @@ private:
...
@@ -263,7 +263,7 @@ private:
void
reSetupNeighBorMesh
();
void
reSetupNeighBorMesh
();
bool
checkBlockAtAreaToLoad
(
const
Vector2i
&
shiftedIndexTo
Load
);
bool
checkBlockAtAreaToLoad
(
const
Vector2i
&
shiftedIndexTo
Check
);
void
loadBlockAtAreaByBlh
(
const
Vector2d
&
bl
);
void
loadBlockAtAreaByBlh
(
const
Vector2d
&
bl
);
...
...
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