Skip to content

Commit

Permalink
Logo (#52)
Browse files Browse the repository at this point in the history
* Add logo
* Update docs to RST
  • Loading branch information
Zachary Ferguson authored Jul 27, 2023
1 parent 9d02b90 commit ab86b67
Show file tree
Hide file tree
Showing 20 changed files with 377 additions and 343 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# IPC Toolkit

[![Build](https://github.com/ipc-sim/ipc-toolkit/actions/workflows/continuous.yml/badge.svg)](https://github.com/ipc-sim/ipc-toolkit/actions/workflows/continuous.yml)
[![Python](https://github.com/ipc-sim/ipc-toolkit/actions/workflows/python.yml/badge.svg)](https://github.com/ipc-sim/ipc-toolkit/actions/workflows/python.yml)
[![Docs](https://github.com/ipc-sim/ipc-toolkit/actions/workflows/docs.yml/badge.svg)](https://ipc-sim.github.io/ipc-toolkit/)
[![License](https://img.shields.io/github/license/ipc-sim/ipc-toolkit.svg?color=blue)](https://github.com/ipc-sim/ipc-toolkit/blob/main/LICENSE)
<p align="center">
<a href="https://ipc-sim.github.io/ipc-toolkit"><img alt="IPC Toolkit" src="docs/source/_static/logo.png" width="80%"></a>
</p>

<p align="center">
<a href="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/continuous.yml"><img src="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/continuous.yml/badge.svg"></a>
<a href="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/python.yml"><img src="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/python.yml/badge.svg"></a>
<a href="https://ipc-sim.github.io/ipc-toolkit/"><img src="https://github.com/ipc-sim/ipc-toolkit/actions/workflows/docs.yml/badge.svg"></a>
<a href="https://github.com/ipc-sim/ipc-toolkit/blob/main/LICENSE"><img src="https://img.shields.io/github/license/ipc-sim/ipc-toolkit.svg?color=blue"></a>
</p>

## Description

Expand Down
281 changes: 139 additions & 142 deletions docs/CHANGELOG.md

Large diffs are not rendered by default.

Binary file added docs/source/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions docs/source/changelog.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. include:: ../CHANGELOG.md
:parser: myst_parser.sphinx_
2 changes: 0 additions & 2 deletions docs/source/code_of_conduct.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/source/code_of_conduct.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. include:: ../CODE_OF_CONDUCT.md
:parser: myst_parser.sphinx_
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
# 'sphinx_autodoc_toolbox.collapse',
]

myst_enable_extensions = [
"dollarmath",
]

object_description_options = [
("cpp:.*", dict(clang_format_style={"BasedOnStyle": "WebKit"})),
]
Expand Down
2 changes: 0 additions & 2 deletions docs/source/contributing.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.. include:: ../CONTRIBUTING.md
:parser: myst_parser.sphinx_
79 changes: 0 additions & 79 deletions docs/source/cpp.md

This file was deleted.

99 changes: 99 additions & 0 deletions docs/source/cpp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
C++
===

.. role:: cpp(code)
:language: c++
.. role:: cmake(code)
:language: cmake

.. image:: https://github.com/ipc-sim/ipc-toolkit/actions/workflows/continuous.yml/badge.svg
:target: https://github.com/ipc-sim/ipc-toolkit/actions/workflows/continuous.yml
:alt: Build
.. image:: https://github.com/ipc-sim/ipc-toolkit/actions/workflows/docs.yml/badge.svg
:target: https://ipc-sim.github.io/ipc-toolkit/
:alt: Docs
.. image:: https://img.shields.io/github/license/ipc-sim/ipc-toolkit.svg?color=blue
:target: https://github.com/ipc-sim/ipc-toolkit/blob/main/LICENSE
:alt: License

Build
-----

The easiest way to add the toolkit to an existing CMake project is to download it through CMake.
CMake provides functionality for doing this called `FetchContent <https://cmake.org/cmake/help/latest/module/FetchContent.html>`__ (requires CMake ≥ 3.14).
We use this same process to download all external dependencies.

For example,

.. code:: cmake
include(FetchContent)
FetchContent_Declare(
ipc_toolkit
GIT_REPOSITORY https://github.com/ipc-sim/ipc-toolkit.git
GIT_TAG ${IPC_TOOLKIT_GIT_TAG}
)
FetchContent_MakeAvailable(ipc_toolkit)
where :cmake:`IPC_TOOLKIT_GIT_TAG` is set to the version of the toolkit you want to use. This will download and add the toolkit to CMake. The toolkit can then be linked against using

.. code:: cmake
# Link against the IPC Toolkit
target_link_libraries(${PROJECT_NAME} PUBLIC ipc::toolkit)
where :cmake:`PROJECT_NAME` is the name of your library/binary.

.. tip::
If your :cmake:`IPC_TOOLKIT_GIT_TAG` is a tag (e.g. ``v1.1.0``), then you can use the :cmake:`FetchContent_Declare` argument :cmake:`GIT_SHALLOW TRUE` to download only a single commit. Otherwise, you should use the default :cmake:`GIT_SHALLOW FALSE`.

Dependencies
------------

**All required dependencies are downloaded through CMake** depending on the build options.

The following libraries are used in this project:

* `Eigen <https://eigen.tuxfamily.org/>`__: linear algebra
* `libigl <https://github.com/libigl/libigl>`__: basic geometry functions and predicates
* `TBB <https://github.com/wjakob/tbb>`__: parallelization
* `Tight-Inclusion <https://github.com/Continuous-Collision-Detection/Tight-Inclusion>`__: correct (conservative) CCD
* `spdlog <https://github.com/gabime/spdlog>`__: logging information

Optional
--------

* `robin-map <https://github.com/Tessil/robin-map>`__: faster hash set/map than :cpp:`std::unordered_set`/:cpp:`std::unordered_map`
* Enable by using the CMake option :cmake:`IPC_TOOLKIT_WITH_ROBIN_MAP`
* Enabled by default
* `Abseil <https://abseil.io/>`__: hashing utilities
* 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
* Enable by using the CMake option :cmake:`IPC_TOOLKIT_WITH_RATIONAL_INTERSECTION`
* GMP must 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 :cmake:`IPC_TOOLKIT_WITH_CORRECT_CCD`
* Replaces the default Tight-Inclusion CCD

Usage
-----

The main functionality is provided in the ``ipc.hpp`` header. Use the prefix directory ``ipc`` to include all header files (e.g. :cpp:`#include <ipc/ipc.hpp>`).

Unit Tests
----------

We provide unit tests for ensuring the correctness of our algorithmic pieces. To enable the unit tests use the CMake option :cmake:`IPC_TOOLKIT_BUILD_UNIT_TESTS`.

.. _dependencies-1:

Dependencies
^^^^^^^^^^^^

The following are downloaded when unit tests are enabled(:cmake:`IPC_TOOLKIT_BUILD_TESTS`)

* `Catch2 <https://github.com/catchorg/Catch2.git>`__: testing framework
* `finite-diff <https://github.com/zfergus/finite-diff>`__: finite-difference comparisons
* `Nlohman's JSON library <https://github.com/nlohmann/json>`__: loading test data from JSON files
63 changes: 0 additions & 63 deletions docs/source/index.md

This file was deleted.

65 changes: 65 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
.. toctree::
:caption: General
:hidden:

Home <self>
changelog.rst
license.rst

.. toctree::
:caption: Tutorial
:hidden:

tutorial/getting_started.rst
tutorial/simulation.rst
tutorial/misc.rst

.. toctree::
:caption: C++
:hidden:

Getting Started <cpp>
cpp-api/collision_mesh.rst
cpp-api/collision_constraints.rst
cpp-api/friction.rst
cpp-api/candidates.rst
cpp-api/broad_phase.rst
cpp-api/ccd.rst
cpp-api/distance.rst
cpp-api/barrier.rst
cpp-api/utils.rst

.. toctree::
:caption: Python
:hidden:

Getting Started <python.md>
python-api/collision_mesh.rst
python-api/collision_constraints.rst
python-api/friction.rst
python-api/candidates.rst
python-api/broad_phase.rst
python-api/ccd.rst
python-api/distance.rst
python-api/barrier.rst
python-api/utils.rst

.. toctree::
:caption: Developers
:hidden:

contributing
style_guide
Code of Conduct <code_of_conduct.md>

.. <img src="_static/teaser@0_3.png" style="padding: 15px 30px 0; background-color: white; width: calc(100% - 60px); max-width: 600px; margin: auto; display: block;"/>
Home
====

.. image:: _static/logo.png
:alt: IPC Toolkit

.. include:: ../../README.md
:parser: myst_parser.sphinx_
:start-line: 4
6 changes: 0 additions & 6 deletions docs/source/license.md

This file was deleted.

6 changes: 6 additions & 0 deletions docs/source/license.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

License
=======

.. literalinclude:: ../../LICENSE
:language: md
5 changes: 0 additions & 5 deletions docs/source/python.md

This file was deleted.

6 changes: 6 additions & 0 deletions docs/source/python.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Python
======

.. include:: ../../python/README.md
:parser: myst_parser.sphinx_
:start-line: 2
Loading

0 comments on commit ab86b67

Please sign in to comment.