Skip to content

Commit 98f34ff

Browse files
committed
style: directly set color to white. Cmake type specific.
1 parent 50b64d3 commit 98f34ff

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

.vscode/c_cpp_properties.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Linux",
5+
"includePath": [
6+
"/usr/include",
7+
"/usr/local/include",
8+
"/usr/include/c++/10",
9+
"${workspaceFolder}/ufomap/include",
10+
"${workspaceFolder}/build/ufomap"
11+
],
12+
"defines": [],
13+
"compilerPath": "/usr/bin/g++-10",
14+
"cppStandard": "c++20",
15+
"intelliSenseMode": "linux-gcc-x64"
16+
}
17+
],
18+
"version": 4
19+
}

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ project(dufomap
55
DESCRIPTION "DUFOMap: Efficient Dynamic Awareness Mapping"
66
LANGUAGES CXX
77
)
8+
set(CMAKE_CXX_STANDARD 20)
9+
set(CMAKE_CXX_STANDARD_REQUIRED True)
10+
if(NOT CMAKE_BUILD_TYPE)
11+
set(CMAKE_BUILD_TYPE Release)
12+
endif()
813

914
add_subdirectory(ufomap)
1015
include_directories(${CMAKE_SOURCE_DIR}/ufomap)

dufomap.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,12 @@ int main(int argc, char* argv[])
403403
ufo::PointCloudColor cloud_static;
404404

405405
for (auto& p : cloud_acc) {
406-
if (!map.seenFree(p))
406+
if (!map.seenFree(p)){
407+
// NOTE: change to white color, comment if you want to keep the original color
408+
if (static_cast<ufo::Color&>(p) == ufo::Color{0, 0, 0})
409+
static_cast<ufo::Color&>(p) = ufo::Color{255, 255, 255};
407410
cloud_static.push_back(p);
411+
}
408412
}
409413

410414
timing[5].stop();

0 commit comments

Comments
 (0)