Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
CTEST_PARALLEL_LEVEL: 2

jobs:
Unix:
Build:
name: ${{ matrix.name }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
strategy:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,5 @@ jobs:
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/build/html # The folder the action should deploy.
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html # The folder the action should deploy.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ core*
docs/source/doxyoutput
docs/source/api
!docs/Makefile
tests/data/ccd-queries
tests/data/slow-broadphase-ccd
tests/data/ccd-failure
tests/data/friction/chain
Expand Down
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ option(IPC_TOOLKIT_WITH_RATIONAL_INTERSECTION "Use rational edge-triangle inters
option(IPC_TOOLKIT_WITH_ROBIN_MAP "Use Tessil's robin-map rather than std maps" ON)
option(IPC_TOOLKIT_WITH_ABSEIL "Use Abseil's hash functions" ON)

include(CMakeDependentOption)
cmake_dependent_option(IPC_TOOLKIT_TEST_CCD_BENCHMARK "Enable CCD benchmark test" OFF "IPC_TOOLKIT_BUILD_TESTS" OFF)
if(IPC_TOOLKIT_TEST_CCD_BENCHMARK)
set(IPC_TOOLKIT_CCD_BENCHMARK_DIR "" CACHE PATH "Path to the CCD benchmark directory")
set(IPC_TOOLKIT_CCD_NEW_BENCHMARK_DIR "" CACHE PATH "Path to the new CCD benchmark directory")
endif()

# Set default minimum C++ standard
if(IPC_TOOLKIT_TOPLEVEL_PROJECT)
set(CMAKE_CXX_STANDARD 17)
Expand Down Expand Up @@ -150,9 +157,10 @@ endif()
include(spdlog)
target_link_libraries(ipc_toolkit PUBLIC spdlog::spdlog)

# rational-cpp (requires GMP)
if(IPC_TOOLKIT_WITH_RATIONAL_INTERSECTION)
include(gmp)
target_link_libraries(ipc_toolkit PUBLIC GMP::GMP)
include(rational_cpp)
target_link_libraries(ipc_toolkit PUBLIC rational::rational)
endif()

# Sweep and Tiniest Queue and CCD
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ The following libraries are used in this project:
* [Abseil](https://abseil.io/): hashing utilities
* Enable by using the CMake option `IPC_TOOLKIT_WITH_ABSEIL`
* Enabled by default
* [GMP](https://gmplib.org/): rational arithmetic used for exact intersection checks
* [rational-cpp](https://github.io/zfergus/rational-cpp): rational arithmetic used for exact intersection checks
* Enable by using the CMake option `IPC_TOOLKIT_WITH_RATIONAL_INTERSECTION`
* GMP must be installed at a system level
* Requires [GMP](https://gmplib.org/) to be installed at a system level
* [Etienne Vouga's Collision Detection Library](https://github.com/evouga/collisiondetection): inexact CCD
* Included for comparison with the original IPC library
* Enable by disabling the CMake option `IPC_TOOLKIT_WITH_CORRECT_CCD`
Expand Down Expand Up @@ -145,4 +145,4 @@ Additionally, you can cite the original IPC paper:

## License

MIT License © 2020, the IPC-Sim organization (See <a href="https://github.com/ipc-sim/ipc-toolkit/blob/main/LICENSE"><code>LICENSE</code></a> for details)
MIT License © 2020, the IPC-Sim organization (See <a href="https://github.com/ipc-sim/ipc-toolkit/blob/main/LICENSE"><code>LICENSE</code></a> for details).
20 changes: 0 additions & 20 deletions cmake/find/FindGMP.cmake

This file was deleted.

2 changes: 2 additions & 0 deletions cmake/recipes/abseil.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Abseil (https://github.com/abseil/abseil-cpp)
# License: Apache 2.0
if(TARGET absl::flat_hash_map)
return()
endif()
Expand Down
13 changes: 2 additions & 11 deletions cmake/recipes/catch2.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#
# Copyright 2020 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
# Catch2 (https://github.com/catchorg/Catch2)
# License: BSL-1.0
if(TARGET Catch2::Catch2)
return()
endif()
Expand Down
13 changes: 13 additions & 0 deletions cmake/recipes/ccd_query_io.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# CCD Query IO (https://github.com/Continuous-Collision-Detection/CCD-Query-IO)
# License: MIT
if(TARGET ccd_io::ccd_io)
return()
endif()

message(STATUS "Third-party: creating target 'ccd_io::ccd_io'")

set(CCD_IO_DOWNLOAD_SAMPLE_QUERIES ON CACHE BOOL "Download sample CCD queries" FORCE)
set(CCD_IO_SAMPLE_QUERIES_DIR "${PROJECT_SOURCE_DIR}/tests/data/ccd-queries/" CACHE PATH "Where should we download sample queries?")

include(CPM)
CPMAddPackage("gh:Continuous-Collision-Detection/CCD-Query-IO#36f6093af81a65acc27d9f05ad32d6b5729e8d15")
13 changes: 2 additions & 11 deletions cmake/recipes/eigen.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#
# Copyright 2019 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
# Eigen (https://gitlab.com/libeigen/eigen)
# License: MPL 2.0
if(TARGET Eigen3::Eigen)
return()
endif()
Expand Down
7 changes: 4 additions & 3 deletions cmake/recipes/evouga_ccd.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Etienne Vouga's CCD Library
# Etienne Vouga's CCD Library (https://github.com/evouga/collisiondetection.git)
# License: ???
if(TARGET evouga::ccd)
return()
endif()
Expand All @@ -15,11 +16,11 @@ CPMAddPackage(

# file(GLOB EVOUGA_CCD_SOURCE_FILES "${evccd_SOURCE_DIR}/src/*.cpp")
add_library(evouga_ccd
"${evccd_SOURCE_DIR}/src/CTCD.cpp"
"${collisiondetection_SOURCE_DIR}/src/CTCD.cpp"
)
add_library(evouga::ccd ALIAS evouga_ccd)

target_include_directories(evouga_ccd PUBLIC "${evccd_SOURCE_DIR}/include")
target_include_directories(evouga_ccd PUBLIC "${collisiondetection_SOURCE_DIR}/include")

include(eigen)
target_link_libraries(evouga_ccd PUBLIC Eigen3::Eigen)
Expand Down
2 changes: 2 additions & 0 deletions cmake/recipes/finite_diff.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# finite-diff (https://github.com/zfergus/finite-diff)
# License: MIT
if(TARGET finitediff::finitediff)
return()
endif()
Expand Down
18 changes: 0 additions & 18 deletions cmake/recipes/gmp.cmake

This file was deleted.

2 changes: 2 additions & 0 deletions cmake/recipes/gpu_ccd.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# CCD-GPU (https://github.com/dbelgrod/CCD-GPU)
# License: MIT
if(TARGET gpu_ccd::gpu_ccd)
return()
endif()
Expand Down
13 changes: 2 additions & 11 deletions cmake/recipes/json.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#
# Copyright 2020 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
# Nlohmann's JSON (https://github.com/nlohmann/json)
# License: MIT
if(TARGET nlohmann_json::nlohmann_json)
return()
endif()
Expand Down
4 changes: 3 additions & 1 deletion cmake/recipes/libigl.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# libigl (https://github.com/libigl/libigl)
# License: MPL-2.0
if(TARGET igl::core)
return()
endif()
Expand All @@ -9,4 +11,4 @@ set(LIBIGL_PREDICATES ON CACHE BOOL "Use exact predicates" FORCE)
include(eigen)

include(CPM)
CPMAddPackage("gh:libigl/libigl@2.4.0")
CPMAddPackage("gh:libigl/libigl@2.5.0")
13 changes: 2 additions & 11 deletions cmake/recipes/onetbb.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#
# Copyright 2021 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
# oneTBB (https://github.com/oneapi-src/oneTBB)
# License: Apache-2.0
if(TARGET TBB::tbb)
return()
endif()
Expand Down
13 changes: 2 additions & 11 deletions cmake/recipes/pybind11.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#
# Copyright 2020 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
# pybind11 (https://github.com/pybind/pybind11)
# License: BSD-style
if(TARGET pybind11::pybind11)
return()
endif()
Expand Down
10 changes: 10 additions & 0 deletions cmake/recipes/rational_cpp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# rational-cpp (https://github.com/zfergus/rational-cpp)
# License: MIT
if(TARGET rational::rational)
return()
endif()

message(STATUS "Third-party: creating target 'rational::rational'")

include(CPM)
CPMAddPackage("gh:zfergus/rational-cpp#687d4ea3436ada7231b8920f3cd5b02b438c21aa")
2 changes: 2 additions & 0 deletions cmake/recipes/robin_map.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# robin-map (https://github.com/Tessil/robin-map)
# License: MIT
if(TARGET tsl::robin_map)
return()
endif()
Expand Down
13 changes: 2 additions & 11 deletions cmake/recipes/spdlog.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
#
# Copyright 2020 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
# spdlog (https://github.com/gabime/spdlog)
# License: MIT
if(TARGET spdlog::spdlog)
return()
endif()
Expand Down
2 changes: 2 additions & 0 deletions cmake/recipes/sweep_and_tiniest_queue.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Broadphase GPU (https://github.com/dbelgrod/broadphase-gpu)
# License: MIT
if(TARGET STQ::CPU)
return()
endif()
Expand Down
2 changes: 2 additions & 0 deletions cmake/recipes/tight_inclusion.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Tight Inclusion (https://github.com/Continuous-Collision-Detection/Tight-Inclusion)
# License: MIT
if(TARGET tight_inclusion::tight_inclusion)
return()
endif()
Expand Down
6 changes: 3 additions & 3 deletions docs/source/cpp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ Optional
* Enable by using the CMake option :cmake:`IPC_TOOLKIT_WITH_ABSEIL`
* Enabled by default

* `GMP <https://gmplib.org/>`__: rational arithmetic used for exact intersection checks
* `rational-cpp <https://github.io/zfergus/rational-cpp>`__: rational arithmetic used for exact intersection checks

* Enable by using the CMake option :cmake:`IPC_TOOLKIT_WITH_RATIONAL_INTERSECTION`
* GMP must be installed at a system level
* Enable by using the CMake option :cmake:`IPC_TOOLKIT_WITH_RATIONAL_INTERSECTION`
* Requires `GMP <https://gmplib.org/>`__ to be installed at a system level

* `Etienne Vouga's Collision Detection Library <https://github.com/evouga/collisiondetection>`__: inexact CCD

Expand Down
1 change: 1 addition & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pybind11_add_module(ipctk

src/ccd/aabb.cpp
src/ccd/ccd.cpp
src/ccd/additive_ccd.cpp
src/ccd/inexact_point_edge.cpp
src/ccd/point_static_plane.cpp

Expand Down
1 change: 1 addition & 0 deletions python/src/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ PYBIND11_MODULE(ipctk, m)
// ccd
define_ccd_aabb(m);
define_ccd(m);
define_additive_ccd(m);
define_inexact_point_edge(m);
define_point_static_plane(m);

Expand Down
Loading