-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from gadomski/v0.5
Several intertwined changes to our API
- Loading branch information
Showing
121 changed files
with
1,110 additions
and
15,101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function(cpd_test name) | ||
set(src ${name}.cpp) | ||
set(target ${name}-test) | ||
add_executable(${target} ${src}) | ||
set_target_properties(${target} PROPERTIES OUTPUT_NAME ${name}) | ||
add_test(NAME ${name} COMMAND ${target}) | ||
target_link_libraries(${target} PRIVATE Library-C++ ${ARGN} gtest_main) | ||
target_include_directories(${target} PRIVATE "${PROJECT_BINARY_DIR}") | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
add_library(Jsoncpp src/jsoncpp.cpp) | ||
target_link_libraries(Jsoncpp PUBLIC Library-C++ jsoncpp_lib) | ||
set_target_properties(Jsoncpp PROPERTIES | ||
OUTPUT_NAME cpd-jsoncpp | ||
VERSION ${CPD_VERSION} | ||
SOVERSION ${CPD_SOVERSION} | ||
) | ||
target_include_directories(Jsoncpp | ||
PUBLIC | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/components/jsoncpp/include> | ||
$<INSTALL_INTERFACE:include> | ||
) | ||
target_compile_definitions(Jsoncpp PUBLIC CPD_WITH_JSONCPP) | ||
|
||
install(TARGETS Jsoncpp DESTINATION lib EXPORT cpd-jsoncpp-targets) | ||
install(DIRECTORY include/cpd DESTINATION include) | ||
install(EXPORT cpd-jsoncpp-targets NAMESPACE Cpd:: DESTINATION lib/cmake/cpd) | ||
|
||
if(WITH_TESTS) | ||
add_subdirectory(tests) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// cpd - Coherent Point Drift | ||
// Copyright (C) 2016 Pete Gadomski <[email protected]> | ||
// Copyright (C) 2017 Pete Gadomski <[email protected]> | ||
// | ||
// This program is free software; you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
|
@@ -15,24 +15,19 @@ | |
// with this program; if not, write to the Free Software Foundation, Inc., | ||
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
|
||
/// \file | ||
/// Exceptions. | ||
|
||
#pragma once | ||
|
||
namespace cpd { | ||
#include <cpd/affine.hpp> | ||
#include <cpd/nonrigid.hpp> | ||
#include <cpd/rigid.hpp> | ||
#include <json/json.h> | ||
#include <ostream> | ||
|
||
/// Base class for all cpd errors. | ||
class cpd_error : public std::runtime_error { | ||
public: | ||
cpd_error(const std::string& what) | ||
: std::runtime_error(what) {} | ||
}; | ||
namespace cpd { | ||
|
||
/// The requested comparer is unknown. | ||
class unknown_comparer : public cpd_error { | ||
public: | ||
unknown_comparer(const std::string& name) | ||
: cpd_error(name) {} | ||
}; | ||
Json::Value to_json(const Result& result); | ||
Json::Value to_json(const RigidResult& result); | ||
Json::Value to_json(const AffineResult& result); | ||
Json::Value to_json(const NonrigidResult& result); | ||
Json::Value to_json(const Matrix& matrix); | ||
} |
Oops, something went wrong.