Skip to content

Commit 659b2e3

Browse files
authored
Update Python Bindings (#77)
* Bind NonlinearTrajectory and Interval * Add BOUNDING_VOLUME_HIERARCHY enum to python
1 parent b9c8e02 commit 659b2e3

File tree

90 files changed

+1720
-1151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1720
-1151
lines changed

.github/workflows/python.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ name: Python
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- python
5+
branches: [main]
86
pull_request:
9-
branches:
10-
- main
117
paths:
128
- '.github/workflows/python.yml'
139
- 'cmake/**'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,4 @@ docs/_doxygen
266266

267267
notebooks/*.[ch]pp
268268
tests/data/cloth_ball_bf_ccd_candidated.json
269+
python/update_bindings.py

cmake/recipes/filib.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ endif()
77
message(STATUS "Third-party: creating target 'filib::filib'")
88

99
include(CPM)
10-
CPMAddPackage("gh:zfergus/filib#63acb1f78dcdf7667ca2d214f7a3fa3505fdf339")
10+
CPMAddPackage("gh:zfergus/filib#1cd377a7c833a68dc47217829e333f4886c5c46d")

cmake/recipes/pybind11.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
2626
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
2727

2828
include(CPM)
29-
CPMAddPackage("gh:pybind/pybind11@2.10.3")
29+
CPMAddPackage("gh:pybind/pybind11@2.11.1")

docs/source/Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ INCLUDE_FILE_PATTERNS =
23322332
# recursively expanded use the := operator instead of the = operator.
23332333
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
23342334

2335-
PREDEFINED =
2335+
PREDEFINED = IPC_TOOLKIT_WITH_CORRECT_CCD IPC_TOOLKIT_WITH_ROBIN_MAP IPC_TOOLKIT_WITH_ABSEIL IPC_TOOLKIT_WITH_FILIB
23362336

23372337
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
23382338
# tag can be used to specify a list of macro names that should be expanded. The

docs/source/cpp-api/ccd.rst

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,44 @@ Continuous Collision Detection
99
.. doxygenvariable:: ipc::DEFAULT_CCD_MAX_ITERATIONS
1010
.. doxygenvariable:: ipc::DEFAULT_CCD_CONSERVATIVE_RESCALING
1111

12+
Individual CCD Functions
13+
------------------------
14+
1215
.. doxygenfunction:: ipc::point_point_ccd
1316
.. doxygenfunction:: ipc::point_edge_ccd
1417
.. doxygenfunction:: ipc::edge_edge_ccd
15-
.. doxygenfunction:: ipc::point_triangle_ccd
18+
.. doxygenfunction:: ipc::point_triangle_ccd
19+
20+
Generic Interface
21+
^^^^^^^^^^^^^^^^^
22+
23+
.. doxygenfunction:: ipc::ccd_strategy
24+
25+
Additive CCD
26+
------------
27+
28+
.. doxygenfunction:: ipc::additive_ccd::point_point_ccd
29+
.. doxygenfunction:: ipc::additive_ccd::point_edge_ccd
30+
.. doxygenfunction:: ipc::additive_ccd::edge_edge_ccd
31+
.. doxygenfunction:: ipc::additive_ccd::point_triangle_ccd
32+
33+
Generic Interface
34+
^^^^^^^^^^^^^^^^^
35+
36+
.. doxygenfunction:: ipc::additive_ccd::additive_ccd
37+
38+
Nonlinear CCD
39+
-------------
40+
41+
.. doxygenclass:: ipc::NonlinearTrajectory
42+
.. doxygenclass:: ipc::IntervalNonlinearTrajectory
43+
44+
.. doxygenfunction:: ipc::point_point_nonlinear_ccd
45+
.. doxygenfunction:: ipc::point_edge_nonlinear_ccd
46+
.. doxygenfunction:: ipc::edge_edge_nonlinear_ccd
47+
.. doxygenfunction:: ipc::point_triangle_nonlinear_ccd
48+
49+
Generic Interface
50+
^^^^^^^^^^^^^^^^^
51+
52+
.. doxygenfunction:: ipc::conservative_piecewise_linear_ccd
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Intersections
2+
=============
3+
4+
.. doxygenfunction:: ipc::has_intersections
5+
.. doxygenfunction:: ipc::is_edge_intersecting_triangle

docs/source/cpp-api/utils.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
Utils
22
=====
33

4-
.. doxygenfunction:: compute_minimum_distance
5-
.. doxygenfunction:: has_intersections
4+
Logger
5+
------
6+
7+
.. doxygenfunction:: ipc::logger
8+
.. doxygenfunction:: ipc::set_logger
9+
10+
Positive Semi-Definite Projection
11+
---------------------------------
12+
13+
.. doxygenfunction:: ipc::project_to_psd
14+
.. doxygenfunction:: ipc::project_to_pd

docs/source/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
cpp-api/ccd.rst
2929
cpp-api/distance.rst
3030
cpp-api/barrier.rst
31+
cpp-api/intersections.rst
3132
cpp-api/utils.rst
3233

3334
.. toctree::
@@ -43,6 +44,7 @@
4344
python-api/ccd.rst
4445
python-api/distance.rst
4546
python-api/barrier.rst
47+
python-api/intersections.rst
4648
python-api/utils.rst
4749

4850
.. toctree::

docs/source/python-api/ccd.rst

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,53 @@ Continuous Collision Detection
55

66
.. autofunction:: ipctk.compute_collision_free_stepsize
77

8+
Individual CCD Functions
9+
------------------------
10+
811
.. .. autovariable:: ipctk.DEFAULT_CCD_TOLERANCE
912
.. .. autovariable:: ipctk.DEFAULT_CCD_MAX_ITERATIONS
1013
.. .. autovariable:: ipctk.DEFAULT_CCD_CONSERVATIVE_RESCALING
1114
1215
.. autofunction:: ipctk.point_point_ccd
1316
.. autofunction:: ipctk.point_edge_ccd
1417
.. autofunction:: ipctk.edge_edge_ccd
15-
.. autofunction:: ipctk.point_triangle_ccd
18+
.. autofunction:: ipctk.point_triangle_ccd
19+
20+
Generic Interface
21+
^^^^^^^^^^^^^^^^^
22+
23+
.. autofunction:: ipctk.ccd_strategy
24+
25+
Additive CCD
26+
------------
27+
28+
.. autofunction:: ipctk.additive_ccd.point_point_ccd
29+
.. autofunction:: ipctk.additive_ccd.point_edge_ccd
30+
.. autofunction:: ipctk.additive_ccd.edge_edge_ccd
31+
.. autofunction:: ipctk.additive_ccd.point_triangle_ccd
32+
33+
Generic Interface
34+
^^^^^^^^^^^^^^^^^
35+
36+
.. autofunction:: ipctk.additive_ccd.additive_ccd
37+
38+
Nonlinear CCD
39+
-------------
40+
41+
.. autoclass:: ipctk.NonlinearTrajectory
42+
43+
.. autoclasstoc::
44+
45+
.. autoclass:: ipctk.IntervalNonlinearTrajectory
46+
47+
.. autoclasstoc::
48+
49+
.. autofunction:: ipctk.point_point_nonlinear_ccd
50+
.. autofunction:: ipctk.point_edge_nonlinear_ccd
51+
.. autofunction:: ipctk.edge_edge_nonlinear_ccd
52+
.. autofunction:: ipctk.point_triangle_nonlinear_ccd
53+
54+
Generic Interface
55+
^^^^^^^^^^^^^^^^^
56+
57+
.. autofunction:: ipctk.conservative_piecewise_linear_ccd

0 commit comments

Comments
 (0)