Skip to content

yifan-hou/triangle-mesh-collision

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

triangle-mesh-collision

This is a wrapper of CGAL using Eigen data type. Currently supporting:

  • Triangle to triangle collision detection between two meshes.
  • Ray-tracing on a mesh.

Install

If installing to home folder, add

-DCMAKE_INSTALL_PREFIX=$HOME

to every cmake command.

Dependencies

Eigen : Eigen should come with Ubuntu 18.04.

CGAL: The library that does the actual work.

The installation of CGAL can be nasty. The following procedure should work.

If you miss any dependency, this document is a good reference(though it is for an older version) Note you don't have to install QT. It is only useful for visualization with CGAL, which we don't need for now.

  1. Download the CGAL release from here, scroll down to CGAL-4.1, click to unfold Assets, download CGAL-4.14.tar.xz.
  2. Unzip the file.
  3. Install dependencies:
sudo apt-get install libboost-all-dev
sudo apt-get install libgmp-dev
sudo apt-get install libmpfr-dev
  1. Build and install:
    cd CGAL-4.14
    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    make
    sudo make install

You might need to install mpfr from source. First, download it from https://ftp.gnu.org/gnu/mpfr/ (e.g. mpfr-4.1.0.zip), then

unzip mpfr-4.1.0.zip
cd mpfr-4.1.0
./configure
make
sudo make install

Build and install

Now you have all the dependencies, go back to this folder and:

    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    make
    sudo make install

Notes

  • Currently only supports .off file type.

About

Self-collision detection for triangles meshes (C++, libigl, eigen)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 92.2%
  • CMake 7.8%