Skip to content

Commit

Permalink
update includes and fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahabaz-Bagwan committed Dec 6, 2023
1 parent 7f6f04d commit b317fc2
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 27 deletions.
28 changes: 14 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# min. version of cmake required for this project
cmake_minimum_required( VERSION 3.10)
cmake_minimum_required(VERSION 3.10)

# name of the project
project(pointCloudFilters)
Expand All @@ -12,8 +12,8 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/build/lib)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)

# collect all the .cxx needed for executable
filE(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)
# collect all the .cxx needed for executable
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp)

add_subdirectory(thirdparty/flann)
add_subdirectory(example)
Expand All @@ -23,18 +23,18 @@ add_library(${PROJECT_NAME}_shared SHARED ${SOURCES})

target_link_libraries(${PROJECT_NAME}_shared PUBLIC flann_cpp)

target_include_directories( ${PROJECT_NAME}_shared PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/flann/src/cpp
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/eigen
)
target_include_directories(
${PROJECT_NAME}_shared
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/flann/src/cpp
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/eigen)

add_library(${PROJECT_NAME}_static STATIC ${SOURCES})

target_link_libraries(${PROJECT_NAME}_static PUBLIC flann_cpp_s )
target_link_libraries(${PROJECT_NAME}_static PUBLIC flann_cpp_s)

target_include_directories( ${PROJECT_NAME}_static PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/flann/src/cpp
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/eigen
)
target_include_directories(
${PROJECT_NAME}_static
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/flann/src/cpp
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/eigen)
2 changes: 1 addition & 1 deletion example/DownSampling/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <fstream>
#include <iostream>
#include <ostream>
#include <pointCloudFilters/FileHandler.hpp>
#include <pointCloudFilters/IterativeClosestPoint.hpp>
#include <pointCloudFilters/KdtreeFlann.hpp>
Expand Down
19 changes: 15 additions & 4 deletions example/ipc/A.xyz
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
157 374 0
192 615 0
504 559 0
433 334 0
519.333333 124.333333 0
19.344828 139.931034 0
881.708333 508.875000 0
546.761905 916.857143 0
49.909091 945.333333 0
519.333333 124.333333 0
19.344828 139.931034 0
881.708333 508.875000 0
546.761905 916.857143 0
49.909091 945.333333 0
519.333333 124.333333 0
19.344828 139.931034 0
881.708333 508.875000 0
546.761905 916.857143 0
49.909091 945.333333 0
19 changes: 15 additions & 4 deletions example/ipc/B.xyz
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
225 428 0
363 627 0
617 440 0
454 269 0
531.055556 135.166667 0
29.782609 143.782609 0
883.600000 533.733333 0
540.045455 941.545455 0
37.304348 951.695652 0
531.055556 135.166667 0
29.782609 143.782609 0
883.600000 533.733333 0
540.045455 941.545455 0
37.304348 951.695652 0
531.055556 135.166667 0
29.782609 143.782609 0
883.600000 533.733333 0
540.045455 941.545455 0
37.304348 951.695652 0
2 changes: 1 addition & 1 deletion example/ipc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
add_executable(${PROJECT_NAME} ${SOURCES})

# Link dependencies
target_link_libraries(${PROJECT_NAME} PRIVATE pointCloudFilters_shared)
target_link_libraries(${PROJECT_NAME} PUBLIC pointCloudFilters_shared)
1 change: 0 additions & 1 deletion include/pointCloudFilters/IterativeClosestPoint.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

#pragma once

#include "KdtreeFlann.hpp"
#include "PointDefinition.hpp"
#include <Eigen/Core>
#include <Eigen/Eigenvalues>
Expand Down
2 changes: 1 addition & 1 deletion include/pointCloudFilters/PointDefinition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ namespace PCF {
{
double nx, ny, nz, curvature;
};
} // namespace PCF
} // namespace PCF
2 changes: 1 addition & 1 deletion src/FileHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ namespace PCF {
xyzFile.close();
return 0;
}
} // namespace PCF
} // namespace PCF
1 change: 1 addition & 0 deletions src/IterativeClosestPoint.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#include <pointCloudFilters/IterativeClosestPoint.hpp>
#include <pointCloudFilters/KdtreeFlann.hpp>

namespace PCF {
IterativeClosestPoint::IterativeClosestPoint()
Expand Down

0 comments on commit b317fc2

Please sign in to comment.