Compare commits

...
Author SHA1 Message Date
Alec Jacobson 2f4bc9b4dc fix assertion bug 2023-10-05 20:10:24 -04:00
Alec Jacobson fdaac01bcc Fix AABB::find to not try to run 2D code on 3D input and vice versa (#2294) [ci skip]
* pull out DIM from find

* AABB find test

* templates
2023-09-26 21:39:36 -04:00
Alec Jacobson b4152c576c better docs (#2293) [ci skip] 2023-09-26 12:07:22 -04:00
Alec Jacobson 1b07ebcf9e rm vector overloads and simplify api (#2290) [ci skip] 2023-09-25 16:27:01 -04:00
Alec Jacobson 64c2740230 bump cgal to 5.6 (#2289) [ci skip] 2023-09-25 09:59:14 -04:00
Evan Barentin 2b05343e0d Normalize all the line endings (#2288) 2023-09-22 12:39:53 -04:00
Alec Jacobson 7547801f58 use unit vector atan formula; split intrinsic version (#2285) [ci skip]
* use unit vector atan formula; split intrinsic version

* fix on linux
2023-09-19 23:28:58 -04:00
Emmanuel OliviandAlec Jacobson d154f0587c Add test for issue/2270 and a fix (#2271)
* Add test for issue/2270 and a (dirty) fix

* restore func; simplify test (failing)

* more robust fix

* Implement solution from T.Ize in "Robust BVH Ray Traversal" 4.2

* Implement solution from T.Ize in "Robust BVH Ray Traversal" 4.1

* Move nextafter in its own file

* Add std:: to other nextafter calls

* Add test for nextafter

* Use unaryExpr for nextafter on Eigen elements

* Fix and rename into increment_ulp

* missing templates

* correct overload name; missing templates

---------

Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2023-09-18 20:18:08 -04:00
Alec Jacobson dddfd92c7a Merge branch 'main' of github.com:libigl/libigl 2023-09-18 17:51:31 -04:00
Alec Jacobson 6ddf3b0dd7 better documentation [ci skip] 2023-09-18 17:51:26 -04:00
Alec Jacobson e139702373 writeOFF for quads etc. (#2283) [ci skip] 2023-09-18 17:01:12 -04:00
Alec Jacobson fe8e17c095 add gitattributes file (#2282) [ci skip] 2023-09-18 17:00:35 -04:00
Alec Jacobson 0c78def493 Custom Shader tutorial (#2281) [ci skip] 2023-09-18 17:00:16 -04:00
Alec Jacobson 3c0f31f132 better templates for marching tets (#2279) [ci skip]
* better templates

* fabs -> abs

* missing cast
2023-09-18 15:07:26 -04:00
Alec Jacobson 2b62322cd5 improve color doc [ci skip] 2023-09-18 14:33:46 -04:00
Alec Jacobson cb111f6838 Bump to OpenGL version 4.1 (#2277)
* bump glad

* fix name changes

* remove compilation guards

* bump runtime to 4.1 too

* fix map_texture; template bind

* doc

* attempt to skip tests

* that didnt work, disable with cmake

* missing template

* rm __1::
2023-09-14 22:29:44 -04:00
Alec Jacobson 68684132e5 adj list fix unref; manifold doc; icosa; tests (#2276) [ci skip] 2023-09-13 18:27:47 -04:00
Alec Jacobson 0c1865a8d6 Fix bug in half_space_box (#2269) [ci skip]
* test

* fix 1384 and add test
2023-09-09 00:12:46 -04:00
Alec Jacobson 5dcce37c9d rm empty ifdef [ci skip] 2023-09-08 20:51:35 -04:00
Alec Jacobson d6448a86fb 3 new trimming methods and tutorial (#2268) [ci skip]
* 3 new trimming methods and tutorial

* missing template

* rm warning

* add tests

* Windows templates
2023-09-08 12:58:07 -04:00
HomayoonT 6a31dbf126 Update MeshGL.h (#2267) [ci skip]
Added #include <cstdint> for fixing build failure mingw-w64 "w64devkit"
2023-09-07 12:12:07 -04:00
Alec Jacobson 321d0d8ed0 Fix most floating point exceptions (#2266)
* better documentation, test against eigen slicing

* remove a bunch of slices

* clean up templates; static asserts on vector types

* final purges of slice

* fix templates in debug and ears test

* fix slice mask bug

* fix slice bug

* fix most fpe exceptions

* fix limit case

* more robust push, pop
2023-09-06 23:25:28 -04:00
Alec Jacobson 9bfacf8fb6 fix slim doublearea -> volume for tets (#2262) [ci skip] 2023-09-04 10:00:16 -04:00
Alec Jacobson f48c5a93f1 Fix 1462 2023-09-03 21:59:57 -04:00
Alec Jacobson d326251896 fix moments to work with more input types 2023-09-03 14:59:57 -04:00
Alec Jacobson 74160c4c1c sitemap xml; link to functions list 2023-09-02 10:44:09 -04:00
Alec Jacobson b774e1b31c Phase out slice for dense matrices (#2259)
* better documentation, test against eigen slicing

* remove a bunch of slices

* clean up templates; static asserts on vector types

* final purges of slice

* fix templates in debug and ears test

* fix slice mask bug

* fix slice bug

* boo. try to get around windows poor template deduction

* annoying left over bad windows ❄️ template
2023-09-01 11:11:46 -04:00
Alec Jacobson f5702f63e7 Fully avoid conflicting template parameters in AABB/signed_distance (#2257) [ci skip]
* readPLY: dont touch unread; point_mesh... dim pattern

* static asserts in pseudonormal test

* better handling of dimensions in signed_distance

* test fixed column case
2023-08-30 10:50:12 -04:00
Alec Jacobson 0262ef5866 Merge branch 'main' of github.com:libigl/libigl 2023-08-29 23:43:49 -04:00
Alec Jacobson 9350803420 fix namespace / include issues 2023-08-29 23:43:42 -04:00
Alec Jacobson 0e39b473b1 readPLY: dont touch unread; point_mesh... dim pattern (#2256) [ci skip] 2023-08-29 21:17:20 -04:00
Alec Jacobson 7a84503c8e Expose cutoff parameter for CGAL intersections; better default (#2255) [ci skip]
* cutoff in cgal intersections

* missing cast
2023-08-28 22:12:19 -04:00
Alec Jacobson deae7a2767 unfix dimensions 2023-08-26 23:16:00 -04:00
Alec Jacobson a0bb5bb813 fix dimensions 2023-08-26 23:13:36 -04:00
Alec Jacobson 5779714a5b fix hardcoded vectorxi 2023-08-26 23:01:47 -04:00
Alec Jacobson 687530283c Fix a bunch of warnings (#2254)
* fix a couple warnings

* fix a bunch of warnings (mostly unused variable)

* fix a bunch of warnings and simplify params

* Special assert so that variables aren't seen as unused

* fix tutorial

* undo erroneous line removal

* ASSERT -> IGL_ASSERT

* VSC ❄️ doesn't realize MAX_DEPTH is conts
2023-08-26 22:42:47 -04:00
Alec Jacobson 5c17f85621 fix debug compile bug 2023-08-25 10:56:39 -04:00
Alec Jacobson e5e0539e7d Remove extra calls to set_face_based (#2253) 2023-08-25 10:40:33 -04:00
Alec Jacobson eee808949e info about header/static [ci skip] 2023-08-24 17:57:59 -04:00
Alec Jacobson 75209c5d6c Robust isolines (#2251)
* robust isolines, test

* documentation
2023-08-24 17:24:17 -04:00
Alec Jacobson ab6229c77a Euler Characteristic tests (#2250)
* test for euler characteristic

* doc
2023-08-23 16:19:42 -04:00
Alec Jacobson b1fe6ba49c read blank lines as comments (#2247) [ci skip] 2023-08-22 20:20:53 -04:00
Alec Jacobson 8d940367bf support rowmajor (#2246) [ci skip] 2023-08-22 20:20:34 -04:00
Alec Jacobson fb13b11a19 border vertex for quads (#2245) [ci skip] 2023-08-22 15:32:43 -04:00
Alec Jacobson 7c58cb041d better doc; [ci skip] 2023-08-22 14:32:54 -04:00
Alec Jacobson 10e95bb93b robust ray box intersect (#2244) [ci skip]
* nan-proof min/max

* templates
2023-08-22 14:28:34 -04:00
Alec Jacobson 00100b60db bad assert [ci skip] 2023-08-22 14:06:19 -04:00
Alec Jacobson 3f8c5426b8 further split up mqwf templates 2023-08-22 12:20:19 -04:00
Alec Jacobson fd16e24391 assertion bug and too large allocation 2023-08-21 21:33:04 -04:00
Alec Jacobson 44785345e5 float templates + fix (#2243) [ci skip] 2023-08-21 21:09:24 -04:00
Alec Jacobson 71676a111e Remove omp pragmas (#2242) [ci skip]
* remove omp pragmas

* continue -> return
2023-08-21 17:54:51 -04:00
Alec Jacobson e5e7d8a76a fix 2025 with documentation [ci skip] 2023-08-21 17:47:15 -04:00
Alec Jacobson 10002b6cf1 block windows from gl version hell 2023-08-21 17:03:11 -04:00
Alec Jacobson 418dd43cfe small changes for python to compile (#2241) 2023-08-21 11:19:20 -04:00
Alec Jacobson 9162fb7d79 Fix 2228 with blas check on linux (#2240)
* split up 406; cmake

* split up 716

* rm old file

* 716 changes to main

* 709 split up

* missing include

* special syntax for windows ❄️

* stupid windows struct/class

* split up 805

* split up 610)'

* Fix 2228 with blas check on linux
2023-08-20 16:49:05 -04:00
hanxiaoandAlec Jacobson dd38f82afd Ear clipping function fix (#1565) [ci skip]
* fix the is_ear check

* fix order of outputs; overload that does any orientation

---------

Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2023-08-19 23:05:58 -04:00
215368a07b Speed up of SelfIntersectMesh: (#1413) [ci skip
* Speed up of SelfIntersectMesh:
The test for intersection of two triangles sharing a common edge
has been optimized to reject non-overlaping triangles with
the least amount of

* Update SelfIntersectMesh.h

---------

Co-authored-by: Jérémie Dumas <jdumas@users.noreply.github.com>
Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2023-08-19 20:43:44 -04:00
Sven-Kristofer PilzandAlec Jacobson 17787c86d6 Reduce dynamic allocations for AABB queries (#2001) [ci skip]
* Use static num of cols if available.

* Don't allocate a new vector for only one triangle.

* bug in test

---------

Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2023-08-19 20:42:46 -04:00
Alec Jacobson f3f7879364 Split up larger tutorials (#2237) [ci skip]
* split up 406; cmake

* split up 716

* rm old file

* 716 changes to main

* 709 split up

* missing include

* special syntax for windows ❄️

* stupid windows struct/class

* split up 805

* split up 610)'
2023-08-19 19:19:44 -04:00
Alec Jacobson e2a345a43d Alecjacobson/fix mqwf ldlt (#2239)
* enable ldlt

* mqwf test
2023-08-19 17:34:59 -04:00
Alec Jacobson e45a7e0868 missing PI on windows ❄️ 2023-08-19 12:00:29 -04:00
Alec Jacobson c410e80608 turning number in 2D 2023-08-19 11:51:41 -04:00
Alec Jacobson 7765697eb6 split windows header-only tutorial actions (#2238)
* split windows header-only tutorial actions

* double quote issue?

* split 7 into 8 and 9
2023-08-19 11:06:48 -04:00
Alec Jacobson 83922780e1 Missing colon in CMakeLists.txt
Not sure how this was ever working.
2023-08-18 20:42:31 -04:00
Vladimir S. FONOVandAlec Jacobson 02e0a1ba83 Separated png module from opengl, added unit test for png (#1693) [ci skip]
* ENH: separate png from opengl, by splitting it into stb and opengl_image modules
     Added a unit test for PNG,BMP,TGA,JPG reading and writing
     Renamed module png to stb
     Renamed functions readPNG to read_image and writePNG to write_image

* name folder by dependency; consistent arg order

---------

Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2023-08-18 14:32:25 -04:00
Alexander Sulfrian 97fb89c955 Source code should not be marked as executable (#2231) [ci skip]
The executable file flag should only be used for binaries and scripts
with a shebang specifying the interpreter of the script.
2023-08-18 11:04:36 -04:00
62fe771ae1 Fix blue_noise and random_points_on_mesh reproducibility (#2235)
* Fix `blue_noise` and `random_points_on_mesh` reproducibility

- added new overload for `blue_noise` and `random_points_on_mesh` for that accept an UnformRandomBitGenerator as input. The default signature (ie without URBG) still works, and uses by default std::minstd_rand initialized with random seed generated by std::rand(). This is following the existing behaviour of `randperm`.
- added reproducibility test case for `blue_noise` and `random_points_on_mesh`

* `blue_noise` and `random_points_on_mesh` overloads without an URBG parameter now use a fixed default seed

ie `std::minstd_rand()`

default seed

* Fix static compilation of tutorials

* revert to jdumas std::rand seed for default

* missing templates on linux

* more missing linux templates

* use std names rather than expansions in explicit templates

---------

Co-authored-by: stourneux <stourneux@buf.com>
Co-authored-by: seb-tourneux <sebastientourneux1@gmail.com>
2023-08-17 23:43:54 -04:00
a183e28109 Fix scale and reflections in Procrustes solver (#2226) [ci skip]
* Allow returning reflections from polar_dec and polar_svd

* Fix scale in Procrustes solver

* Fix reflection case in Procrustes solver

* Add unit test for Procrustes

* fix overloads for backwards comp

* missing templates on linux

---------

Co-authored-by: Alec Jacobson <alecjacobson@adobe.com>
Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2023-08-17 22:10:23 -04:00
a69c8c96f3 Adjust igl::boundary_conditions(...) to support 3D cages (#2229)
* Calculate boundary conditions for cage faces

* Remove std:: prefix to conform to original libigl

* Adjust tests to new boundary_conditions(...)

* Adjusting tutorial 403 to new boundary_conditions(...)

* Removing unnecessary include

* Remove tolerances from boundary conditions for cages to prevent dups

---------

Co-authored-by: Daniel <daniel.stoeter@gris.tu-darmstadt.de>
Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2023-08-17 19:18:42 -04:00
Alec Jacobson 724ff6b05a Remove deprecated functions (#2234)
* basic config file

* documentation for two funcs

* better theme; subnamespace

* A-c

* documentation for all core headers

* more documentation

* documentation for all headers (except a few classes)

* rm accidental comment on igl

* just h

* typo

* accidental delete

* fix compile issues

* add main page [ci skip]

* relative include paths

* relative include paths

* inexplicably need two more templates

* rm get_seconds_hires

* make fwn namespace private for dox

* hide internal fwn from documentation

* fix doc

* rm deprecated euler

* rm __1
2023-08-17 00:47:43 -04:00
Nico 3cf08b7f68 Cleanup #2216 (#2225) 2023-08-16 21:13:27 -04:00
Alec Jacobson 5ded7da086 Update README.md [ci skip] 2023-08-16 13:15:48 -04:00
Alec Jacobson 2cc372f70d Doxygen based documentation (#2233)
* basic config file

* documentation for two funcs

* better theme; subnamespace

* A-c

* documentation for all core headers

* more documentation

* documentation for all headers (except a few classes)

* rm accidental comment on igl

* just h

* typo

* accidental delete

* fix compile issues

* add main page [ci skip]
2023-08-16 13:14:06 -04:00
Alec Jacobson b1bd5b1216 spectra module (#2216)
* lscm hessian and spectral

* spectra module + test

* try to use Eigen3_FOUND (not working locally)

* use fork

* Don't use size_t for small int (windows hell)
2023-06-28 11:37:34 -04:00
Alec Jacobson 598b0b194a lscm hessian and spectral (#2214) [ci skip] 2023-06-28 11:35:55 -04:00
Alec Jacobson 4de0a0569a use vector () (#2218) [ci skip] 2023-06-28 11:35:36 -04:00
Fabien Péan afafc7cf5a Fix libigl-config.cmake.in (#2188) 2023-06-26 11:45:34 -04:00
Chao Li 514271af51 Implement full type mass matrix (#2193) 2023-06-26 10:47:59 -04:00
Alec Jacobson 282388c68a switch to gmp mirror (#2215)
* switch to gmp mirror

* use gist for patch
2023-06-25 10:14:36 -04:00
Felix Wang 7b6cc27284 Add missing <cstdint> header for gcc 13 (#2192) 2023-04-20 15:42:48 -04:00
Q-MinhandAlec Jacobson a05865e265 Fix ambiguous assignment operator compile error (#2157) [ci skip]
* Fix ambiguous assignment operator compile error

* Revert "Fix ambiguous assignment operator compile error"

This reverts commit 661c482140.

* Fix ambiguous assignment operator compile error

* Add typename

* add template (hopefully trigger error on windows CI

* simpler fix for windows

* use DerivedFI

---------

Co-authored-by: Alec Jacobson <alecjacobson@adobe.com>
2023-03-15 09:26:34 -04:00
Vladimir S. FONOV 1d007f4252 Fast mesh-to-mesh intersection and mesh self intersection without CGAL (#2109)
* Added code for fast triangle-triangle intersection checking and function for fast detection of mesh self-intersections and mesh-to-mesh intersections withoug CGAL

* Fixed auto parameters in lambda helper function

* Replaced cbegin/cend with begin/end

* Fixed auto parameters in lambda helper function

* Added tests for igl::tri_tri_intersection_test_3d

* Added more tests, converted macros in Guigue2003_tri_tri_intersect.cpp to proper c++

* Renamed files and function names to follow IGL guidelines,
added reference to the original license for tri_tri_intersect
2023-03-14 11:37:22 -04:00
Alec Jacobson 3374c1ad71 Update ViewerData.cpp (#2173) [ci skip] 2023-02-25 12:27:17 -05:00
Alec Jacobson 90464ffbc3 Fixes 2174 [ci skip]
Fixes 2174
2023-02-21 08:19:09 -05:00
Alec Jacobson 7e5512ce71 try to use j2 on windows (#2170) 2023-02-11 23:58:58 -05:00
Alec Jacobson 46f0860c18 fix unique_rows and sortrows templating (#2169) 2023-02-11 18:48:39 -05:00
Alec Jacobson 67b406d60d Merge branch 'main' of github.com:libigl/libigl [ci skip] 2023-02-11 14:03:24 -05:00
Alec Jacobson c01718d0b4 fix marker documentation [ci skip] 2023-02-11 14:02:50 -05:00
Alec Jacobson 78015d4da1 bump mpfr version; add logic for mac os cross compiling (#2165)
* bump mpfr version; add logic for mac os cross compiling

* hmm github actions cmake complains where my didn't

* split up tests and tutorial in header only CI

* hmmm why isn't matrix working

* try to fix matrix a different way

* better names

* oops wrong tests in name

* typpppoooo

* mooooree typpppoooos
2023-02-11 00:42:25 -05:00
Alec Jacobson 4a91b88f81 Update continuous.yml (#2161) 2023-02-04 15:46:22 -05:00
Martin Heistermann 3e3c96d0fd CoMISo-MRosy solver: compatibility with newer CoMISo: (#2072)
Omit last (show_timings) argument for ConstraintedSolver::solve call.
This was optional before, and has been removed in CoMISo
174ef38344e09a9547f8a684bf6520cdc8fbe3ba.
2023-02-04 11:55:46 -05:00
Alec Jacobson ee7a7a0aa1 hot fix for missing template 2023-02-04 11:33:14 -05:00
MotivaCG 70dad85a27 Update715_MeshImplicitFunction (#2090)
* Update715_MeshImplicitFunction #2088

Replace the copyleft marching_cubes function with native the libigl one.

* Fix static lib compilation for sample 715
2023-02-04 11:14:25 -05:00
Franck HOUSSEN 610a495be4 glfw viewer - high dpi: handling both width and height. (#2117) 2023-02-04 11:06:28 -05:00
Bryn LloydandBryn Lloyd f1981ff873 BUG: readMESH stuck in endless loop (#2142)
Co-authored-by: Bryn Lloyd <lloyd@itis.swiss>
2023-02-04 11:04:33 -05:00
Alec Jacobson 83dbca4ffd Update compilation.md 2023-02-03 13:44:58 -05:00
Alec Jacobson a3b0fe4a20 Update ViewerCore.cpp 2023-02-02 21:10:09 -05:00
Alec Jacobson 50ac379c53 Shadow Mapping in igl::opengl::glfw::Viewer (#2155)
* floor and working tutorial example

* working shadows with tutorial

* shadows + matcaps

* fiddling
2023-02-02 19:52:09 -05:00
Alec Jacobson dcd1d45d4f remove pinv header 2023-02-01 18:45:29 -05:00
Alec Jacobson e4b8bfb28d throttle tight loop over glfwWaitEvents with sleep (#2151)
* throttle tight loop over glfwWaitEvents with sleep

* restore changes in Main
2023-01-20 12:55:21 -05:00
Alec Jacobson e9c9c5d228 missing template and use template type (#2150) 2023-01-20 01:02:17 -05:00
Alec Jacobson bd85c8998f Improve robustness of ICP solve when closest points and normals are degenerate (#2107)
* fix hard coded double + template

* oops wrong template type

* more robust solve
2023-01-19 22:09:33 -05:00
jmespadero af06a10939 boundary_facets_optimization (#2104) 2023-01-19 22:08:50 -05:00
huihao 2f625e66fd chore(cmake): use GIT_SHALLOW for imgui (#2148) 2023-01-19 22:05:42 -05:00
Alec Jacobson d91f4edeb0 don't crash on brew update (#2138)
* don't crash on brew update

* don't update (again) on brew install ccache

* rm 2to3 before. force true on install, too

* rm 2to3 and others; don't update

* dont rm anything ; just install ccache with no update
2023-01-04 13:02:30 -05:00
Nico 1284a39f13 Fix typo in test that caused test failure in Debug mode (#2137)
Signed-off-by: BruegelN <BruegelN@crashing.systems>

Signed-off-by: BruegelN <BruegelN@crashing.systems>
2023-01-03 13:56:32 -05:00
Dimitrii NikolaevandDimitrii Nikolaev 0c77359c89 Fixes hunter issue https://github.com/cpp-pm/hunter/pull/484 with newest MSVC, which leads to compilation failure (#2123)
Co-authored-by: Dimitrii Nikolaev <nikolaev@ift.at>
2022-12-19 09:28:25 +01:00
Alec Jacobson 87a550af22 fix hard coded double + template (#2106)
* fix hard coded double + template

* oops wrong template type
2022-10-23 16:05:00 -04:00
Alec Jacobson 574ab1a3a8 test needs to be less strict 2022-10-03 11:42:37 -04:00
Richard Liu d6db1cf8c2 lscm: fix order of UV after area term sign fix (#1863)
The fix in #1853 causes the solution UVs to be flipped, so this is a simple fix to that.
2022-10-02 13:47:16 -04:00
Alec Jacobson 3ea7f94809 fix bug when faces don't have markers (#2069) 2022-08-15 09:05:36 -04:00
ubc-nvining 3370a3e9ca Fixes a race condition in the dual contouring code. (#2045)
The previous version of the code would call new_vertex() outside of the mutex, which would trigger a call to resize some std::vector<>s.
This addresses the issue by moving the vertex such that the initialization of ev is contained within the mutex.
2022-06-04 16:03:47 -04:00
Alec Jacobson 33ed4e010b Split mesh non-manifold (and non-orientable) edges and non-manifold vertices (#2047)
* split_nonmanifold following gptoolbox; tests; templates

* connected components should be done on strongly connected adjacency matrix

* clean up templates
2022-05-27 09:53:59 -04:00
Alec Jacobson b4406f2397 fix comment 2022-05-26 23:17:43 -04:00
Alec Jacobson fda700937b fix comment 2022-05-26 21:15:37 -04:00
Alec Jacobson 30019acb17 exact_geodesic: fix bugs, clean up asserts, allow 2D (#2046) 2022-05-26 19:13:19 -04:00
Alec Jacobson 2869f98629 Templates in CGAL module (#2031)
* templates

* attempt to fix windows templates

* attempt to fix windows templates take 2
2022-05-01 19:08:15 -04:00
Alec Jacobson 04f06d7837 point GMPXX_INCLUDE_DIR to locally built gmp (#2030)
* use locally built gmpxx (part of gmp)

* use ignore_package

* reverting to explicitly setting GMP*_INCLUDE_DIR for Windows ❄️

* rm ignore_package(gmpxx); breaks windows
2022-05-01 18:07:44 -04:00
Jérémie Dumas 91f6c503f6 Update glad backend. (#2012) 2022-05-01 11:48:29 -07:00
Alec Jacobson 639378c1f4 Fix 2014 (#2028) 2022-05-01 14:29:47 -04:00
Alec Jacobson dbecea2bc4 cleanup triangulate templates 2022-04-29 19:23:27 -04:00
Alec Jacobson 238a607032 moments of mass (#2027) 2022-04-19 17:48:14 -04:00
Alec Jacobson 4fff4670d3 Update ambient_occlusion.h 2022-04-01 19:28:14 -04:00
Alec Jacobson 1c3d487d8e rm printing from some tests 2022-04-01 13:19:31 -04:00
Alec Jacobson c35f0fee39 eigen → v3.4.0 (#2011)
* eigen -> v3.4.0

* rm problematic template (not used in tutorial or tests)
2022-04-01 12:39:37 -04:00
Alec Jacobson 4498aa8dfc Bump CGAL → Boolean + remesh_*intersections performance boost (#1895)
* bump cgal; parallel remesh; templates; outer*

* more parallel; fewer copies; uE2E→uEC,uEE

* rm spurious warnings leftover from debuggin'

* fix __1; add back many templates

* missing templates

* use CGAL::Epeck::FT in templates directly

* inline to fix header only

* cgal bump requires bumping cmake and boost

* template hell on windows

* fix windows templates to compile on mac os

* fix templates to work on linux

* more template hell; simplify some, use pttr_t, split legacy

* rename legacy fix includes

* fix orientation bug

* missing templates

* abstract templates

* assign overload + templates

* missing templates + missing overload

* merge with main

* special template for windows ❄️
2022-03-31 22:16:05 -04:00
Alec JacobsonandAlec Jacobson e83a560347 Avoid converting exact input to inexact when detecting intersections (#2019)
* Update remesh_self_intersections.cpp

* use epeck when input epeck

* add test case

* missing templates

* special templates for windows ❄️

Co-authored-by: Alec Jacobson <alecjacobson@adobe.com>
2022-03-30 19:28:42 -04:00
Jérémie Dumas 322db89acd Update Windows action. (#2018) 2022-03-28 09:42:06 -04:00
d444bb173f Rework sparse repmat (#1819)
* Add test repmat function

* Rework repmat function

* Add repmat test for colMajor sparse matrices

* derived majorType from params

* missing templates

Co-authored-by: Paul Rötzer <paul@Pauls-MacBook-Pro-2.local>
Co-authored-by: Alec Jacobson <alecjacobson@adobe.com>
Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2022-03-27 14:09:03 -04:00
Alec Jacobson 7174a7ac94 rm DynamicSparseMatrix; rm commented code; fix bug in slice_into; +tests (#2016) 2022-03-27 14:08:39 -04:00
Alec Jacobson 6f1571bacd further split min_quad_with_fixed templates (#2017) 2022-03-27 14:06:14 -04:00
zhuguiqian 85db4b17e3 Update principal_curvature.cpp (#2013)
fix crash
2022-03-27 11:59:06 -04:00
Alec Jacobson 142fd6026a Improved draw_buffer (#2010)
* better doc of ViewerCore::draw_buffer and auto sizing

* draw_buffer at per core level, including depth, templated output
2022-03-27 09:48:35 -04:00
ZhaoMAandAlec Jacobson c98c375270 mod: correct comments in header files. (#2007)
* mod: correct comments in header files.

* Update average_onto_faces.h

Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2022-03-24 22:00:42 -04:00
Kenshi Takayama fc42e420cd test/lscm: fix wrong assertion (#1889) 2022-03-24 21:59:11 -04:00
Jérémie Dumas a95612e2c9 Fix Windows GitHub Actions 2022-03-24 18:15:09 -07:00
Alec Jacobson 5c2aa0bed8 Revert "Revert "templates""
This reverts commit 6a8e81f800.
2022-03-24 20:14:27 -04:00
Alec Jacobson 068a28f431 Revert "eigen -> v3.4.0"
This reverts commit 92f790b48a.
2022-03-24 20:13:47 -04:00
Alec Jacobson 6a8e81f800 Revert "templates"
This reverts commit 3479ca7ab1.
2022-03-24 20:11:58 -04:00
Alec Jacobson 92f790b48a eigen -> v3.4.0 2022-03-24 20:07:35 -04:00
Alec Jacobson 3479ca7ab1 templates 2022-03-24 19:39:56 -04:00
Alec Jacobson f9547b8e56 Compile GMP and MPFR from source (#1985)
* working x86_64 build on M1 mac

* rm comment debris

* link gmp to mpfr to fix link order issue on linux

* organize gmp and mpfr in _deps with others

* rm gmp + mpfr from workflows
2022-03-14 13:19:45 -04:00
Abhishek Madan b7e94cb4a2 Remove hardcoded imgui menu width constraint (#1991) 2022-03-14 13:19:25 -04:00
Alec Jacobson ec72a81b78 use URL to download CGAL source rather than git (#1997) 2022-03-14 13:14:05 -04:00
Alec Jacobson 5da64bcbb5 template 2022-03-10 16:03:41 -05:00
Haoran SUN 69c662b1fa Add +1 offset in writeOBJ for hybrid mesh (#1962)
This would keep the behavior the same as the non-hybrid situation.
2022-02-28 10:47:50 -05:00
Alec Jacobson 9de1784fcf Clean up mesh_boolean templating (#1990)
* better types in ismember; tempaltes

* split ismember -> ismember_rows

* reduce and clean up templates
2022-02-28 10:47:34 -05:00
Alec Jacobson 1f44d1e025 set_data supports #F-long data 2022-02-27 16:09:35 -05:00
Alec Jacobson d474dca3a1 add simple igl::predicates::delaunay_triangulation(V,F) (#1988)
* add simple igl::predicates::delaunay_triangulation(V,F)

* add lexicographic_triangulation, too
2022-02-26 23:34:10 -05:00
Alec Jacobson 1dca5f0fef Minor cleanups in ismember (#1989)
* better types in ismember; tempaltes

* split ismember -> ismember_rows
2022-02-26 23:33:45 -05:00
Alec Jacobson 45a4f79b5e expose edges so that edge markers are actually useful (#1983) 2022-02-24 19:41:18 -05:00
Alec Jacobson 66b3ef2253 use line_color alpha 2022-02-19 16:14:53 -05:00
Alec Jacobson 269700322a rm pesky warning 2022-02-19 16:12:33 -05:00
Alec Jacobson 09e90b47c4 fix comments to relieve warning 2022-02-18 16:44:04 -05:00
Alec Jacobson 19a7487a74 merge 2022-02-18 16:41:18 -05:00
Alec Jacobson 0b5148f646 split file_utils into files matching functions/classes 2022-02-18 16:40:52 -05:00
Alec Jacobson b3294905f4 remove overzealous fclose 2022-02-18 16:24:20 -05:00
Vladimir S. FONOV e91fb2b9e0 Fixes a bug in writePLY introduced in dfda6de04e (#1867)
Addes a test to make sure it works as expected
2022-02-18 13:21:13 -05:00
Taylor Holliday 624b146a4a Header cleanup (#1857)
* remove unused include

* remove unused include

* remove unused include
2022-02-18 13:14:51 -05:00
Vladimir S. FONOV 28a811da5d Fixed incorrect reading of per-face data (#1881) 2022-02-18 13:14:25 -05:00
Alec JacobsonandAlec Jacobson b319a97447 Fix 1913; initialization bug; dimension bug; templates (#1914)
Co-authored-by: Alec Jacobson <alecjacobson@adobe.com>
2022-02-18 13:13:19 -05:00
teseoch cf46c31e8c Fixing label stuff (#1876)
* Update ViewerCore.cpp

* Update ViewerData.h

adding label size

* init label_size
2022-02-18 13:12:27 -05:00
stoperro 6829872b74 Fixed thread unsafe code in marching_cubes.cpp (#1926) 2022-02-18 13:11:35 -05:00
Rahul Arora 4c6966430c Enable parallel_for in Windows (#1900) 2022-02-18 13:07:45 -05:00
Zhongshi 0c5c526817 Update mapping_energy_with_jacobians.cpp (#1940)
Proposed by issue #1904
2022-02-18 13:07:10 -05:00
Zhongshi 60c6357a37 Uninitialized variable (#1852) (#1941) 2022-02-18 13:06:32 -05:00
hanxiao 06ee3b5c1f consistent type deduction (#1942) 2022-02-18 13:05:39 -05:00
Nico 799b54cb61 Update Catch2 to latest version (v2.13.8) (#1972)
The previously used Catch2 version fails to build with glibc>= 2.34.
As MINSIGSTKSZ can no longer be assumed to be constant:
* https://sourceware.org/git/?p=glibc.git;a=commit;h=6c57d320484988e87e446e2e60ce42816bf51d53
* https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html

It's fixed in Catch2 since 2.13.5: https://github.com/catchorg/Catch2/releases/tag/v2.13.5

The upcoming Ubuntu LTS (22.04) will ship with an incompatible glibc version.
2022-02-18 13:03:55 -05:00
martinhathandMartin Hafskjold Thoresen 36cb980cb3 Close files opened by read_triangle_mesh (#1915)
Co-authored-by: Martin Hafskjold Thoresen <git@mht.wtf>
2022-02-18 13:03:22 -05:00
Alec JacobsonandAlec Jacobson 7fe68a3237 Incorporate non-sse functions; compiled and tested on M1 (#1975)
Co-authored-by: Alec Jacobson <alecjacobson@adobe.com>
2022-02-18 00:59:19 -05:00
Alec Jacobson 46a497559d bump embree to 3.13.3 (#1976) 2022-02-17 19:20:17 -05:00
Alec Jacobson 29ac7b213f Fix 1656 ; Introduce ImGuiPlugin with list of ImGuiWidgets (#1973) 2022-02-14 12:37:56 -05:00
Alec Jacobson e19a68cfa6 Bug fix flip_avoiding_line_search.h (#1968)
* Update flip_avoiding_line_search.h

* pass by reference

* use std::function to match reference type

* fix test
2022-02-12 11:46:22 -05:00
Alec Jacobson 10b3cd442e rm _WITH in message 2022-02-12 11:38:40 -05:00
Alec Jacobson 4166366c3b rm _WITH in module switches 2022-02-12 10:35:10 -05:00
Alec Jacobson 5a2180321c Merge branch 'main' of github.com:libigl/libigl into main 2022-02-12 10:31:30 -05:00
Alec Jacobson f8f2c70aee restoring vim/macos debris in gitignore 2022-02-12 10:31:25 -05:00
Jérémie Dumas ce1de2c0db Update github action cache. (#1971) 2022-02-11 18:26:07 -08:00
Alec Jacobson c828ecf4ef rm CORK option + fix prefix 2022-02-11 19:45:22 -05:00
Alec Jacobson f6b88d6d81 prefix in wrong spot for options 2022-02-11 19:42:34 -05:00
Jérémie Dumas 237ffa20b1 Update ImGui to v1.85 + use default include folders. (#1970) 2022-02-11 14:58:58 -08:00
Jérémie Dumas 3e8884d079 Allow igl_include to be used in subprojects. (#1969) 2022-02-10 16:44:52 -08:00
b0fd49d598 CMake refactor (#1805)
* Start CMake refactoring.

* WIP on instlal().

* Handle install + hunter setup.

* Handle module options + igl_include helper.

* Build all tutorials again.

* Update CMake for unit tests.

* Update triangle lib.

* Update Hunter integration.

* Fix for header-only mode.

* Fix Windows compilation + add GMP/MPFR find_package + set VS folders.

* Fix CGAL build.

* Add copy dll for Windows + improve find gmp/mpfr.

* Update Github Actions.

* Update README.

* Fixes for CMake 3.18

* Fix include option.

* Rename libigl_imgui_front to avoid conflicts.

* Fix when disabling unit tests.

* Build imguizmo with C++11.

* Update CMake option comments.

* Rename nonfree -> restricted.

* Update triangle and tetgen versions.

* Fix compilation issue.

* Update continuous.yml

* remove cork

* finding matlab with default

* mosek module compiles; default detected; osx dylib hack

* Reduce build parallelism.

* Fix find GMP/MPFR on Windows + cleanup CGAL changes.

* Update readme.

Co-authored-by: Alec Jacobson <alecjacobson@adobe.com>
Co-authored-by: Alec Jacobson <alecjacobson@gmail.com>
2022-02-09 18:58:40 -08:00
Alec Jacobson 79dc4f6838 Fix https://github.com/libigl/libigl/issues/1946 2022-01-09 15:49:33 -05:00
Jeremie Dumas 54a4e4bafd Fix compilation issues. 2022-01-07 11:53:26 -08:00
Jeremie Dumas dcff572e35 Update CI. 2022-01-05 14:07:32 -08:00
Jeremie Dumas 3f3d186db7 Fix blue noise random shuffle. 2022-01-05 14:07:32 -08:00
Jérémy RIVIEREandJérémy Riviere fc7f4b9941 Modified arap interface to accept Eigen::Map (#1922)
Co-authored-by: Jérémy Riviere <jeremy.riviere@unity3d.com>
2021-12-20 16:45:46 -05:00
Alec Jacobson aa37a39e33 Fix 1924 (#1927) 2021-12-14 16:38:24 -05:00
Alec Jacobson fa94bb27e8 remove spurious asserts 2021-10-16 20:15:41 -04:00
Jérémie Dumas 579dc0e2a7 Delete nightly.yml 2021-09-13 23:46:45 -07:00
Tom Lankhorst dda197248e Typo in stderr message in serialize (#1789)
Something very minor.. but I was searching through the source where the `is not serializable: derive from igl::Serializable or spezialize the template function` message came from by searching for 'specialize'.
2021-07-20 15:19:25 -04:00
ikoruk 7de3ff04fa template embree renderer (#1788) 2021-07-20 15:18:57 -04:00
mat 957dcf32b3 fix bug in read_file_binary(FILE *fp, std::vector<uint8_t> &fileBufferBytes) (#1821)
* fix function read_file_binary.

* fix read_file_binary function.
2021-07-20 15:13:47 -04:00
Kenshi Takayama 2a3af5f5d3 lscm: fix sign for the area term (#1853)
Added an overload where the matrix Q can be returned (used in the test).
2021-07-20 14:59:50 -04:00
Alec Jacobson 96f5386b9a special template for windows 2021-06-21 14:11:45 -04:00
Alec Jacobson e314e83e98 templates 2021-06-20 16:19:43 -04:00
Alec Jacobson 87ed88a955 rm old mosek ref 2021-06-20 16:18:50 -04:00
Alec Jacobson bd411de7db unused header 2021-06-20 16:18:20 -04:00
Alec Jacobson f0657f96bc handle 2d centering 2021-06-20 16:17:56 -04:00
Alec Jacobson b5d4d9b5d0 better tetrahedralize doc 2021-06-20 16:16:47 -04:00
Alec Jacobson a537dc0c45 Merge branch 'main' of https://github.com/libigl/libigl into main 2021-06-20 15:35:55 -04:00
Alec Jacobson c6e4a656cd Merge branch 'master' into main 2021-06-20 15:35:49 -04:00
Alec Jacobson dfda6de04e templates 2021-06-20 15:34:17 -04:00
X.ZhaoMa 7342dbe1f8 delete obsolete func based on: https://github.com/libigl/libigl/issues/1783#issuecomment-845248820 (#1810) 2021-05-26 14:19:57 -04:00
Alec Jacobson 46b9ab8fdb bump tetgen commit hash (#1815)
* bump tetgen commit hash

* bump to merged tetgen hash
2021-05-26 13:57:40 -04:00
Alec Jacobson 61de7603d6 Bumps the triangle version (#1813)
* bump triangle commit hash

* bump again for cmake out of sync
2021-05-26 12:28:05 -04:00
Alec Jacobson e9ff3a9e96 CGAL cdt with triangle's api (#1811)
* CGAL cdt with triangle's api

* special template for windows

* more special tempaltes for windows

* templates; expose cgal kernel

* fix test

* list->queue micro optimization; bool flag; templates

* Update min_size.cpp

special template for windows
2021-05-24 18:29:48 -04:00
Alec JacobsonandJérémie Dumas 2ce04b54fc Update triangle version to C++ lib with exception support. (#1800)
Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2021-05-03 16:33:34 -04:00
Alec Jacobson 2aa80074d9 Update polyhedron_to_mesh.cpp (#1796) 2021-04-27 15:55:33 -04:00
Alec Jacobson c62273ac43 minor changes to selection widget 2021-04-19 19:51:55 -04:00
Alec Jacobson 78c5137453 bug fix 2021-04-19 11:39:38 -04:00
Jérémie Dumas be83a69332 Update github actions. (#1786) 2021-04-13 10:15:01 -07:00
Alec Jacobson 4ba9c8de4e 10-100x speedup on per corner normals + caching adjacency (#1745)
* improve documentation

* 10-100x speed up for per-corner normal computation. Cache adjacency.

* windows confused about templates

* windows error?

* rm commented code

* template for windows

* better documentation
2021-04-12 14:12:08 -04:00
Alec Jacobson bf5607bf99 Improve documentation. 2021-04-10 10:25:09 -04:00
Chao Liandlchaooo aaa89ffcbb Fix the order of principal curvature (#1767)
Co-authored-by: lchaooo <chaoli95nyc@gmail.com>
2021-04-09 12:38:29 -07:00
Jérémie Dumas e287703912 Use igl::default_num_threads in cgal module. (#1768) 2021-03-28 17:17:11 -07:00
Vladimir S. FONOV c37fa050f9 Added double_sided flag to embree renderer (#1765) 2021-03-28 10:42:31 -07:00
Jérémie Dumas 36e8435a2f Fix boost conda failure in nightly build. (#1762) 2021-03-20 15:17:25 -07:00
Li Chenchen 3450b44688 Fix dirty flag for ViewerData::set_labels (#1761) 2021-03-20 09:54:52 -07:00
Jérémie Dumas bf079eb962 Only enable /MP flag for C++ files on Windows. 2021-03-14 14:17:27 -07:00
Spiros Tsalikis 3ff8460324 Replace Eigen::PlainObjectBase with Eigen::MatrixBase for input of ambient_occlusion (#1752) 2021-03-14 14:12:54 -07:00
Jérémie Dumas 51e4207155 Use boost via conda on Windows. (#1748) 2021-03-14 00:59:44 -08:00
Jérémie Dumas b44b9ec895 Fix Cuda compilation issue on Windows. (#1747)
Only propagates /bigobj flag to C++ files, as the option is not
recognized by nvcc.

Fixes #1722
2021-03-09 09:27:58 -08:00
Jérémie Dumas 45f0fd44d5 Split min_quad_with_fixed implementation into separate cpp. (#1746) 2021-03-08 20:00:38 -08:00
Jérémie Dumas b99351efe4 Silence MSVC warning with std::getenv. (#1744) 2021-03-07 21:09:10 -08:00
Jérémie Dumas a21c0e2be0 Update compilation.md 2021-03-03 08:54:32 -08:00
Jérémie Dumas bb929a290a Update README + github actions. 2021-02-28 13:14:25 -08:00
Jérémie Dumas 9f2ae303d4 Fix usage of find_package(OpenGL) on Linux (#1733)
Fixes #1731
2021-02-28 12:57:22 -08:00
Jérémie Dumas e60423e28c Remove smileys. 2021-02-27 13:13:40 -08:00
Jérémie Dumas c96b13b97a Update issue templates to enable discussions. 2021-02-27 13:12:42 -08:00
Jérémie Dumas 7a3af9c851 Use unique filename for unit tests to avoid filesystem race conditions + update github actions for nightly job. 2021-02-25 22:51:01 -08:00
Jérémie Dumas e9ff76d9bb Update nightly.yml 2021-02-23 00:02:39 -08:00
Jérémie Dumas b56f53beff Update nightly.yml 2021-02-22 10:53:55 -08:00
Jérémie Dumas ec9fe116f4 Update libigl.cmake 2021-02-20 16:16:42 -08:00
Alec Jacobson 22620eb925 Merge branch 'dual-contouring' 2021-02-16 16:40:39 -05:00
Alec Jacobson 01086ed865 missing commits 2021-02-16 16:40:01 -05:00
Alec Jacobson ad0f1e6b5b Merge pull request #1716 from libigl/dual-contouring
Dual contouring
2021-02-16 15:50:10 -05:00
Alec Jacobson bdd33218a9 fix re:jdumas' comments on PR 2021-02-16 11:09:33 -05:00
Jérémie Dumas 55f7aa89d9 Update ImGui to 1.81+ (#1723)
Fixes #1669 and #1717
2021-02-16 08:05:30 -08:00
Cheng Chi 38a1235756 Add a separate function to control the default number of threads. (#1684)
The default number of threads for parallel for loops can be controlled
explicitly by the user. Either by calling igl::default_num_thread with a
user-defined thread count before entering any other libigl function, or
by setting the environment variable IGL_NUM_THREADS.
2021-02-15 17:21:22 -08:00
Alec Jacobson 6f0233183d simplify 501 tut; fix viewer bug; generalize 201 2021-02-15 18:18:33 -05:00
Alec Jacobson 00bd753289 Merge branch 'master' into dual-contouring 2021-02-15 17:50:52 -05:00
Alec Jacobson 31a9dff085 Merge branch 'master' of https://github.com/libigl/libigl 2021-02-15 17:49:42 -05:00
Alec Jacobson 822ffc7684 Merge pull request #1704 from BruegelN/fix/viewerdata-set-normals
Fix #1697
2021-02-15 17:02:25 -05:00
Alec Jacobson 5e2c82dbbc Merge branch 'master' of https://github.com/libigl/libigl 2021-02-15 16:49:23 -05:00
Alec Jacobson 747274b792 Merge pull request #1440 from BruegelN/fix-remesh_along_isoline
solve fragmentation issue with remesh_along_isoline (cleaned up)
2021-02-15 16:48:27 -05:00
Jérémie Dumas f73dc5c9f5 Update job name in github actions. (#1721) 2021-02-15 12:47:33 -08:00
Alec Jacobson 2e988bec2e more explicit template args for win 2021-02-15 13:45:32 -05:00
Alec Jacobson a6550e6849 Win needs template args spelled out 2021-02-15 12:57:27 -05:00
Alec Jacobson 233c1027db Win reqs to redefine nn in each lambda 2021-02-15 12:28:47 -05:00
Alec Jacobson f7288d5655 maybe windows gets confused by lambda refs of consts 2021-02-15 11:46:44 -05:00
alecjacobson b36868f15a inline in wrong place 2021-02-15 10:58:10 -05:00
Alec Jacobson 8c4ebeb995 such const 2021-02-14 12:24:31 -05:00
Alec Jacobson 1a9bc50125 templates 2021-02-14 12:21:01 -05:00
alecjacobson 6e81f2555c windows can't figure out nn is const at compile-time 2021-02-08 18:11:14 -05:00
alecjacobson eae92b5060 __1:: and rm stale test 2021-02-08 15:43:15 -05:00
Alec Jacobson 91ae2f6cea missing header 2021-02-08 15:27:14 -05:00
Alec Jacobson 03448998fb missing templates 2021-02-08 15:10:11 -05:00
Alec Jacobson 4d70f145d4 merge 2021-02-08 15:10:01 -05:00
Alec Jacobson c20c12460d Merge pull request #1687 from libigl/sparse-mc
sparse marching cubes in core lib
2021-02-08 14:36:56 -05:00
Alec Jacobson 86042b0085 windows template 2021-02-08 12:42:02 -05:00
Alec Jacobson c371e243da rm headers 2021-02-08 12:07:15 -05:00
Alec Jacobson d85f0c7537 templates 2021-02-08 12:06:31 -05:00
Alec Jacobson 41591d2a49 remove broken full problem version 2021-02-08 12:05:59 -05:00
Alec Jacobson 4d8efa03ad better doc 2021-02-08 12:05:06 -05:00
Alec Jacobson 505cbfa8a6 templates 2021-02-08 12:02:27 -05:00
Alec Jacobson 4e61844f27 version with precomputed grid values 2021-02-08 12:02:09 -05:00
Alec Jacobson f1017e507d linux/windows doesn't like long long i guess 2021-02-08 11:51:13 -05:00
Alec Jacobson bc3f4903e8 no parallel in debug 2021-02-08 11:42:04 -05:00
Alec Jacobson 306e0b5087 templates 2021-02-08 11:41:48 -05:00
Alec Jacobson 24a9d0c804 pull out function despite perf loss 2021-02-08 11:29:34 -05:00
X.ZhaoMa 70d2abaa53 fix: compilation error caused by missing "inline" keyword. (#1709) 2021-01-27 07:43:51 -08:00
Nico Brügel 6083cb3a5d In ViewerData use per_corner() where possible. 2021-01-24 21:51:15 +01:00
Nico Brügel f7f64f6491 If not face-based always use vertex normals for normal VBO 2021-01-24 21:26:39 +01:00
Thibault LESCOAT 780a5fbea5 ImGuiTextEditCallback was renamed/deprecated in Imgui 1.63 (08/2018) 2021-01-06 06:33:07 -08:00
Alec Jacobson ddf6927ca3 templates 2021-01-02 20:10:11 -05:00
Alec Jacobson 7b852d5340 dual contouring (dense/sparse); tutorial 2021-01-02 20:09:56 -05:00
Alec Jacobson 7181b99a01 templates 2021-01-02 20:09:11 -05:00
Alec Jacobson fe72a97bcc missing header 2021-01-02 20:06:55 -05:00
Alec Jacobson 07c5b9c9d3 better messages 2021-01-02 20:05:41 -05:00
Alec Jacobson 516ff49cff quadprog test 2021-01-02 20:04:54 -05:00
Alec Jacobson 87384cf626 quadprog for small dense programs 2021-01-02 20:04:15 -05:00
Alec Jacobson 4d628e75fe sparse_voxel_grid test 2021-01-02 17:50:51 -05:00
Alec Jacobson 44f2e1d8be fix bugs and document better 2021-01-02 17:50:18 -05:00
Alec Jacobson a4791538de templates; fix area bug 2021-01-01 18:49:07 -05:00
Alec Jacobson ef289fe39f polygon mesh support 2021-01-01 18:41:11 -05:00
Alec Jacobson 5a68b6e924 polygon corners test 2021-01-01 18:17:56 -05:00
Alec Jacobson 48c596ba59 print in matlab style +1 for indices 2021-01-01 18:15:56 -05:00
Alec Jacobson 7e31fdd4bb int->Index 2021-01-01 18:14:49 -05:00
Alec Jacobson babf491b69 pure k-gon to corners 2021-01-01 18:14:00 -05:00
Alec Jacobson a0c6750917 add debug routines 2021-01-01 18:12:12 -05:00
Alec Jacobson 61588efa78 rm min_quad_dense 2020-12-30 18:37:26 -05:00
Alec Jacobson cef9c6594f Merge branch 'master' of https://github.com/libigl/libigl 2020-12-30 18:00:18 -05:00
Alec Jacobson 9de4b6640f mv min_quad_dense --> kkt_inverse 2020-12-30 18:00:11 -05:00
Jeremie Dumas 7ebb86734a Update bin output dir on Windows. 2020-12-30 12:22:52 -08:00
alecjacobson 5b7b50c026 cmake bugs 2020-12-28 13:30:58 -05:00
Alec Jacobson 148c5f72fc sparse marching cubes; pull out march-cube impl 2020-12-28 12:55:13 -05:00
Alec Jacobson aafb6870c7 fix strange logical warning 2020-12-27 18:13:05 -05:00
Alec Jacobson 4d026eeef1 Merge pull request #1653 from libigl/polygon-laplacian
polygon laplacian and other polygon functionality
2020-12-22 09:57:36 -05:00
Alec Jacobson ea57dfa2ad guess at fix of windows failure 2020-12-21 21:57:54 -05:00
Alec Jacobson 85120e557e up tut data 2020-12-21 21:31:57 -05:00
Alec Jacobson ad54f2dfe2 int->Index; depreacted pinv; trivial unit test 2020-12-21 19:53:56 -05:00
Alec Jacobson 0ac1d696f8 Merge branch 'master' of https://github.com/libigl/libigl into polygon-laplacian 2020-12-21 19:27:21 -05:00
Alec JacobsonandJérémie Dumas fbfb2d56ad Selection Plugin and Tutorial Entry (#1654)
* Selection Plugin and Tutorial Entry

* rm __1::

* templates; and dont take F as input

* missing template, fix bug

* better commenting

* windows doesn't understand M_PI

* Use ImGui::SetNextWindowSize

Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2020-12-19 15:51:59 -08:00
Jérémie Dumas 858c843971 Fix nightly build + move EmbreeIntersector impl to .cpp (#1674) 2020-12-19 15:51:32 -08:00
Alec Jacobson 723eb8d74d fix readMESH issues; add test (#1679) 2020-12-19 11:09:02 -08:00
Alec Jacobson c60a948e7d remove unused mosek linking in bbw tut 2020-12-15 11:15:25 -05:00
Alec Jacobson ce32c4aa03 Merge pull request #1675 from libigl/mosek-9.2
fix mosek to work with 9.2; fix mosek dynamic link via cmake
2020-12-14 14:21:48 -05:00
Alec Jacobson e7b3e45577 missed __1:: (not in default build) 2020-12-14 14:16:43 -05:00
Alec Jacobson 7be097d585 missed __1:: (not in default build) 2020-12-13 21:09:11 -05:00
alecjacobson c47bb0507b fix compilation 2020-12-13 19:27:58 -05:00
Alec Jacobson b35d97472d fix mosek to work with 9.2; fix mosek dynamic link via cmake 2020-12-13 13:29:22 -05:00
Alec Jacobson 2ea8312e5e use angle brackets for system includes 2020-12-13 13:27:10 -05:00
Alec Jacobson f9b716fdf8 fix warning 2020-12-13 13:22:05 -05:00
Alec Jacobson c608c60a6d merge 2020-12-13 13:21:16 -05:00
Alec Jacobson 7250ea7d91 templates 2020-12-13 13:20:20 -05:00
Vladimir S. FONOV e6482a8a42 Fixed a bug in writePLY, when face properties were doubled and edge properties were dropped (#1673) 2020-12-13 10:02:31 -08:00
Alec Jacobson dbba9ca921 copyleft::marching_cubes -> marching_cubes (#1666)
* copyleft::marching_cubes -> marching_cubes

* restor imguizmo

* fix doc; lambda return type
2020-12-13 10:02:03 -08:00
Jérémie Dumas 225edb47b6 Fix typo + remove cmake warning. 2020-12-08 21:32:37 -08:00
Jérémie Dumas d14ab658df Limit to one linking job at the same time. 2020-12-08 18:45:17 -08:00
Vladimir S. FONOV c7b5d0b6e3 Offscreen meshes rendering using embree (#1652)
* Added simple raytracing renderer which allows off-screen rendering of meshes.
Using embree (already included in libigl). Addresses #1458, #601
Does not depend on OpenGL.
Tutorial example renders `fertility` example with average gaussian curvature field, in 0.1 sec.

* Separated EmbreeDevice

* Changed singleton pattern, updated variable name, removed EmbreeDevice.cpp
2020-12-08 13:26:43 -08:00
Alec Jacobson 21b62c5777 Missing normalization 2020-12-07 09:10:35 -05:00
Zhongshi f06fb13014 missing break in slim (#1641) (#1658) 2020-11-29 09:40:51 -08:00
Alec JacobsonandJérémie Dumas 59b517a4a4 bump embree version; bump sse2 to avx2 (#1648)
* bump embree version; bump sse2 to avx2

* Use default ISA instead.

* better comments

* non degenerate tests

Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2020-11-29 09:40:10 -08:00
Nico efee81b7db Bump GLFW due to an error on macOS with CMake 3.19.0 (#1657) 2020-11-22 16:57:31 -08:00
Alec Jacobson bd30aa03b9 Merge branch 'master' of https://github.com/libigl/libigl 2020-11-22 13:37:11 -05:00
Alec Jacobson 49a0ab8640 templates 2020-11-22 13:37:03 -05:00
Alec Jacobson 6e1ed534ce convenience function for path extensions based on igl::pathinfo 2020-11-22 13:36:49 -05:00
Alec Jacobson 2ea66c3350 comment 2020-11-22 13:35:47 -05:00
Jérémie Dumas a3ba1f24f8 Update nightly.yml 2020-11-22 09:30:11 -08:00
Alec Jacobson 2e05e0f178 pointer bug 2020-11-20 21:13:48 -05:00
Alec Jacobson fbd4ce2399 polygon laplacian and other polygon functionality 2020-11-19 22:00:55 -05:00
Alec Jacobson 6cde8347be visible toggle for plugin 2020-11-19 10:01:24 -05:00
Jérémie Dumas 645718cf77 Update continuous.yml 2020-11-18 11:25:09 -08:00
Jérémie Dumas a956dfd37d Set env for nightly job. (#1651) 2020-11-18 10:15:42 -08:00
Jérémie Dumas 682e4b9685 Update github actions. (#1649) 2020-11-14 18:19:03 -08:00
Alec Jacobson 69b0eccb15 template 2020-11-14 15:56:27 -05:00
Alec Jacobson 03e14c609f note in .h 2020-11-14 13:25:27 -05:00
Alec Jacobson 782b7fc95d Merge branch 'master' of https://github.com/libigl/libigl 2020-11-14 13:24:52 -05:00
Alec Jacobson 55817544c2 reformat and fix crashing bugs 2020-11-14 13:24:48 -05:00
Alec Jacobson 0bb27beb88 Merge pull request #1645 from libigl/msh-in-read_triangle_mesh
support msh in read_triangle_mesh
2020-11-07 13:28:22 -05:00
Alec Jacobson dbec07d9f5 Merge pull request #1646 from libigl/matcap-tutorial
tutorial entry for matcap
2020-11-07 13:27:57 -05:00
Alec Jacobson 80711ea630 fix comment formatting causing warnings 2020-11-07 10:57:37 -05:00
Alec Jacobson c744410fe1 Merge branch 'master' of https://github.com/libigl/libigl 2020-11-07 10:56:53 -05:00
Alec Jacobson e706cc5b8b bug fix: xml::write_triangle_mesh now uses fe, too 2020-11-07 10:56:48 -05:00
Alec Jacobson 7ed7b06696 tutorial entry for matcap 2020-11-07 10:55:04 -05:00
Alec Jacobson be9b795a16 support msh in read_triangle_mesh 2020-11-07 10:49:09 -05:00
Alec Jacobson 0264736ed3 Merge pull request #1644 from HTDerekLiu/master
Update per_vertex_point_to_plane_quadrics.cpp
2020-11-05 15:17:08 -05:00
Hsueh-Ti Derek Liu a8a1216363 Update per_vertex_point_to_plane_quadrics.cpp
change boundary weight from length to length squared so that it has the same unit as face_quadric
2020-11-05 14:35:10 -05:00
Fabien Péan fb3bd3571e Update writeDAE.cpp (#1642)
Remove ambiguity (on windows) by using qualified calls everywhere.
Remove error with newer version of tinyxml2 which does not have XML_NO_ERROR
2020-11-03 15:45:05 -08:00
Fabien Péan d2bc41e99b Update orientable_patches.cpp (#1640)
Add a pair of explicit template instantiation for case where F is of type Eigen::MatrixX3i (i.e. Eigen::Matrix<int,Eigen::Dynamic,3>)
2020-11-03 15:32:25 -08:00
Kazutaka Nakashima 0a92f2cdb2 Fix bug in readSTL (#1638)
* Fix bug in readSTL

reset the position of the current character in the input

* Move seekg into the inside of if ... else ... block
2020-11-02 15:30:11 -08:00
Alec Jacobson 870eb14ec2 Update repdiag.cpp 2020-11-02 16:56:46 -05:00
Jérémie Dumas 1e905cba3d Update STL reader. (#1628)
* Update STL reader.

* Constexpr stuff.
2020-10-26 21:27:17 -07:00
Alec Jacobson 0e4e79f464 Merge pull request #1630 from daviesthomas/master
Signing distances with Fast Winding Number
2020-10-21 12:36:59 -04:00
Nico Brügel a2a1479a88 Use new gitlab remote to clone eigen. 2020-10-18 12:43:09 -07:00
Thomas Davies 51b3f7093a remove old comment 2020-10-18 12:56:03 -04:00
Thomas Davies 249f37af52 Merge remote-tracking branch 'upstream/master' into master 2020-10-18 11:19:12 -04:00
Thomas Davies 63b3669a87 test update... 2020-10-18 10:56:56 -04:00
Thomas Davies 9814e81b4b update tutorial with FWN signing option 2020-10-18 10:32:59 -04:00
Thomas Davies c21ad49c38 missing template 2020-10-18 10:04:36 -04:00
Camilo Talero d69073c329 Deletes print statement in the exact_geodesics method (#1625)
The print statement is always called, which affects debugging output of
calling libraries.
2020-10-18 00:20:47 -07:00
Alec Jacobson 8b5b424e8c fix warning (#1627) 2020-10-18 00:20:05 -07:00
Jérémie Dumas 1b745f81ed Update compiler version in github actions. (#1629) 2020-10-17 14:00:21 -07:00
Alec Jacobson fa7eb0befb Merge branch 'master' of https://github.com/libigl/libigl 2020-10-16 10:07:51 -04:00
Alec Jacobson 10c90309a8 note 2020-10-16 10:07:48 -04:00
Jérémie Dumas 062e3823c3 Make file encoding option an enum. (#1619) 2020-10-04 00:18:25 -07:00
Jérémie Dumas 7b4a19da9d Update blue_noise.cpp 2020-09-27 10:55:24 -07:00
8c95d1044e Added improved .msh reader/writer + tests + example (#1578)
* Added improved .msh reader/writer + tests + example,
with fixes proposed by @qnzhou
put append_mat_to_vec into igl::internal

* Update tutorial number.

* Changed tutorial code to use example from https://github.com/libigl/libigl-tutorial-data/pull/1 and flat shading

* Remove commented code.

* Rename tutorial number + update tutorial data.

Co-authored-by: Jérémie Dumas <jdumas@users.noreply.github.com>
Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2020-09-27 10:40:29 -07:00
Jérémie Dumas 9a1ab67df9 Fix bug in random_point_on_mesh + crash with blue_noise on Windows. 2020-09-27 10:35:58 -07:00
Alec Jacobson 9921615af2 Merge pull request #1618 from libigl/ImGuizmo-simplify
move ImGuizmo tutorial into plugin; simplify and isolate
2020-09-27 11:53:07 -04:00
Oded Stein 8ea0b8c6dc Added vector Dirichlet and curved Hessian functionality (#1560)
* Added vector Dirichlet and curved Hessian functionality, as well as tutorials.

* Applied jdumas changes

* added github actions for this branch

* more jdumas changes

* Changed int to appropriate scalar

* moved around Int definition

* forgot braces somewhere

* forgot braces

* Applied changes suggested by jdumas

* forgot braces

* remove custom github workflow
2020-09-26 20:06:26 -07:00
Alec Jacobson d9864be29e move ImGuizmo tutorial into plugin; simplify and isolate 2020-09-26 15:59:28 -04:00
Alec Jacobson 28008528b4 Merge branch 'master' of https://github.com/libigl/libigl 2020-09-25 23:45:12 -04:00
Alec Jacobson 1ad4556268 fix minor issues with 109 2020-09-25 23:45:06 -04:00
Thomas Davies 35ba62b1a0 remove redundant templates 2020-09-25 23:36:46 -04:00
Thomas Davies ec24dccc29 add test case 2020-09-25 23:34:24 -04:00
Thomas Davies 1fda040670 3D only for signing with fwn 2020-09-25 23:34:06 -04:00
Thomas Davies 9bc3ffd98f Merge remote-tracking branch 'upstream/master' 2020-09-25 21:45:24 -04:00
Nico af8944c7b6 Remove deprecated functions (#1610)
* removed deprecated igl::internal_angles_using_edge_lengths()

* removed deprecated igl::is_border_vertex(V,F) and correct its templates

* removed deprecated igl::all_edges()
2020-09-20 23:21:28 -07:00
J.M. Soorya Narayan 3856ea92ce Add Kelvinlet deformations (#1614)
* Make igl::PI constexpr

* Fix typo in unproject_onto_mesh

* Add kelvinlets implementation

* Add a tutorial entry for kelvinlets
2020-09-20 23:19:24 -07:00
Alec Jacobson 91faf24015 rm buggy reserve 2020-09-18 19:25:43 -04:00
Alec Jacobson 28ab0d11de Merge pull request #1617 from libigl/blkdiag
blkdiag function
2020-09-18 16:21:53 -04:00
Alec Jacobson 5358cc5a36 __1:: 2020-09-18 14:59:15 -04:00
Alec Jacobson 775f2354fa blkdiag function 2020-09-18 14:21:20 -04:00
Alec Jacobson 9c49b73ade Merge pull request #1597 from libigl/blue-noise
Blue noise sampling on triangle meshes
2020-09-17 10:06:43 -04:00
Alec Jacobson d2a4b51e1e better doc 2020-09-16 22:27:36 -04:00
Alec Jacobson e608aad744 fix names 2020-09-16 22:26:02 -04:00
Alec Jacobson 10d2f75572 merge 2020-09-16 22:16:51 -04:00
Alec Jacobson a22ed58dc4 fix indentation 2020-09-16 22:09:07 -04:00
Alec Jacobson 4cb640737e Merge branch 'master' of https://github.com/libigl/libigl 2020-09-16 22:08:03 -04:00
Alec Jacobson 86c7c7db2e templates 2020-09-16 22:07:58 -04:00
Michael TaoandJérémie Dumas 21acee15fe making knn and octree work on more types than double, allowing knn to do nearest neighbor searches between two different point clouds (#1313)
removing a capture issue with gcc 4.8.4 in knn

Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2020-09-08 07:29:12 -07:00
Jérémie Dumas eef47fe34c Merge pull request #1608 from ShuangLiu1992/patch-3
Update LibiglDownloadExternal.cmake
2020-09-07 18:49:17 -07:00
ShuangLiu1992 92dd81bb5d Update LibiglDownloadExternal.cmake
https://github.com/libigl/CoMISo/commit/d60aa4759fba76b0b793b1efb090b7a771dd7c56
2020-09-07 17:27:20 -07:00
Jérémie Dumas b42cfeba49 Merge pull request #1558 from libigl/rm-remove_duplicates
rm obsolete, poor performance, and ironically duplicate function
2020-09-07 17:11:51 -07:00
Jérémie Dumas 317f0522a8 Apt update. 2020-09-07 17:00:05 -07:00
Alec Jacobson b582ecada9 Merge pull request #1596 from libigl/rm-barycentric_to_global
rm strange function, not in use
2020-09-04 10:31:15 -04:00
Alec Jacobson bae087d7eb Merge pull request #1603 from libigl/fix-epsilon
Clarify, fix bug in epsilon parameter in remove_duplicate_vertices
2020-09-04 10:30:51 -04:00
Alec Jacobson f7067c69e9 Clarify, fix bug in epsilon parameter in remove_duplicate_vertices 2020-09-03 11:22:18 -04:00
Alec Jacobson 7db28d5700 M_PI -> igl::PI 2020-08-23 18:04:09 -04:00
Alec Jacobson 43da16bbd0 tighter test 2020-08-23 17:35:17 -04:00
Alec Jacobson 1de2627280 tests 2020-08-23 17:32:21 -04:00
Alec Jacobson c183f419e7 Merge pull request #1594 from libigl/rm-bin
rm _bin from names and use bin dir instead
2020-08-23 17:23:21 -04:00
Alec Jacobson 20924d62f1 blue noise tutorial entry 2020-08-23 16:49:34 -04:00
Alec Jacobson 48051bc889 rm strange function, not in use 2020-08-23 16:11:21 -04:00
Jérémie Dumas cb59839742 Update CMakeLists.txt 2020-08-22 13:39:40 -07:00
Alec Jacobson 4a22178717 rm _bin from names and use bin dir instead 2020-08-22 16:15:12 -04:00
Jérémie Dumas 97bd52fb52 Merge pull request #1590 from jiangzhongshi/master
move scaf to triangle folder
2020-08-22 11:12:14 -07:00
Alec Jacobson c61e28fe5a Update ViewerData.h 2020-08-21 19:47:24 -04:00
Zhongshi 07e2b01a3c move scaf to triangle folder 2020-08-17 21:16:16 -04:00
Alec Jacobson 41454f823d fix decimate bug 2020-08-15 19:49:24 -04:00
Alec Jacobson 1a4ccf65b7 Merge pull request #1554 from libigl/decimate-performance-optimization
Decimate performance optimization
2020-08-11 11:15:32 -05:00
michelleandJérémie Dumas 98a1a31641 ImGuizmo Integration (#1568)
* First working version to automatically clone ImGuizmo into libigl

* Corresponding changes to cmake files

* Moved contents of slicing plugin and menu extra to new file ImGuizmoMenu in imgui directory of igl

* Moved slicing plug into main, and ImGuizmo::EditTransform into ImGuizmoMenu which resides in igl

* Temporary hid Local and World options because they don't do anything and refactored main for tutorial 109 for clarity with some documentation

* Got orthogonal projection to render ImGuizmo normally

* Removed unecessary changes

* Removed snap parameter from ImGuizmo menu

* Added a cmake configuration for ImGuizmo

* Include imgui library in building ImGuizmo target

* Added a workflow

* Added this branch to workflow

* Update linux packages

* Explicitly include imgui header for imguizmo

* Just copy in relevant imguizmo files for now as opposed to through cmake since ImGuizmo repo does not have its own CMake file

* Conditional include to prevent mac build from failing

* Revert files for debugging cmake build

* Added build target for ImGuizmo

* Expose Imgui lib to ImGuizmo with PUBLIC interface

* Refactor build

* Get older SHA1 commit to avoid break on macOS

* Change imguizmo menu namespace

* Cleaning up + fix window border size issue.

Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2020-08-10 12:00:07 -07:00
Alec Jacobson dde868d297 Merge branch 'master' of https://github.com/libigl/libigl 2020-08-09 18:00:39 -05:00
Alec Jacobson 3b80edbd7c search for mosek more 2020-08-09 18:00:29 -05:00
Alec Jacobson 7be8dc32af bump matlab versions 2020-08-09 18:00:06 -05:00
Vladimir S. FONOVandJérémie Dumas abd9f0f365 Fixed writing PLY file, when coordinates are stored as floats (#1581)
* Fixed writing PLY file, when coordinates are stored as floats

* Fix compilation.

Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2020-08-09 15:55:28 -07:00
michelleandJérémie Dumas b8ee8b99cf Text Rendering Using GLSL in ImGui Menu (#1549)
* This is the code that renders the letter a for each vertex on the mesh paired with  a libigl-example-project

* Code for rendering just the number 12 on the 12th vertex

* Rendering vertices via glsl works, with geometry shader

* Added dynamic font scaling so accomodate ortho and perspective projections.

* Got faceids rendering

* Code cleanup

* This allows user to add custom text at some location rendered with the text shaders

* Dedicated separate VBOs for face and vertid labels

* Added in extra label rendering

* Moved texture binding to its own function and other code cleanup

* More conflict resolution when fetching upstream changes

* Resolved the relative path to font atlas

* Change scope variable for font atlas macro

* Removed PNG texture loaded from disk, and encoded font atlas into byte array. Other minor changes for VBO iterators and removed uneeded dependencies from previous commits

* Encapsulated text VBOs into struct to remove code duplication, and fixed bug for both overlay and text shaders being used at same time.

* Remove whitespace

* Tentative for Windows build fix not initializing TextGL structs in header

* Removed uniform that only belongs for text labels

* Added init and free methods for label buffers initialization and passing some args by reference on label methods

* Compressed font atlas that is under 50kB reduced from 330kB with decompression function

* Converting type from string literal to char array

* Broke up string literal

* Cleanup font atlas.

* Linux compile fix.

* Remove deprecated text pipeline.

Co-authored-by: Jérémie Dumas <jeremie.dumas@ens-lyon.org>
2020-08-09 15:49:22 -07:00
teseoch 45cfc79fed Viewer crash after calling clear (#1582)
missing check for empty uv similar to line 747
2020-08-07 10:04:45 -04:00
Patrick SchmidtandPatrick Schmidt 015ac35cd1 SCAF: Expose linear system to be solved by user code (#1553)
* Add const qualifiers

* Add scaf_system() and expose scaf::compute_energy()

* Add test "scaf_system"

Co-authored-by: Patrick Schmidt <patrick.schmidt@cs.rwth-aachen.de>
2020-07-06 07:36:59 -07:00
Alec Jacobson d95f3a410f stupid __1 junk 2020-06-30 14:26:07 -04:00
Alec Jacobson 3a110bbf4d rm obsolete, poor performance, and ironically duplicate function 2020-06-30 12:46:28 -04:00
Alec Jacobson ac56a694f2 return # comps 2020-06-30 10:43:29 -04:00
Alec Jacobson a3c3ef1572 update test too 2020-06-30 10:42:50 -04:00
Alec Jacobson b03769f26e template issue 2020-06-30 10:27:35 -04:00
Alec Jacobson 1b53e54815 rm F, dense W 2020-06-30 10:19:10 -04:00
Alec Jacobson d22414e388 func -> callback, always_... -> trivial 2020-06-29 12:10:10 -04:00
Alec Jacobson 005ae90b67 better name for always try never care defaults 2020-06-28 11:25:29 -04:00
Alec Jacobson 39c7d33b4c missing includes/templates 2020-06-27 21:17:35 -04:00
Alec Jacobson 61834f4fa1 separate header for header-only mode circular deps 2020-06-27 21:02:19 -04:00
Alec Jacobson d3248f0a0f performance improvements for decimate 2020-06-27 20:43:55 -04:00
Alec Jacobson 7ee863c92f 'using' to define function handle types 2020-06-27 17:09:36 -04:00
Alec Jacobson 58a600aebf Merge branch 'master' of https://github.com/libigl/libigl 2020-06-25 15:21:25 -04:00
Alec Jacobson 95a7b15efc Merge branch 'Dxyk-direct-delta-mush' 2020-06-25 15:21:15 -04:00
Alec Jacobson ae5d163f7d elephant data 2020-06-25 15:19:46 -04:00
Dxyk 8268a3f33b direct delta mush build fix 2020-06-22 17:57:52 -04:00
Dxyk e4ab356031 direct delta mush review fix and unit test 2020-06-22 17:26:11 -04:00
michelle 762a4ec1f4 ImGui Update to v1.76 (#1545) 2020-06-14 20:17:59 -07:00
DarioSamo 238d52c90f Address memory heap corruption on Windows open dialog on long filenames (#1544)
fixes #1513
2020-06-14 17:14:16 -07:00
Jérémie Dumas 1e78a3473a Merge pull request #1546 from DarioSamo/tutorial-patch
Add 719_ExplodedView to tutorials folder.
2020-06-12 18:25:55 -07:00
Dario 3b0ec3ce63 Add 719_ExplodedView to tutorials folder. 2020-06-12 20:13:01 -03:00
Alec Jacobson d22f873ef2 missing template 2020-06-11 12:04:14 -04:00
Dxyk ce201a7433 direct delta mush implicit method 2020-06-09 18:12:52 -04:00
Jérémie Dumas 48a7e8cd02 Merge pull request #1538 from bbrrck/master
Fix compilation error with Eigen 3.3+
2020-06-05 07:20:41 -07:00
Dxyk feb71ef502 direct delta mush fix build 2020-06-04 18:56:36 -04:00
Dxyk dc01d7e277 Merge branch 'master' of https://github.com/libigl/libigl into direct-delta-mush 2020-06-04 18:11:43 -04:00
Dxyk 75a0c4fa2c direct delta mush bug fixes 2020-06-04 18:10:58 -04:00
teseoch 60ffe1b0dc Python (#1453)
fixing templates for python bindings.
2020-06-04 12:49:06 -04:00
Tibor Stanko 0b52794637 Fix compilation error with Eigen 3.3+
Fixes the error "incompatible operand types" when libigl is compiled with Eigen 3.3+.
2020-06-04 11:50:49 +02:00
Dxyk 71e65516ae use 10 floats 2020-05-30 20:27:40 -04:00
Dxyk 3f67752504 update diagonal inverse 2020-05-28 21:37:30 -04:00
Dxyk 95a80d3fa9 computation done 2020-05-27 16:04:58 -04:00
Dxyk 5f72004d0d precomputation assert 2020-05-26 14:23:34 -04:00
Dxyk b0a8fa84e1 Merge branch 'master' of https://github.com/libigl/libigl into direct-delta-mush 2020-05-25 15:13:58 -04:00
Dxyk 162f9b8f68 precomputation done 2020-05-25 15:13:43 -04:00
Jérémie Dumas 32e3edf229 Merge pull request #1525 from bvoq/patch-1
Fixed load_mesh for obj
2020-05-24 09:32:56 -07:00
Zhongshi f3a201f1e1 Update heat_geodesics.cpp (#1512)
* Update heat_geodesics.cpp

* heat geodesic upsampled cube unit test
2020-05-24 09:31:16 -07:00
Dxyk 916a5c217d precomputation without vector form 2020-05-21 22:53:14 -04:00
Dxyk 3141dfc26d precomputation - W 2020-05-21 15:34:35 -04:00
Kevin De Keyser 14d6bcec3d Fixed load_mesh for obj 2020-05-21 17:06:13 +02:00
Dxyk 6eb02be7db direct delta mush tutorial 2020-05-19 16:21:42 -04:00
Thomas 3da9d323fb Merge pull request #1 from daviesthomas/fast_winding_signed_distance
Fast winding signed distance
2020-05-18 11:32:48 -04:00
Zhongshi c7324d3fa6 Update remove_duplicate_vertices.h (#1514) 2020-05-17 19:29:33 -07:00
Dxyk ae903ae468 direct delta mush init 2020-05-17 14:05:58 -04:00
Jérémie Dumas 3069260f07 Update README.md 2020-05-15 17:46:01 -07:00
Kenneth BlomqvistandJérémie Dumas 1df0987271 Fix issue with dijkstra algorithm (#1497)
* Use ::max vs ::infinity in dijkstra

* Add test case for discrete dijkstra distances

* Update dijkstra.cpp

* Explicit template instantiation for dijkstra test

Co-authored-by: Jérémie Dumas <jdumas@users.noreply.github.com>
2020-05-14 07:39:36 -07:00
Alec Jacobson ce9b23e8b9 Merge pull request #1510 from libigl/exploded-view
exploded view of tetrahedral meshes
2020-05-08 12:13:39 -04:00
Nico Brügel 3150c23b62 RM load_mesh and use igl::read_triangle_mesh() and test_common::data_path() in test for remesh_along_isoline as per https://github.com/libigl/libigl/pull/1365 2020-04-09 00:28:22 +02:00
Kazutaka Nakashima 2d7037a945 add test for remesh_along_isoline 2020-04-09 00:28:22 +02:00
Kazutaka Nakashima 7ed138a23e fix explicit template instantiation 2020-04-09 00:28:22 +02:00
Kazutaka Nakashima 75540e118f add #include <unordered_map> (Tank you for comment from @BruegelN) 2020-04-09 00:28:22 +02:00
Kazutaka Nakashima 49afe670d0 Solve fragmentation issue with remesh_along_isoline 2020-04-09 00:28:22 +02:00
Thomas Davies e2548f971c python bindings for signed_distance with fast_winding_number 2019-10-24 13:06:24 -04:00
Thomas Davies 6983cfd1f4 explicit templating 2019-10-24 11:06:01 -04:00
Thomas Davies 2f570a0e97 signed distance from pre computed fast winding number bvh 2019-10-21 13:02:49 -04:00
Thomas Davies edb21bef2c rename fast winding tree for clarity 2019-10-21 10:11:33 -04:00
Thomas Davies 48e3c72dfe fast winding number signed distance function
added dedicted functions to fast winding number for fast inference from pre computed AABB tree and BVH
2019-10-21 10:09:54 -04:00
Thomas Davies d7dd3c2356 expose fast winding in python bindings 2019-10-19 11:42:31 -04:00
Thomas Davies 61878ade62 fast winding for signing distance 2019-10-14 18:45:08 -04:00
Thomas Davies 3404ee671b fast winding number computation of single point 2019-10-13 21:32:35 -04:00
Thomas Davies 21d95881ed Merge branch 'fast-winding-number-soups' of https://github.com/daviesthomas/libigl 2019-10-12 10:45:03 -04:00
1374 changed files with 55634 additions and 32322 deletions
+20
View File
@@ -0,0 +1,20 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.tex text
*.bib text
*.svg text
*.py text
*.vbs text
*.cpp text
*.hpp text
Makefile text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
+5 -4
View File
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help us improve
name: 🐛 Bug Report
about: If something isn't working as expected
title: ''
labels: bug, pending verification
assignees: ''
@@ -8,10 +8,11 @@ assignees: ''
---
#### Describe the bug
<!-- A clear and concise description of what the bug is. -->
A clear and concise description of what the bug is.
#### Platform
<!-- Check all that apply (change to `[x]`) -->
#### Check all that apply (change to `[x]`)
- [ ] Windows
- [ ] macOS
- [ ] Linux
+14 -5
View File
@@ -1,5 +1,5 @@
---
name: Compilation issue
name: 😱 Compilation issue
about: Report a problem when compiling the code
title: ''
labels: 'compilation'
@@ -7,11 +7,20 @@ assignees: ''
---
#### Describe your question
#### Describe your issue
<!-- Be sure to include any log file that may help use diagnose the issue -->
...
#### Check all that apply (change to `[x]`)
#### Checklist
<!-- Check all that apply (change to `[x]`) -->
- [ ] I have read the [bug report](https://libigl.github.io/bug-report/) page
- [ ] CMake issue: I have tried with a fresh clone/empty build directory
#### Platform
<!-- Check all that apply (change to `[x]`) -->
- [ ] Windows
- [ ] macOS
- [ ] macOS Intel
- [ ] macOS Arm (e.g., M1, M2)
- [ ] Linux
+7
View File
@@ -1 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 🚀 Feature Request
url: https://github.com/libigl/libigl/discussions/new?category_id=32617689
about: Share ideas for new features
- name: ❓ Ask a Question
url: https://github.com/libigl/libigl/discussions/new?category_id=32617688
about: Ask the community for help
-17
View File
@@ -1,17 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'
assignees: ''
---
#### Describe your feature request
...
#### Check all that apply (change to `[x]`)
- [ ] Windows
- [ ] macOS
- [ ] Linux
-17
View File
@@ -1,17 +0,0 @@
---
name: Question
about: Ask question about the tutorial or documentation
title: ''
labels: 'question'
assignees: ''
---
#### Describe your question
...
#### Check all that apply (change to `[x]`)
- [ ] Windows
- [ ] macOS
- [ ] Linux
+4 -2
View File
@@ -1,9 +1,11 @@
Fixes # .
[Describe your changes and what you've already done to test it.]
<!-- Describe your changes and what you've already done to test it. -->
#### Check all that apply (change to `[x]`)
#### Checklist
<!-- Check all that apply (change to `[x]`) -->
- [ ] All changes meet [libigl style-guidelines](https://libigl.github.io/style-guidelines/).
- [ ] Adds new .cpp file.
- [ ] Adds corresponding unit test.
+65 -49
View File
@@ -3,11 +3,11 @@ name: Build
on:
push:
branches:
- master
- main
- stable
pull_request:
branches:
- master
- main
- stable
env:
@@ -20,21 +20,16 @@ jobs:
####################
Unix:
name: ${{ matrix.name }} (${{ matrix.config }}, ${{ matrix.static }})
name: ${{ matrix.os }} ${{ fromJSON('["Header-Only", "Static"]')[matrix.build-params.static == 'ON'] }} ${{ matrix.build-params.tutorials == 'ON' && 'tutorial' || ''}} ${{ matrix.build-params.tests == 'ON' && 'tests' || ''}} ${{ matrix.config }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-latest]
os: [ubuntu-20.04, macos-latest]
config: [Release]
static: [ON, OFF]
include:
- os: macos-latest
name: macOS
- os: ubuntu-18.04
name: Linux
build-params: [ {static: ON, tutorials: ON, tests: ON }, {static: OFF, tutorials: OFF, tests: ON }, {static: OFF, tutorials: ON, tests: OFF }]
env:
LIBIGL_NUM_THREADS: 1 # See https://github.com/libigl/libigl/pull/996
IGL_NUM_THREADS: 1 # See https://github.com/libigl/libigl/pull/996
steps:
- name: Checkout repository
uses: actions/checkout@v1
@@ -44,27 +39,25 @@ jobs:
- name: Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install \
libblas-dev \
libboost-filesystem-dev \
libboost-system-dev \
libboost-thread-dev \
libglu1-mesa-dev \
liblapack-dev \
libmpfr-dev \
xorg-dev \
ccache
libblas-dev \
libglu1-mesa-dev \
liblapack-dev \
xorg-dev \
ccache
- name: Dependencies (macOS)
if: runner.os == 'macOS'
run: brew install boost gmp mpfr ccache
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
- name: Cache Build
id: cache-build
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.static }}-cache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.build-params.static }}-cache
- name: Prepare ccache
run: |
@@ -78,9 +71,11 @@ jobs:
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} \
-DLIBIGL_WITH_CGAL=ON \
-DLIBIGL_WITH_COMISO=ON
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.build-params.static }} \
-DLIBIGL_BUILD_TUTORIALS=${{ matrix.build-params.tutorials }} \
-DLIBIGL_GLFW_TESTS=OFF \
-DLIBIGL_BUILD_TESTS=${{ matrix.build-params.tests }} \
-DLIBIGL_COPYLEFT_CGAL=ON
- name: Build
run: cd build; make -j2; ccache --show-stats
@@ -93,57 +88,78 @@ jobs:
####################
Windows:
runs-on: windows-2019
env:
CC: cl.exe
CXX: cl.exe
name: Windows ${{ fromJSON('["Header-Only", "Static"]')[matrix.build-params.static == 'ON'] }} ${{ matrix.build-params.tutorials == 'ON' && 'tutorial' || ''}} ${{ matrix.build-params.selected_tutorial != 'NONE' && matrix.build-params.selected_tutorial || '' }} ${{ matrix.build-params.tests == 'ON' && 'tests' || ''}} ${{ matrix.config }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
config: [Release]
static: [ON, OFF]
build-params: [
{static: ON, tutorials: ON, tests: ON, selected_tutorial: NONE},
{static: OFF, tutorials: OFF, tests: ON, selected_tutorial: NONE},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 1},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 2},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 3},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 4},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 5},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 6},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 7},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 8},
{static: OFF, tutorials: ON, tests: OFF, selected_tutorial: 9},
]
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 10
- uses: seanmiddleditch/gha-setup-ninja@master
# https://github.com/actions/cache/issues/101
- name: Set env
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Set env variable for sccache
run: |
echo "::set-env name=appdata::$($env:LOCALAPPDATA)"
echo "::set-env name=BOOST_ROOT::$env:BOOST_ROOT_1_69_0"
echo "appdata=$env:LOCALAPPDATA" >> ${env:GITHUB_ENV}
- name: Cache build
id: cache-build
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ env.appdata }}\Mozilla\sccache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.static }}-cache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.build-params.static }}-cache
- name: Prepare sccache
run: |
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
iwr -useb 'https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1' -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop install sccache --global
# Scoop modifies the PATH so we make the modified PATH global.
echo "::set-env name=PATH::$env:PATH"
# Scoop modifies the PATH so we make it available for the next steps of the job
echo "${env:PATH}" >> ${env:GITHUB_PATH}
# We run configure + build in the same step, since they both need to call VsDevCmd
# Also, cmd uses ^ to break commands into multiple lines (in powershell this is `)
- name: Configure and build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} ^
-DLIBIGL_WITH_CGAL=ON ^
-DLIBIGL_WITH_COMISO=OFF ^
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.build-params.static }} ^
-DLIBIGL_COPYLEFT_CGAL=ON ^
-DLIBIGL_BUILD_TUTORIALS=${{ matrix.build-params.tutorials }} ^
-DLIBIGL_BUILD_TESTS=${{ matrix.build-params.tests }} ^
-DLIBIGL_GLFW_TESTS=OFF ^
-DLIBIGL_TUTORIALS_CHAPTER1=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '1') && 'ON' || 'OFF' }} ^
-DLIBIGL_TUTORIALS_CHAPTER2=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '2') && 'ON' || 'OFF' }} ^
-DLIBIGL_TUTORIALS_CHAPTER3=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '3') && 'ON' || 'OFF' }} ^
-DLIBIGL_TUTORIALS_CHAPTER4=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '4') && 'ON' || 'OFF' }} ^
-DLIBIGL_TUTORIALS_CHAPTER5=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '5') && 'ON' || 'OFF' }} ^
-DLIBIGL_TUTORIALS_CHAPTER6=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '6') && 'ON' || 'OFF' }} ^
-DLIBIGL_TUTORIALS_CHAPTER7=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '7') && 'ON' || 'OFF' }} ^
-DLIBIGL_TUTORIALS_CHAPTER8=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '8') && 'ON' || 'OFF' }} ^
-DLIBIGL_TUTORIALS_CHAPTER9=${{ (matrix.build-params.selected_tutorial == 'NONE' || matrix.build-params.selected_tutorial == '9') && 'ON' || 'OFF' }} ^
-B build ^
-S .
cmake --build build
cmake --build build -j2
- name: Tests
run: cd build; ctest --verbose
run: cd build; ctest --verbose -j2
-190
View File
@@ -1,190 +0,0 @@
name: Nightly
on:
schedule:
- cron: '0 4 * * *'
env:
CTEST_OUTPUT_ON_FAILURE: ON
CTEST_PARALLEL_LEVEL: 2
jobs:
####################
# Linux / macOS
####################
# Part of this file is inspired from
# https://github.com/onqtam/doctest/blob/dev/.github/workflows/main.yml
Unix:
name: ${{ matrix.name }} (${{ matrix.config }}, Static=${{ matrix.static }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
name: [
ubuntu-18.04-gcc-7,
ubuntu-18.04-gcc-8,
ubuntu-18.04-gcc-9,
ubuntu-18.04-clang-7,
ubuntu-18.04-clang-8,
ubuntu-18.04-clang-9,
macOS-latest,
]
config: [Debug, Release]
static: [ON, OFF]
include:
- name: ubuntu-18.04-gcc-7
os: ubuntu-18.04
compiler: gcc
version: "7"
- name: ubuntu-18.04-gcc-8
os: ubuntu-18.04
compiler: gcc
version: "8"
- name: ubuntu-18.04-gcc-9
os: ubuntu-18.04
compiler: gcc
version: "9"
- name: ubuntu-18.04-clang-7
os: ubuntu-18.04
compiler: clang
version: "7"
- name: ubuntu-18.04-clang-8
os: ubuntu-18.04
compiler: clang
version: "8"
- name: ubuntu-18.04-clang-9
os: ubuntu-18.04
compiler: clang
version: "9"
- name: macOS-latest
os: macOS-latest
# Build tutorials for most configurations
- tutorials: ON
# Except with Debug mode
- config: Debug
tutorials: OFF
env:
LIBIGL_NUM_THREADS: 1 # See https://github.com/libigl/libigl/pull/996
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 10
- name: Dependencies (Linux)
if: runner.os == 'Linux'
run: |
# LLVM 9 is not in Bionic's repositories so we add the official LLVM repository.
if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "9" ]; then
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
fi
sudo apt-get update
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.version }}
echo "::set-env name=CC::gcc-${{ matrix.version }}"
echo "::set-env name=CXX::g++-${{ matrix.version }}"
else
sudo apt-get install -y clang-${{ matrix.version }}
echo "::set-env name=CC::clang-${{ matrix.version }}"
echo "::set-env name=CXX::clang++-${{ matrix.version }}"
fi
sudo apt-get install \
libblas-dev \
libboost-filesystem-dev \
libboost-system-dev \
libboost-thread-dev \
libglu1-mesa-dev \
liblapack-dev \
libmpfr-dev \
xorg-dev
- name: Dependencies (macOS)
if: runner.os == 'macOS'
run: brew install boost gmp mpfr
- name: Configure
run: |
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} \
-DLIBIGL_BUILD_TUTORIALS=${{ matrix.tutorials }} \
-DLIBIGL_WITH_CGAL=ON \
-DLIBIGL_WITH_COMISO=ON
- name: Free Disk Space
if: runner.os == 'Linux'
run: |
sudo swapoff -a
sudo apt clean
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc
df -h
- name: Build
run: cd build; make -j2
- name: Tests
run: cd build; ctest --verbose
####################
# Windows
####################
Windows:
name: Windows (${{ matrix.config }}, Static=${{ matrix.static }})
runs-on: windows-2019
env:
CC: cl.exe
CXX: cl.exe
strategy:
fail-fast: false
matrix:
config: [Debug, Release]
static: [ON, OFF]
include:
- config: Debug
tutorials: OFF
- config: Release
tutorials: ON
steps:
- name: Checkout repository
uses: actions/checkout@v1
with:
fetch-depth: 10
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Set env
run: |
echo "::set-env name=BOOST_ROOT::$env:BOOST_ROOT_1_69_0"
# We run configure + build in the same step, since they both need to call VsDevCmd
# Also, cmd uses ^ to break commands into multiple lines (in powershell this is `)
- name: Configure and build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cmake -G Ninja ^
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} ^
-DLIBIGL_BUILD_TUTORIALS=${{ matrix.tutorials }} ^
-DLIBIGL_WITH_CGAL=ON ^
-DLIBIGL_WITH_COMISO=OFF ^
-B build ^
-S .
cmake --build build -j 2
- name: Tests
run: cd build; ctest --verbose
+50 -96
View File
@@ -1,99 +1,53 @@
# use glob syntax.
*.a
*.dylib
*.egg-info/
*.exe
*.ilk
*.log
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.opensdf
*.orig
*.pdb
*.psess
*.pyc
*.sdf
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.so.[0123456789]
*.so.[0123456789].[0123456789]
*.suo
*.swo
*.swp
*.tlog
*.user
*.vsp
*CMakeFiles*
*buildXcode*
*tags
*~
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
# Build folders
/build*
/tests/data
/tutorial/data
/install
# Libigl specific
LibiglOptions.cmake
# vim debris
.*.un~
.*.swo
.*.swp
# macos debris
.DS_Store
.idea/
.vs/
.vscode/
/external
Debug/
README.html
Release/
Untitled.ipynb
build
doc.html
documentation/*.aux
documentation/*.log
documentation/*.out
example
example1
example_header_only
example_static
examples/*/*.mexmaci64
examples/*/*.rbr
examples/bbw/bbw_demo
examples/bbw/bbw_demo_selfcontained.zip
examples/bbw/bbw_demo_selfcontained/*
examples/bbw/examples/*-volume.dmat
examples/bbw/examples/*-volume.mesh
examples/principal_curvature/curvature
examples/quicklook-mesh/Mesh.qlgenerator/*
examples/upright/upright
external/MeshFix/meshfix
external/embree/build/*
external/glew/build
external/glfw/build
external/libpng/build
external/medit/rebar.rbr
external/tetgen/tetgen
external/tinyxml2/build
external/tinyxml2/test
external/tinyxml2/tinyxml2.pc
external/yimg/showpng
iglhelpers.pyc
lib
libigl.zip
optional/build
python/.idea
python/.ipynb_checkpoints
python/__pycache__
python/build
python/build2
python/build3
python/build4
python/builddebug
python/buildstatic
python/py_igl/todo
python/py_igl/todo
python/scripts/generated
scripts/change_name.sh
site/
syntax: glob
tests/bin
tests/build
tests/data
tutorial/*/*.mexmaci64
tutorial/*/Makefile
tutorial/*/build/*
tutorial/.idea
tutorial/XXX_test/CMakeLists.txt
tutorial/XXX_test/main.cpp
tutorial/build
tutorial/cmake-build-debug
tutorial/data
tutorial/readme.html
untitled
*~
dox/
latex/
scripts/
+167 -52
View File
@@ -1,74 +1,189 @@
cmake_minimum_required(VERSION 3.1)
# Toggles the use of the hunter package manager
option(HUNTER_ENABLED "Enable Hunter package manager support" OFF)
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/ruslo/hunter/archive/v0.23.171.tar.gz"
SHA1 "5d68bcca78eee347239ca5f4d34f4b6c12683154"
)
project(libigl)
# Detects whether this is a top-level project
get_directory_property(LIBIGL_PARENT_DIR PARENT_DIRECTORY)
if(NOT LIBIGL_PARENT_DIR)
set(LIBIGL_TOPLEVEL_PROJECT ON)
set(LIBIGL_TOPLEVEL_PROJECT ON)
else()
set(LIBIGL_TOPLEVEL_PROJECT OFF)
set(LIBIGL_TOPLEVEL_PROJECT OFF)
endif()
# Check required CMake version
set(REQUIRED_CMAKE_VERSION "3.16.0")
if(LIBIGL_TOPLEVEL_PROJECT)
cmake_minimum_required(VERSION ${REQUIRED_CMAKE_VERSION})
else()
# Don't use cmake_minimum_required here to avoid implicitly overriding parent policies
if(${CMAKE_VERSION} VERSION_LESS ${REQUIRED_CMAKE_VERSION})
message(FATAL_ERROR "CMake required version to build Libigl is ${REQUIRED_CMAKE_VERSION}")
endif()
endif()
# Include user-provided default options if available. We do that before the main
# `project()` so that we can define the C/C++ compilers from the option file.
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/LibiglOptions.cmake)
message(STATUS "Using local options file: ${CMAKE_CURRENT_SOURCE_DIR}/LibiglOptions.cmake")
include(${CMAKE_CURRENT_SOURCE_DIR}/LibiglOptions.cmake)
endif()
# If this option is enabled, this will setup the Hunter package manager.
option(HUNTER_ENABLED "Enable Hunter package manager support" OFF)
if(HUNTER_ENABLED)
include("cmake/misc/HunterGate.cmake")
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.24.8.tar.gz"
SHA1 "ca7838dded9a1811b04ffd56175f629e0af82d3d"
)
endif()
################################################################################
project(libigl VERSION 2.4.0)
# CMake module path
list(PREPEND CMAKE_MODULE_PATH
${CMAKE_CURRENT_LIST_DIR}/cmake/
${CMAKE_CURRENT_LIST_DIR}/cmake/igl
${CMAKE_CURRENT_LIST_DIR}/cmake/find
${CMAKE_CURRENT_LIST_DIR}/cmake/recipes/external
)
if(HUNTER_ENABLED)
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/recipes/hunter)
else()
list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/recipes/external)
endif()
set_property(GLOBAL PROPERTY __igl_module_path ${CMAKE_MODULE_PATH})
set(LIBIGL_DEFAULT_CGAL ${LIBIGL_TOPLEVEL_PROJECT})
set(MATLAB_ADDITIONAL_VERSIONS
"R2023b=10.4"
"R2023a=10.4"
"R2022b=10.3"
"R2022a=10.2"
"R2021b=10.1"
"R2021a=10.0"
)
set(LIBIGL_DEFAULT_MATLAB ${LIBIGL_TOPLEVEL_PROJECT})
set(LIBIGL_DEFAULT_MOSEK ${LIBIGL_TOPLEVEL_PROJECT})
if(LIBIGL_TOPLEVEL_PROJECT)
find_package(Matlab QUIET)
if(NOT Matlab_FOUND)
set(LIBIGL_DEFAULT_MATLAB OFF)
message(WARNING "Matlab not found, disabling igl_restricted::matlab module.")
endif()
find_package(MOSEK QUIET)
if(NOT MOSEK_FOUND)
set(LIBIGL_DEFAULT_MOSEK OFF)
message(WARNING "Mosek not found, disabling igl_restricted::mosek module.")
endif()
endif()
set(LIBIGL_DEFAULT_COMISO ${LIBIGL_TOPLEVEL_PROJECT})
if(LIBIGL_TOPLEVEL_PROJECT AND (NOT APPLE) AND UNIX)
find_package(BLAS QUIET)
if(NOT BLAS_FOUND)
set(LIBIGL_DEFAULT_COMISO OFF)
message(WARNING "BLAS not found, disabling igl_copyleft::comiso module.")
endif()
endif()
# Build tests and tutorials
option(LIBIGL_BUILD_TESTS "Build libigl unit test" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_BUILD_TUTORIALS "Build libigl tutorial" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_EXPORT_TARGETS "Export libigl CMake targets" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_BUILD_TESTS "Build libigl unit test" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_BUILD_TUTORIALS "Build libigl tutorial" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_INSTALL "Enable installation of libigl targets" ${LIBIGL_TOPLEVEL_PROJECT})
# USE_STATIC_LIBRARY speeds up the generation of multiple binaries,
# at the cost of a longer initial compilation time
# (by default, static build is off since libigl is a header-only library)
option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" ON)
option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" ${LIBIGL_TOPLEVEL_PROJECT})
# All dependencies that are downloaded as cmake projects and tested on the auto-builds are ON
# (by default, all build options are off)
option(LIBIGL_WITH_COMISO "Use CoMiso" ON)
option(LIBIGL_WITH_EMBREE "Use Embree" ON)
option(LIBIGL_WITH_OPENGL "Use OpenGL" ON)
option(LIBIGL_WITH_OPENGL_GLFW "Use GLFW" ON)
option(LIBIGL_WITH_OPENGL_GLFW_IMGUI "Use ImGui" ON)
option(LIBIGL_WITH_PNG "Use PNG" ON)
option(LIBIGL_WITH_TETGEN "Use Tetgen" ON)
option(LIBIGL_WITH_TRIANGLE "Use Triangle" ON)
option(LIBIGL_WITH_PREDICATES "Use exact predicates" ON)
option(LIBIGL_WITH_XML "Use XML" ON)
option(LIBIGL_WITH_PYTHON "Use Python" OFF)
### End
# Permissive modules. These modules are available under MPL2 license, and their dependencies are available
# under a permissive or public domain license.
option(LIBIGL_EMBREE "Build target igl::embree" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_GLFW "Build target igl::glfw" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_IMGUI "Build target igl::imgui" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_OPENGL "Build target igl::opengl" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_STB "Build target igl::stb" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_PREDICATES "Build target igl::predicates" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_SPECTRA "Build target igl::spectra" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_XML "Build target igl::xml" ${LIBIGL_TOPLEVEL_PROJECT})
if(${LIBIGL_WITH_PYTHON})
message(FATAL_ERROR "Python binding are in the process of being redone. Please use the master branch or refer to https://github.com/geometryprocessing/libigl-python-bindings for the developement version or https://anaconda.org/conda-forge/igl for the stable version.")
# Copyleft modules. These modules are available under GPL license, and their dependencies are
# available under a copyleft license.
option(LIBIGL_COPYLEFT_CORE "Build target igl_copyleft::core" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_COPYLEFT_CGAL "Build target igl_copyleft::cgal" ${LIBIGL_DEFAULT_CGAL})
option(LIBIGL_COPYLEFT_COMISO "Build target igl_copyleft::comiso" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_COPYLEFT_TETGEN "Build target igl_copyleft::tetgen" ${LIBIGL_TOPLEVEL_PROJECT})
# Restricted modules. These modules are available under MPL2 license, but their dependencies are
# only available under a non-commercial or proprietary license.
option(LIBIGL_RESTRICTED_MATLAB "Build target igl_restricted::matlab" ${LIBIGL_DEFAULT_MATLAB})
option(LIBIGL_RESTRICTED_MOSEK "Build target igl_restricted::mosek" ${LIBIGL_DEFAULT_MOSEK})
option(LIBIGL_RESTRICTED_TRIANGLE "Build target igl_restricted::triangle" ${LIBIGL_TOPLEVEL_PROJECT})
# GLFW doesn't run on headless CI machines so don't run (or build them).
# Unfortunately on headless mac machines glfw seems to hang rather than crash
# making it hard to catch at runtime.
option(LIBIGL_GLFW_TESTS "Build igl::glfw tests" ${LIBIGL_TOPLEVEL_PROJECT})
option(LIBIGL_WARNINGS_AS_ERRORS "Turn on many warnings and treat as errors" OFF)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
# Include CMake helper functions
include(igl_add_library)
include(igl_add_test)
include(igl_add_tutorial)
include(igl_copy_dll)
include(igl_include)
include(igl_install)
include(igl_target_sources)
# Enable unit testing at the root level
if(LIBIGL_BUILD_TESTS)
include(CTest)
endif()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
### conditionally compile certain modules depending on libraries found on the system
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
### Adding libIGL: choose the path to your local copy libIGL
# Defines CMake targets for selected libigl modules
include(libigl)
if(LIBIGL_BUILD_TUTORIALS)
add_subdirectory(tutorial)
add_subdirectory(tutorial)
endif()
if(LIBIGL_BUILD_TESTS)
include(CTest)
enable_testing()
add_subdirectory(tests)
################################################################################
# Install CMake config files
################################################################################
if(LIBIGL_INSTALL)
include(GNUInstallDirs)
set(project_config_in "${PROJECT_SOURCE_DIR}/cmake/igl/libigl-config.cmake.in")
set(project_config_out "${CMAKE_CURRENT_BINARY_DIR}/libigl-config.cmake")
set(config_targets_base "LibiglConfigTargets")
set(version_config_file "${CMAKE_CURRENT_BINARY_DIR}/LibiglConfigVersion.cmake")
set(export_dest_dir "${CMAKE_INSTALL_LIBDIR}/cmake/igl")
foreach(suffix IN ITEMS "") #"_restricted" "_copyleft")
install(EXPORT LibiglTargets${suffix}
DESTINATION ${export_dest_dir}
NAMESPACE igl${suffix}::
FILE ${config_targets_base}${suffix}.cmake
COMPONENT LibiglDevelopment
)
endforeach()
include(CMakePackageConfigHelpers)
configure_package_config_file(
"${project_config_in}"
"${project_config_out}"
INSTALL_DESTINATION
${CMAKE_INSTALL_DATAROOTDIR}/libigl/cmake
)
write_basic_package_version_file("${version_config_file}" COMPATIBILITY SameMajorVersion)
install(FILES "${project_config_out}" "${version_config_file}" DESTINATION "${export_dest_dir}")
endif()
if(LIBIGL_TOPLEVEL_PROJECT)
# Set folders for Visual Studio/Xcode
igl_set_folders()
endif()
+78
View File
@@ -0,0 +1,78 @@
# If you are cloning and compiling the libigl repository as a standalone, you
# can use this file as a convenience to set default CMake options. Simply copy
# this file and remove the '.sample' suffix. Then, uncomment the relevant
# options as desired. Note that this file is included before `project(Libigl)`
# is defined, so we can use it to define the C and C++ compilers, but some
# variables such as PROJECT_SOURCE_DIR will not be defined yet. You can use
# CMAKE_SOURCE_DIR instead.
#
# If you are using libigl as a subproject (e.g. see the libigl-example-project
# template), then you do NOT need to use this file. Simply set your preferred
# CMake options in the parent project, # before including libigl.
################################################################################
# CMake Options
################################################################################
# Specify a custom install prefix path
# set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install CACHE STRING "Install directory used by install().")
# Generates a `compile_commands.json` that can be used for autocompletion
# set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable/Disable output of compile commands during generation.")
# Use ccache to speed up compilation of repeated builds
# find_program(CCACHE_PROGRAM ccache)
# if(CCACHE_PROGRAM)
# message(STATUS "Enabling Ccache support")
# set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE STRING "")
# set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_PROGRAM} CACHE STRING "")
# endif()
# Use a specific C/C++ compiler, e.g. llvm-clang on macOS (so we can use clangd)
# set(CMAKE_C_COMPILER "/usr/bin/clang" CACHE STRING "C compiler")
# set(CMAKE_CXX_COMPILER "/usr/bin/clang++" CACHE STRING "C++ compiler")
# Set deployment platform for macOS
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "macOS deployment target")
# Always add colored output (e.g. when using Ninja)
# add_compile_options(-fdiagnostics-color=always) # GCC
# add_compile_options(-fcolor-diagnostics) # Clang
# add_compile_options(-ftime-trace) # Clang
################################################################################
# Libigl Options
################################################################################
# Build options
# option(LIBIGL_BUILD_TESTS "Build libigl unit test" OFF)
# option(LIBIGL_BUILD_TUTORIALS "Build libigl tutorial" OFF)
# option(LIBIGL_INSTALL "Enable installation of libigl targets" OFF)
# option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" OFF)
# Module options
# option(LIBIGL_EMBREE "Build target igl::embree" ON)
# option(LIBIGL_GLFW "Build target igl::glfw" ON)
# option(LIBIGL_IMGUI "Build target igl::imgui" ON)
# option(LIBIGL_OPENGL "Build target igl::opengl" ON)
# option(LIBIGL_STB "Build target igl::stb" ON)
# option(LIBIGL_PREDICATES "Build target igl::predicates" ON)
# option(LIBIGL_XML "Build target igl::xml" ON)
# option(LIBIGL_COPYLEFT_CGAL "Build target igl_copyleft::cgal" ON)
# option(LIBIGL_COPYLEFT_COMISO "Build target igl_copyleft::comiso" ON)
# option(LIBIGL_COPYLEFT_CORE "Build target igl_copyleft::core" ON)
# option(LIBIGL_COPYLEFT_CORK "Build target igl_copyleft::cork" ON)
# option(LIBIGL_COPYLEFT_TETGEN "Build target igl_copyleft::tetgen" ON)
# option(LIBIGL_RESTRICTED_MATLAB "Build target igl_restricted::matlab" ON)
# option(LIBIGL_RESTRICTED_MOSEK "Build target igl_restricted::mosek" ON)
# option(LIBIGL_RESTRICTED_TRIANGLE "Build target igl_restricted::triangle" ON)
################################################################################
# FetchContent Options
################################################################################
# option(FETCHCONTENT_FULLY_DISCONNECTED "Disables all attempts to download or update content and assumes source dirs already exist" ON)
# option(FETCHCONTENT_UPDATES_DISCONNECTED "Enables UPDATE_DISCONNECTED behavior for all content population" ON)
# option(FETCHCONTENT_QUIET "Enables QUIET option for all content population" ON)
# set(FETCHCONTENT_BASE_DIR "${CMAKE_SOURCE_DIR}/external" CACHE PATH "Directory under which to collect all populated content")
+7 -1
View File
@@ -1,7 +1,13 @@
# libigl - A simple C++ geometry processing library
[![](https://github.com/libigl/libigl/workflows/Build/badge.svg)](https://github.com/libigl/libigl/actions)
[![](https://github.com/libigl/libigl/workflows/Build/badge.svg?event=push)](https://github.com/libigl/libigl/actions?query=workflow%3ABuild+branch%3Amain+event%3Apush)
[![](https://anaconda.org/conda-forge/igl/badges/installer/conda.svg)](https://anaconda.org/conda-forge/igl)
![](https://libigl.github.io/libigl-teaser.png)
Documentation, tutorial, and instructions at <https://libigl.github.io>.
| 🆕 Doxygen Documentation |
|:---|
| The latest version of libigl (v2.5.0) introduces [doxygen generated detailed documentation](https://libigl.github.io/dox/index.html) |
-85
View File
@@ -1,85 +0,0 @@
################################################################################
if(NOT (${CMAKE_VERSION} VERSION_LESS "3.8.0"))
# For CMake 3.8 and above, we can use meta features directly provided by CMake itself
set(CXX11_FEATURES cxx_std_11)
set(CXX14_FEATURES cxx_std_14)
set(CXX17_FEATURES cxx_std_17)
return()
endif()
################################################################################
set(CXX11_FEATURES
cxx_auto_type
cxx_constexpr
)
set(CXX14_FEATURES
cxx_generic_lambdas
)
set(CXX17_FEATURES
)
################################################################################
# https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
# cxx_aggregate_default_initializers Aggregate default initializers, as defined in N3605.
# cxx_alias_templates Template aliases, as defined in N2258.
# cxx_alignas Alignment control alignas, as defined in N2341.
# cxx_alignof Alignment control alignof, as defined in N2341.
# cxx_attributes Generic attributes, as defined in N2761.
# cxx_attribute_deprecated deprecated]] attribute, as defined in N3760.
# cxx_auto_type Automatic type deduction, as defined in N1984.
# cxx_binary_literals Binary literals, as defined in N3472.
# cxx_constexpr Constant expressions, as defined in N2235.
# cxx_contextual_conversions Contextual conversions, as defined in N3323.
# cxx_decltype_incomplete_return_types Decltype on incomplete return types, as defined in N3276.
# cxx_decltype Decltype, as defined in N2343.
# cxx_decltype_auto decltype(auto) semantics, as defined in N3638.
# cxx_default_function_template_args Default template arguments for function templates, as defined in DR226
# cxx_defaulted_functions Defaulted functions, as defined in N2346.
# cxx_defaulted_move_initializers Defaulted move initializers, as defined in N3053.
# cxx_delegating_constructors Delegating constructors, as defined in N1986.
# cxx_deleted_functions Deleted functions, as defined in N2346.
# cxx_digit_separators Digit separators, as defined in N3781.
# cxx_enum_forward_declarations Enum forward declarations, as defined in N2764.
# cxx_explicit_conversions Explicit conversion operators, as defined in N2437.
# cxx_extended_friend_declarations Extended friend declarations, as defined in N1791.
# cxx_extern_templates Extern templates, as defined in N1987.
# cxx_final Override control final keyword, as defined in N2928, N3206 and N3272.
# cxx_func_identifier Predefined __func__ identifier, as defined in N2340.
# cxx_generalized_initializers Initializer lists, as defined in N2672.
# cxx_generic_lambdas Generic lambdas, as defined in N3649.
# cxx_inheriting_constructors Inheriting constructors, as defined in N2540.
# cxx_inline_namespaces Inline namespaces, as defined in N2535.
# cxx_lambdas Lambda functions, as defined in N2927.
# cxx_lambda_init_captures Initialized lambda captures, as defined in N3648.
# cxx_local_type_template_args Local and unnamed types as template arguments, as defined in N2657.
# cxx_long_long_type long long type, as defined in N1811.
# cxx_noexcept Exception specifications, as defined in N3050.
# cxx_nonstatic_member_init Non-static data member initialization, as defined in N2756.
# cxx_nullptr Null pointer, as defined in N2431.
# cxx_override Override control override keyword, as defined in N2928, N3206 and N3272.
# cxx_range_for Range-based for, as defined in N2930.
# cxx_raw_string_literals Raw string literals, as defined in N2442.
# cxx_reference_qualified_functions Reference qualified functions, as defined in N2439.
# cxx_relaxed_constexpr Relaxed constexpr, as defined in N3652.
# cxx_return_type_deduction Return type deduction on normal functions, as defined in N3386.
# cxx_right_angle_brackets Right angle bracket parsing, as defined in N1757.
# cxx_rvalue_references R-value references, as defined in N2118.
# cxx_sizeof_member Size of non-static data members, as defined in N2253.
# cxx_static_assert Static assert, as defined in N1720.
# cxx_strong_enums Strongly typed enums, as defined in N2347.
# cxx_thread_local Thread-local variables, as defined in N2659.
# cxx_trailing_return_types Automatic function return type, as defined in N2541.
# cxx_unicode_literals Unicode string literals, as defined in N2442.
# cxx_uniform_initialization Uniform initialization, as defined in N2640.
# cxx_unrestricted_unions Unrestricted unions, as defined in N2544.
# cxx_user_literals User-defined literals, as defined in N2765.
# cxx_variable_templates Variable templates, as defined in N3651.
# cxx_variadic_macros Variadic macros, as defined in N1653.
# cxx_variadic_templates Variadic templates, as defined in N2242.
# cxx_template_template_parameters Template template parameters, as defined in ISO/IEC 14882:1998.
-17
View File
@@ -1,17 +0,0 @@
# Distributed under the OSI-approved MIT License. See accompanying
# file LICENSE or https://github.com/Crascit/DownloadProject for details.
cmake_minimum_required(VERSION 2.8.2)
project(${DL_ARGS_PROJ}-download NONE)
include(ExternalProject)
ExternalProject_Add(${DL_ARGS_PROJ}-download
${DL_ARGS_UNPARSED_ARGUMENTS}
SOURCE_DIR "${DL_ARGS_SOURCE_DIR}"
BINARY_DIR "${DL_ARGS_BINARY_DIR}"
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
-182
View File
@@ -1,182 +0,0 @@
# Distributed under the OSI-approved MIT License. See accompanying
# file LICENSE or https://github.com/Crascit/DownloadProject for details.
#
# MODULE: DownloadProject
#
# PROVIDES:
# download_project( PROJ projectName
# [PREFIX prefixDir]
# [DOWNLOAD_DIR downloadDir]
# [SOURCE_DIR srcDir]
# [BINARY_DIR binDir]
# [QUIET]
# ...
# )
#
# Provides the ability to download and unpack a tarball, zip file, git repository,
# etc. at configure time (i.e. when the cmake command is run). How the downloaded
# and unpacked contents are used is up to the caller, but the motivating case is
# to download source code which can then be included directly in the build with
# add_subdirectory() after the call to download_project(). Source and build
# directories are set up with this in mind.
#
# The PROJ argument is required. The projectName value will be used to construct
# the following variables upon exit (obviously replace projectName with its actual
# value):
#
# projectName_SOURCE_DIR
# projectName_BINARY_DIR
#
# The SOURCE_DIR and BINARY_DIR arguments are optional and would not typically
# need to be provided. They can be specified if you want the downloaded source
# and build directories to be located in a specific place. The contents of
# projectName_SOURCE_DIR and projectName_BINARY_DIR will be populated with the
# locations used whether you provide SOURCE_DIR/BINARY_DIR or not.
#
# The DOWNLOAD_DIR argument does not normally need to be set. It controls the
# location of the temporary CMake build used to perform the download.
#
# The PREFIX argument can be provided to change the base location of the default
# values of DOWNLOAD_DIR, SOURCE_DIR and BINARY_DIR. If all of those three arguments
# are provided, then PREFIX will have no effect. The default value for PREFIX is
# CMAKE_BINARY_DIR.
#
# The QUIET option can be given if you do not want to show the output associated
# with downloading the specified project.
#
# In addition to the above, any other options are passed through unmodified to
# ExternalProject_Add() to perform the actual download, patch and update steps.
# The following ExternalProject_Add() options are explicitly prohibited (they
# are reserved for use by the download_project() command):
#
# CONFIGURE_COMMAND
# BUILD_COMMAND
# INSTALL_COMMAND
# TEST_COMMAND
#
# Only those ExternalProject_Add() arguments which relate to downloading, patching
# and updating of the project sources are intended to be used. Also note that at
# least one set of download-related arguments are required.
#
# If using CMake 3.2 or later, the UPDATE_DISCONNECTED option can be used to
# prevent a check at the remote end for changes every time CMake is run
# after the first successful download. See the documentation of the ExternalProject
# module for more information. It is likely you will want to use this option if it
# is available to you. Note, however, that the ExternalProject implementation contains
# bugs which result in incorrect handling of the UPDATE_DISCONNECTED option when
# using the URL download method or when specifying a SOURCE_DIR with no download
# method. Fixes for these have been created, the last of which is scheduled for
# inclusion in CMake 3.8.0. Details can be found here:
#
# https://gitlab.kitware.com/cmake/cmake/commit/bdca68388bd57f8302d3c1d83d691034b7ffa70c
# https://gitlab.kitware.com/cmake/cmake/issues/16428
#
# If you experience build errors related to the update step, consider avoiding
# the use of UPDATE_DISCONNECTED.
#
# EXAMPLE USAGE:
#
# include(DownloadProject)
# download_project(PROJ googletest
# GIT_REPOSITORY https://github.com/google/googletest.git
# GIT_TAG master
# UPDATE_DISCONNECTED 1
# QUIET
# )
#
# add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
#
#========================================================================================
set(_DownloadProjectDir "${CMAKE_CURRENT_LIST_DIR}")
include(CMakeParseArguments)
function(download_project)
set(options QUIET)
set(oneValueArgs
PROJ
PREFIX
DOWNLOAD_DIR
SOURCE_DIR
BINARY_DIR
# Prevent the following from being passed through
CONFIGURE_COMMAND
BUILD_COMMAND
INSTALL_COMMAND
TEST_COMMAND
)
set(multiValueArgs "")
cmake_parse_arguments(DL_ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
# Hide output if requested
if (DL_ARGS_QUIET)
set(OUTPUT_QUIET "OUTPUT_QUIET")
else()
unset(OUTPUT_QUIET)
message(STATUS "Downloading/updating ${DL_ARGS_PROJ}")
endif()
# Set up where we will put our temporary CMakeLists.txt file and also
# the base point below which the default source and binary dirs will be.
# The prefix must always be an absolute path.
if (NOT DL_ARGS_PREFIX)
set(DL_ARGS_PREFIX "${CMAKE_BINARY_DIR}")
else()
get_filename_component(DL_ARGS_PREFIX "${DL_ARGS_PREFIX}" ABSOLUTE
BASE_DIR "${CMAKE_CURRENT_BINARY_DIR}")
endif()
if (NOT DL_ARGS_DOWNLOAD_DIR)
set(DL_ARGS_DOWNLOAD_DIR "${DL_ARGS_PREFIX}/${DL_ARGS_PROJ}-download")
endif()
# Ensure the caller can know where to find the source and build directories
if (NOT DL_ARGS_SOURCE_DIR)
set(DL_ARGS_SOURCE_DIR "${DL_ARGS_PREFIX}/${DL_ARGS_PROJ}-src")
endif()
if (NOT DL_ARGS_BINARY_DIR)
set(DL_ARGS_BINARY_DIR "${DL_ARGS_PREFIX}/${DL_ARGS_PROJ}-build")
endif()
set(${DL_ARGS_PROJ}_SOURCE_DIR "${DL_ARGS_SOURCE_DIR}" PARENT_SCOPE)
set(${DL_ARGS_PROJ}_BINARY_DIR "${DL_ARGS_BINARY_DIR}" PARENT_SCOPE)
# The way that CLion manages multiple configurations, it causes a copy of
# the CMakeCache.txt to be copied across due to it not expecting there to
# be a project within a project. This causes the hard-coded paths in the
# cache to be copied and builds to fail. To mitigate this, we simply
# remove the cache if it exists before we configure the new project. It
# is safe to do so because it will be re-generated. Since this is only
# executed at the configure step, it should not cause additional builds or
# downloads.
file(REMOVE "${DL_ARGS_DOWNLOAD_DIR}/CMakeCache.txt")
# Create and build a separate CMake project to carry out the download.
# If we've already previously done these steps, they will not cause
# anything to be updated, so extra rebuilds of the project won't occur.
# Make sure to pass through CMAKE_MAKE_PROGRAM in case the main project
# has this set to something not findable on the PATH.
configure_file("${_DownloadProjectDir}/DownloadProject.CMakeLists.cmake.in"
"${DL_ARGS_DOWNLOAD_DIR}/CMakeLists.txt")
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-D "CMAKE_MAKE_PROGRAM:FILE=${CMAKE_MAKE_PROGRAM}"
.
RESULT_VARIABLE result
${OUTPUT_QUIET}
WORKING_DIRECTORY "${DL_ARGS_DOWNLOAD_DIR}"
)
if(result)
message(FATAL_ERROR "CMake step for ${DL_ARGS_PROJ} failed: ${result}")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} --build .
RESULT_VARIABLE result
${OUTPUT_QUIET}
WORKING_DIRECTORY "${DL_ARGS_DOWNLOAD_DIR}"
)
if(result)
message(FATAL_ERROR "Build step for ${DL_ARGS_PROJ} failed: ${result}")
endif()
endfunction()
-52
View File
@@ -1,52 +0,0 @@
#
# Try to find CORK library and include path.
# Once done this will define
#
# CORK_FOUND
# CORK_INCLUDE_DIR
# CORK_LIBRARIES
#
if(NOT CORK_FOUND)
FIND_PATH(CORK_INCLUDE_DIR cork.h
PATHS
${PROJECT_SOURCE_DIR}/../../external/cork/include
${PROJECT_SOURCE_DIR}/../external/cork/include
${PROJECT_SOURCE_DIR}/external/cork/include
/usr/local/include
/usr/X11/include
/usr/include
/opt/local/include
NO_DEFAULT_PATH
)
FIND_LIBRARY( CORK_LIBRARIES NAMES cork
PATHS
${PROJECT_SOURCE_DIR}/../../external/cork/lib/
${PROJECT_SOURCE_DIR}/../external/cork/lib/
${PROJECT_SOURCE_DIR}/external/cork/lib/
/usr/local
/usr/X11
/usr
PATH_SUFFIXES
a
lib64
lib
NO_DEFAULT_PATH
)
SET(CORK_FOUND "NO")
IF (CORK_INCLUDE_DIR AND CORK_LIBRARIES)
SET(CORK_FOUND "YES")
ENDIF (CORK_INCLUDE_DIR AND CORK_LIBRARIES)
if(CORK_FOUND)
message(STATUS "Found CORK: ${CORK_INCLUDE_DIR}")
else(CORK_FOUND)
if (NOT CORK_FIND_QUIETLY)
message(FATAL_ERROR "could NOT find CORK")
endif (NOT CORK_FIND_QUIETLY)
endif(CORK_FOUND)
endif(NOT CORK_FOUND)
File diff suppressed because it is too large Load Diff
-190
View File
@@ -1,190 +0,0 @@
################################################################################
include(DownloadProject)
# With CMake 3.8 and above, we can hide warnings about git being in a
# detached head by passing an extra GIT_CONFIG option.
set(LIBIGL_EXTRA_OPTIONS TLS_VERIFY OFF)
if(NOT (${CMAKE_VERSION} VERSION_LESS "3.8.0"))
list(APPEND LIBIGL_EXTRA_OPTIONS GIT_CONFIG advice.detachedHead=false)
endif()
# On CMake 3.6.3 and above, there is an option to use shallow clones of git repositories.
# The shallow clone option only works with real tags, not SHA1, so we use a separate option.
set(LIBIGL_BRANCH_OPTIONS)
if(NOT (${CMAKE_VERSION} VERSION_LESS "3.6.3"))
# Disabled for now until we can make sure that it has no adverse effects
# (Downside is that the eigen mirror is huge again)
# list(APPEND LIBIGL_BRANCH_OPTIONS GIT_SHALLOW 1)
endif()
option(LIBIGL_SKIP_DOWNLOAD "Skip downloading external libraries" OFF)
# Shortcut functions
function(igl_download_project_aux name source)
if(NOT LIBIGL_SKIP_DOWNLOAD)
download_project(
PROJ ${name}
SOURCE_DIR "${source}"
DOWNLOAD_DIR "${LIBIGL_EXTERNAL}/.cache/${name}"
QUIET
${LIBIGL_EXTRA_OPTIONS}
${ARGN}
)
endif()
endfunction()
function(igl_download_project name)
igl_download_project_aux(${name} "${LIBIGL_EXTERNAL}/${name}" ${ARGN})
endfunction()
################################################################################
## CGAL
function(igl_download_cgal)
igl_download_project(cgal
GIT_REPOSITORY https://github.com/CGAL/cgal.git
GIT_TAG f7c3c8212b56c0d6dae63787efc99093f4383415
)
endfunction()
## CoMISo
function(igl_download_comiso)
igl_download_project(CoMISo
GIT_REPOSITORY https://github.com/libigl/CoMISo.git
GIT_TAG 1f9618cf9b7bd77370d817976470d59091928606
)
endfunction()
## Cork
function(igl_download_cork)
igl_download_project(cork
GIT_REPOSITORY https://github.com/libigl/cork.git
GIT_TAG 27ad8a285838f5a480d856429e39d3d56d4338f9
)
endfunction()
## Eigen
set(LIBIGL_EIGEN_VERSION 3.3.7 CACHE STRING "Default version of Eigen used by libigl.")
function(igl_download_eigen)
igl_download_project(eigen
GIT_REPOSITORY https://github.com/eigenteam/eigen-git-mirror.git
GIT_TAG ${LIBIGL_EIGEN_VERSION}
${LIBIGL_BRANCH_OPTIONS}
)
endfunction()
## Embree
function(igl_download_embree)
igl_download_project(embree
GIT_REPOSITORY https://github.com/embree/embree.git
GIT_TAG v3.5.2
${LIBIGL_BRANCH_OPTIONS}
)
endfunction()
## glad
function(igl_download_glad)
igl_download_project(glad
GIT_REPOSITORY https://github.com/libigl/libigl-glad.git
GIT_TAG 09b4969c56779f7ddf8e6176ec1873184aec890f
)
endfunction()
## GLFW
function(igl_download_glfw)
igl_download_project(glfw
GIT_REPOSITORY https://github.com/glfw/glfw.git
GIT_TAG 3.3
${LIBIGL_BRANCH_OPTIONS}
)
endfunction()
## ImGui
function(igl_download_imgui)
igl_download_project(imgui
GIT_REPOSITORY https://github.com/ocornut/imgui.git
GIT_TAG v1.69
${LIBIGL_BRANCH_OPTIONS}
)
igl_download_project(libigl-imgui
GIT_REPOSITORY https://github.com/libigl/libigl-imgui.git
GIT_TAG 07ecd3858acc71e70f0f9b2dea20a139bdddf8ae
)
endfunction()
## pybind11
function(igl_download_pybind11)
igl_download_project(pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG 2d0507db43cd5a117f7843e053b17dffca114107
)
endfunction()
## stb_image
function(igl_download_stb)
igl_download_project(stb
GIT_REPOSITORY https://github.com/libigl/libigl-stb.git
GIT_TAG cd0fa3fcd90325c83be4d697b00214e029f94ca3
)
endfunction()
## TetGen
function(igl_download_tetgen)
igl_download_project(tetgen
GIT_REPOSITORY https://github.com/jdumas/tetgen.git
GIT_TAG c63e7a6434652b8a2065c835bd9d6d298db1a0bc
)
endfunction()
## TinyXML
function(igl_download_tinyxml2)
igl_download_project(tinyxml2
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
GIT_TAG d175e9de0be0d4db75d0a8cf065599a435a87eb6
)
endfunction()
## Triangle
function(igl_download_triangle)
igl_download_project(triangle
GIT_REPOSITORY https://github.com/libigl/triangle.git
GIT_TAG d284c4a843efac043c310f5fa640b17cf7d96170
)
endfunction()
## Catch2
function(igl_download_catch2)
igl_download_project(catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.11.0
)
endfunction()
## Predicates
function(igl_download_predicates)
igl_download_project(predicates
GIT_REPOSITORY https://github.com/libigl/libigl-predicates.git
GIT_TAG 5a1d2194ec114bff51d5a33230586cafb83adc86
)
endfunction()
################################################################################
## Test data
function(igl_download_test_data)
igl_download_project_aux(test_data
"${LIBIGL_EXTERNAL}/../tests/data"
GIT_REPOSITORY https://github.com/libigl/libigl-tests-data
GIT_TAG b5dddf45e329af685cd107e38770a28cfc18eb15
)
endfunction()
## Tutorial data
function(igl_download_tutorial_data)
igl_download_project_aux(tutorial_data
"${LIBIGL_EXTERNAL}/../tutorial/data"
GIT_REPOSITORY https://github.com/libigl/libigl-tutorial-data
GIT_TAG 5c6a1ea809c043d71e5595775709c15325a7158c
)
endfunction()
-116
View File
@@ -1,116 +0,0 @@
# Sort projects inside the solution
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
function(igl_folder_targets FOLDER_NAME)
foreach(target IN ITEMS ${ARGN})
if(TARGET ${target})
get_target_property(TYPE ${target} TYPE)
if(NOT (TYPE STREQUAL "INTERFACE_LIBRARY"))
set_target_properties(${target} PROPERTIES FOLDER "${FOLDER_NAME}")
endif()
endif()
endforeach()
endfunction()
function(igl_set_folders)
igl_folder_targets("ThirdParty/Embree"
algorithms
embree
lexers
math
simd
sys
tasking
)
igl_folder_targets("ThirdParty"
CoMISo
glad
glfw
imgui
predicates
tetgen
tinyxml2
triangle
)
igl_folder_targets("Libigl"
igl
igl_comiso
igl_embree
igl_opengl
igl_opengl_glfw
igl_opengl_glfw_imgui
igl_png
igl_predicates
igl_stb_image
igl_tetgen
igl_triangle
igl_xml
)
igl_folder_targets("Unit Tests"
libigl_tests
)
igl_folder_targets("Tutorials"
101_FileIO_bin
102_DrawMesh_bin
103_Events_bin
104_Colors_bin
105_Overlays_bin
106_ViewerMenu_bin
107_MultipleMeshes_bin
108_MultipleViews_bin
201_Normals_bin
202_GaussianCurvature_bin
203_CurvatureDirections_bin
204_Gradient_bin
205_Laplacian_bin
206_GeodesicDistance_bin
301_Slice_bin
302_Sort_bin
303_LaplaceEquation_bin
304_LinearEqualityConstraints_bin
305_QuadraticProgramming_bin
306_EigenDecomposition_bin
401_BiharmonicDeformation_bin
402_PolyharmonicDeformation_bin
403_BoundedBiharmonicWeights_bin
404_DualQuaternionSkinning_bin
405_AsRigidAsPossible_bin
406_FastAutomaticSkinningTransformations_bin
407_BiharmonicCoordinates_bin
501_HarmonicParam_bin
502_LSCMParam_bin
503_ARAPParam_bin
504_NRosyDesign_bin
505_MIQ_bin
506_FrameField_bin
507_Planarization_bin
601_Serialization_bin
604_Triangle_bin
605_Tetgen_bin
606_AmbientOcclusion_bin
607_ScreenCapture_bin
701_Statistics_bin
702_WindingNumber_bin
703_Decimation_bin
704_SignedDistance_bin
705_MarchingCubes_bin
706_FacetOrientation_bin
707_SweptVolume_bin
708_Picking_bin
709_SLIM_bin
710_SCAF_bin
711_Subdivision_bin
712_DataSmoothing_bin
713_ShapeUp_bin
714_MarchingTets_bin
715_MeshImplicitFunction_bin
716_HeatGeodesics_bin
718_IterativeClosestPoint_bin
)
endfunction()
-26
View File
@@ -1,26 +0,0 @@
if(MSVC)
option(IGL_STATIC_RUNTIME "Use libigl with the static MSVC runtime." OFF)
if(IGL_STATIC_RUNTIME)
message(STATUS "MSVC -> forcing use of statically-linked runtime.")
foreach(config ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${config} config)
string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
string(REPLACE /MD /MT CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
endforeach()
string(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
else()
message(STATUS "MSVC -> forcing use of dynamically-linked runtime.")
foreach(config ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${config} config)
string(REPLACE /MT /MD CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
string(REPLACE /MT /MD CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
endforeach()
string(REPLACE "/MTd" "/MDd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
endif()
# https://github.com/mozilla/sccache/issues/242
if(CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "sccache")
string(REGEX REPLACE "/Z[iI7]" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
endif()
endif()
+95
View File
@@ -0,0 +1,95 @@
# Try to find the GNU Multiple Precision Arithmetic Library (GMP)
# See http://gmplib.org/
if(${CMAKE_VERSION} VERSION_LESS "3.18.0")
set(REQUIRED_FLAG "")
else()
set(REQUIRED_FLAG REQUIRED)
endif()
# On Windows, we must use the pre-compiled versions downloaded with libigl
if(WIN32)
set(NO_DEFAULT_FLAG NO_DEFAULT_PATH)
else()
set(NO_DEFAULT_FLAG "")
endif()
find_path(GMP_INCLUDES
NAMES
gmp.h
PATHS
ENV GMP_DIR
${INCLUDE_INSTALL_DIR}
PATH_SUFFIXES
include
${REQUIRED_FLAG}
${NO_DEFAULT_FLAG}
)
find_library(GMP_LIBRARIES
NAMES
gmp
libgmp-10
PATHS
ENV GMP_DIR
${LIB_INSTALL_DIR}
PATH_SUFFIXES
lib
${REQUIRED_FLAG}
${NO_DEFAULT_FLAG}
)
set(GMP_EXTRA_VARS "")
if(WIN32)
# Find dll file and set IMPORTED_LOCATION to the .dll file
find_file(GMP_RUNTIME_LIB
NAMES
gmp.dll
libgmp-10.dll
PATHS
ENV GMP_DIR
${LIB_INSTALL_DIR}
PATH_SUFFIXES
lib
${REQUIRED_FLAG}
${NO_DEFAULT_FLAG}
)
list(APPEND GMP_EXTRA_VARS GMP_RUNTIME_LIB)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMP
REQUIRED_VARS
GMP_INCLUDES
GMP_LIBRARIES
${GMP_EXTRA_VARS}
REASON_FAILURE_MESSAGE
"GMP is not installed on your system. Either install GMP using your preferred package manager, or disable libigl modules that depend on GMP, such as CGAL. See LibiglOptions.cmake.sample for configuration options. Do not forget to delete your <build>/CMakeCache.txt for the changes to take effect."
)
mark_as_advanced(GMP_INCLUDES GMP_LIBRARIES)
if(GMP_INCLUDES AND GMP_LIBRARIES AND NOT TARGET gmp::gmp)
if(GMP_RUNTIME_LIB)
add_library(gmp::gmp SHARED IMPORTED)
else()
add_library(gmp::gmp UNKNOWN IMPORTED)
endif()
# Set public header location and link language
set_target_properties(gmp::gmp PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
INTERFACE_INCLUDE_DIRECTORIES "${GMP_INCLUDES}"
)
# Set lib location. On Windows we specify both the .lib and the .dll paths
if(GMP_RUNTIME_LIB)
set_target_properties(gmp::gmp PROPERTIES
IMPORTED_IMPLIB "${GMP_LIBRARIES}"
IMPORTED_LOCATION "${GMP_RUNTIME_LIB}"
)
else()
set_target_properties(gmp::gmp PROPERTIES
IMPORTED_LOCATION "${GMP_LIBRARIES}"
)
endif()
endif()
@@ -9,8 +9,10 @@
# Hardcoded search paths
set(SEARCH_PATHS
${CMAKE_SOURCE_DIR}/mosek/9.2/tools/platform/osx64x86/
/usr/local/mosek/7/tools/platform/osx64x86/
/usr/local/mosek/8/tools/platform/osx64x86/
/usr/local/mosek/9.2/tools/platform/osx64x86/
/opt/mosek/7/tools/platform/linux64x86/
)
+95
View File
@@ -0,0 +1,95 @@
# Try to find the MPFR library
# See http://www.mpfr.org/
if(${CMAKE_VERSION} VERSION_LESS "3.18.0")
set(REQUIRED_FLAG "")
else()
set(REQUIRED_FLAG REQUIRED)
endif()
# On Windows, we must use the pre-compiled versions downloaded with libigl
if(WIN32)
set(NO_DEFAULT_FLAG NO_DEFAULT_PATH)
else()
set(NO_DEFAULT_FLAG "")
endif()
find_path(MPFR_INCLUDES
NAMES
mpfr.h
PATHS
ENV MPFR_DIR
${INCLUDE_INSTALL_DIR}
PATH_SUFFIXES
include
${REQUIRED_FLAG}
${NO_DEFAULT_FLAG}
)
find_library(MPFR_LIBRARIES
NAMES
mpfr
libmpfr-4
PATHS
ENV MPFR_DIR
${LIB_INSTALL_DIR}
PATH_SUFFIXES
lib
${REQUIRED_FLAG}
${NO_DEFAULT_FLAG}
)
set(MPFR_EXTRA_VARS "")
if(WIN32)
# Find dll file and set IMPORTED_LOCATION to the .dll file
find_file(MPFR_RUNTIME_LIB
NAMES
mpfr.dll
libmpfr-4.dll
PATHS
ENV MPFR_DIR
${LIB_INSTALL_DIR}
PATH_SUFFIXES
lib
${REQUIRED_FLAG}
${NO_DEFAULT_FLAG}
)
list(APPEND MPFR_EXTRA_VARS MPFR_RUNTIME_LIB)
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MPFR
REQUIRED_VARS
MPFR_INCLUDES
MPFR_LIBRARIES
${MPFR_EXTRA_VARS}
REASON_FAILURE_MESSAGE
"MPFR is not installed on your system. Either install MPFR using your preferred package manager, or disable libigl modules that depend on MPFR, such as CGAL. See LibiglOptions.cmake.sample for configuration options. Do not forget to delete your <build>/CMakeCache.txt for the changes to take effect."
)
mark_as_advanced(MPFR_INCLUDES MPFR_LIBRARIES)
if(MPFR_INCLUDES AND MPFR_LIBRARIES AND NOT TARGET mpfr::mpfr)
if(MPFR_RUNTIME_LIB)
add_library(mpfr::mpfr SHARED IMPORTED)
else()
add_library(mpfr::mpfr UNKNOWN IMPORTED)
endif()
# Set public header location and link language
set_target_properties(mpfr::mpfr PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
INTERFACE_INCLUDE_DIRECTORIES "${MPFR_INCLUDES}"
)
# Set lib location. On Windows we specify both the .lib and the .dll paths
if(MPFR_RUNTIME_LIB)
set_target_properties(mpfr::mpfr PROPERTIES
IMPORTED_IMPLIB "${MPFR_LIBRARIES}"
IMPORTED_LOCATION "${MPFR_RUNTIME_LIB}"
)
else()
set_target_properties(mpfr::mpfr PROPERTIES
IMPORTED_LOCATION "${MPFR_LIBRARIES}"
)
endif()
endif()
+80
View File
@@ -0,0 +1,80 @@
# Creates a CMake target for a given libigl module. This convenience function also defines common
# compilation flags, as well as installation rules for the target. Target sources and dependencies
# need to be added separately.
function(igl_add_library module_name)
# Check if category is `copyleft` or `restricted`
if(${module_name} MATCHES "^igl_copyleft")
set(suffix "_copyleft")
elseif(${module_name} MATCHES "^igl_restricted")
set(suffix "_restricted")
else()
set(suffix "")
endif()
# Check module name
if(NOT ${module_name} MATCHES "^igl_")
message(FATAL_ERROR "Libigl module name should start with 'igl_'")
endif()
string(REPLACE "igl${suffix}_" "" module_shortname ${module_name})
# Define target
if(LIBIGL_USE_STATIC_LIBRARY)
add_library(${module_name} STATIC)
else()
add_library(${module_name} INTERFACE)
endif()
# Alias target name
message(STATUS "Creating target: igl${suffix}::${module_shortname} (${module_name})")
add_library(igl${suffix}::${module_shortname} ALIAS ${module_name})
# Compile definitions
if(LIBIGL_USE_STATIC_LIBRARY)
target_compile_definitions(${module_name} ${IGL_SCOPE} -DIGL_STATIC_LIBRARY)
endif()
# C++11 features
target_compile_features(${module_name} ${IGL_SCOPE} cxx_std_11)
if(LIBIGL_WARNINGS_AS_ERRORS)
target_compile_options(${module_name} PRIVATE -Wall -Wextra -Wpedantic -Wno-sign-compare -Werror -Wno-gnu -Wno-unknown-pragmas)
endif()
# Other compilation flags
if(MSVC)
# Enable parallel compilation for Visual Studio
target_compile_options(${module_name} ${IGL_SCOPE} $<$<COMPILE_LANGUAGE:CXX>:/MP> $<$<COMPILE_LANGUAGE:CXX>:/bigobj>)
target_compile_definitions(${module_name} ${IGL_SCOPE} -DNOMINMAX)
# Silencing some compilation warnings
if(LIBIGL_USE_STATIC_LIBRARY)
target_compile_options(${module_name} PRIVATE
# Type conversion warnings. These can be fixed with some effort and possibly more verbose code.
/wd4267 # conversion from 'size_t' to 'type', possible loss of data
/wd4244 # conversion from 'type1' to 'type2', possible loss of data
/wd4018 # signed/unsigned mismatch
/wd4305 # truncation from 'double' to 'float'
# This one is from template instantiations generated by autoexplicit.sh:
/wd4667 # no function template defined that matches forced instantiation ()
# This one is easy to fix, just need to switch to safe version of C functions
/wd4996 # this function or variable may be unsafe
# This one is when using bools in adjacency matrices
/wd4804 #'+=': unsafe use of type 'bool' in operation
)
endif()
endif()
# Generate position independent code
if(LIBIGL_POSITION_INDEPENDENT_CODE)
set_target_properties(${module_name} PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON)
if(LIBIGL_USE_STATIC_LIBRARY)
set_target_properties(${module_name} PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
endif()
# Folder for IDE
if(LIBIGL_USE_STATIC_LIBRARY OR CMAKE_VERSION VERSION_GREATER_EQUAL 3.19.0)
set_target_properties(${module_name} PROPERTIES FOLDER "Libigl")
endif()
endfunction()
+51
View File
@@ -0,0 +1,51 @@
function(igl_add_test module_name)
if(NOT LIBIGL_BUILD_TESTS)
return()
endif()
if(NOT TARGET ${module_name})
message(FATAL_ERROR "'${module_name}' is not a CMake target")
endif()
# Check if category is `copyleft` or `restricted`
if(${module_name} MATCHES "^igl_copyleft")
set(suffix "_copyleft")
elseif(${module_name} MATCHES "^igl_restricted")
set(suffix "_restricted")
else()
set(suffix "")
endif()
# Create test executable
add_executable(test_${module_name}
${libigl_SOURCE_DIR}/tests/main.cpp
${libigl_SOURCE_DIR}/tests/test_common.h
${ARGN}
)
# Include headers
target_include_directories(test_${module_name} PUBLIC ${libigl_SOURCE_DIR}/tests)
# Compile definitions
target_compile_definitions(test_${module_name} PUBLIC CATCH_CONFIG_ENABLE_BENCHMARKING)
# Dependencies
include(catch2)
include(libigl_tests_data)
target_link_libraries(test_${module_name} PUBLIC
${module_name}
igl::tests_data
Catch2::Catch2
)
# IDE Folder
set_target_properties(test_${module_name} PROPERTIES FOLDER Libigl_Tests)
# Output directory
set_target_properties(test_${module_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests")
# Register tests
FetchContent_GetProperties(catch2)
include("${catch2_SOURCE_DIR}/contrib/Catch.cmake")
catch_discover_tests(test_${module_name})
endfunction()
+20
View File
@@ -0,0 +1,20 @@
function(igl_add_tutorial name)
# Only create tutorial if dependencies have been enabled in the current build
foreach(module IN ITEMS ${ARGN})
if(NOT TARGET ${module})
return()
endif()
endforeach()
message(STATUS "Creating libigl tutorial: ${name}")
# get all cpp files in ${CMAKE_CURRENT_SOURCE_DIR}/${name}/
file(GLOB SRCFILES ${CMAKE_CURRENT_SOURCE_DIR}/${name}/*.cpp)
add_executable(${name} ${SRCFILES})
target_link_libraries(${name} PRIVATE
igl::core
igl::tutorial_data
${ARGN}
)
set_target_properties(${name} PROPERTIES FOLDER Libigl_Tutorials)
endfunction()
+97
View File
@@ -0,0 +1,97 @@
# Transitively list all link libraries of a target (recursive call)
function(igl_get_dependencies_recursive OUTPUT_VARIABLE TARGET)
get_target_property(_aliased ${TARGET} ALIASED_TARGET)
if(_aliased)
set(TARGET ${_aliased})
endif()
get_target_property(_IMPORTED ${TARGET} IMPORTED)
get_target_property(_TYPE ${TARGET} TYPE)
if(_IMPORTED OR (${_TYPE} STREQUAL "INTERFACE_LIBRARY"))
get_target_property(TARGET_DEPENDENCIES ${TARGET} INTERFACE_LINK_LIBRARIES)
else()
get_target_property(TARGET_DEPENDENCIES ${TARGET} LINK_LIBRARIES)
endif()
# MKL-specific list of runtime dependencies
get_property(RUNTIME_DEPENDENCIES TARGET ${TARGET} PROPERTY mkl_RUNTIME_DEPENDENCIES)
if(RUNTIME_DEPENDENCIES)
list(APPEND TARGET_DEPENDENCIES ${RUNTIME_DEPENDENCIES})
endif()
set(VISITED_TARGETS ${${OUTPUT_VARIABLE}})
foreach(DEPENDENCY IN ITEMS ${TARGET_DEPENDENCIES})
if(TARGET ${DEPENDENCY})
get_target_property(_aliased ${DEPENDENCY} ALIASED_TARGET)
if(_aliased)
set(DEPENDENCY ${_aliased})
endif()
if(NOT (DEPENDENCY IN_LIST VISITED_TARGETS))
list(APPEND VISITED_TARGETS ${DEPENDENCY})
igl_get_dependencies_recursive(VISITED_TARGETS ${DEPENDENCY})
endif()
endif()
endforeach()
set(${OUTPUT_VARIABLE} ${VISITED_TARGETS} PARENT_SCOPE)
endfunction()
# Transitively list all link libraries of a target
function(igl_get_dependencies OUTPUT_VARIABLE TARGET)
set(DISCOVERED_TARGETS "")
igl_get_dependencies_recursive(DISCOVERED_TARGETS ${TARGET})
set(${OUTPUT_VARIABLE} ${DISCOVERED_TARGETS} PARENT_SCOPE)
endfunction()
# Copy .dll dependencies to a target executable's folder. This function must be called *after* all the CMake
# dependencies of the executable target have been defined, otherwise some .dlls might not be copied to the target
# folder.
function(igl_copy_dll target)
if(NOT WIN32)
return()
endif()
# Sanity checks
get_target_property(TYPE ${target} TYPE)
if(NOT ${TYPE} STREQUAL "EXECUTABLE")
message(FATAL_ERROR "igl_copy_dll() was called on a non-executable target: ${target}")
endif()
# Create a custom command to do the actual copy. This needs to be executed before Catch2's POST_BUILD command,
# so we define this as a PRE_LINK command for the executable target.
add_custom_command(
TARGET ${target}
PRE_LINK
COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_BINARY_DIR}/runtime_deps/copy_dll_${target}_$<CONFIG>.cmake"
COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/runtime_deps/copy_dll_${target}_$<CONFIG>.cmake"
COMMENT "Copying dlls for target ${target}"
)
# Retrieve all target dependencies
igl_get_dependencies(TARGET_DEPENDENCIES ${target})
# Iterate over dependencies, and create a copy rule for each .dll that we find
set(COPY_SCRIPT_CONTENT "")
foreach(DEPENDENCY IN ITEMS ${TARGET_DEPENDENCIES})
get_target_property(TYPE ${DEPENDENCY} TYPE)
if(NOT (${TYPE} STREQUAL "SHARED_LIBRARY" OR ${TYPE} STREQUAL "MODULE_LIBRARY"))
continue()
endif()
# Instruction to copy target file if it exists
string(APPEND COPY_SCRIPT_CONTENT
"if(EXISTS \"$<TARGET_FILE:${DEPENDENCY}>\")\n "
"execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "
"\"$<TARGET_FILE:${DEPENDENCY}>\" "
"\"$<TARGET_FILE_DIR:${target}>/$<TARGET_FILE_NAME:${DEPENDENCY}>\")\n"
"endif()\n"
)
endforeach()
# Finally generate one script for each configuration supported by this generator
message(STATUS "Populating copy rules for target: ${target}")
file(GENERATE
OUTPUT ${CMAKE_BINARY_DIR}/runtime_deps/copy_dll_${target}_$<CONFIG>.cmake
CONTENT "${COPY_SCRIPT_CONTENT}"
)
endfunction()
+56
View File
@@ -0,0 +1,56 @@
# Helper functions to include libigl modules
function(_igl_include_full prefix name force)
string(TOUPPER "${prefix}" prefix_uc)
string(TOUPPER "${name}" name_uc)
if(prefix_uc)
string(PREPEND prefix_uc _)
endif()
string(TOLOWER "${prefix_uc}" prefix_lc)
if(TARGET igl${prefix_lc}::${name})
# Target already exists, skip
return()
endif()
if(${force} AND NOT ${name} STREQUAL "core")
message(STATUS "Forcing include of libigl module: ${name}")
endif()
# Dependencies are linked as INTERFACE targets unless libigl is compiled as a static library
if(LIBIGL_USE_STATIC_LIBRARY)
set(IGL_SCOPE PUBLIC)
else()
set(IGL_SCOPE INTERFACE)
endif()
# Retrieve module path use by libigl (necessary when calling igl_include() from a subproject)
get_property(igl_module_path GLOBAL PROPERTY __igl_module_path)
set(CMAKE_MODULE_PATH ${igl_module_path})
# Include igl target definition
if(LIBIGL${prefix_uc}_${name_uc} OR ${force})
include(${libigl_SOURCE_DIR}/cmake/igl/modules/${prefix}/${name}.cmake)
endif()
endfunction()
# Include module only if CMake option is provided
function(igl_include_optional name)
if(ARGC GREATER_EQUAL 2)
# Two args given: prefix + name
_igl_include_full(${name} ${ARGV1} FALSE)
else()
# Only one arg given: prefix (which contains module name)
_igl_include_full("" ${name} FALSE)
endif()
endfunction()
# Include module only unconditionally (e.g. if module is a dependency of another module)
function(igl_include name)
if(ARGC GREATER_EQUAL 2)
# Two args given: prefix + name
_igl_include_full(${name} ${ARGV1} TRUE)
else()
# Only one arg given: prefix (which contains module name)
_igl_include_full("" ${name} TRUE)
endif()
endfunction()
+63
View File
@@ -0,0 +1,63 @@
function(igl_install module_name)
if(NOT LIBIGL_INSTALL)
return()
endif()
# Check if category is `copyleft` or `restricted`
if(${module_name} MATCHES "^igl_copyleft")
set(suffix "_copyleft")
elseif(${module_name} MATCHES "^igl_restricted")
set(suffix "_restricted")
else()
set(suffix "")
endif()
########################
# Install CMake target #
########################
set_property(TARGET ${module_name} PROPERTY EXPORT_NAME ${module_export})
include(GNUInstallDirs)
install(TARGETS ${module_name}
EXPORT LibiglTargets${suffix}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT LibiglRuntime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT LibiglRuntime
NAMELINK_COMPONENT LibiglDevelopment
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT LibiglRuntime
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT LibiglDevelopment
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
###################
# Install headers #
###################
# TODO: When moving module definition to their own CMakeLists.txt, we should
# refactor this to use the folder where the target was defined (via the
# target property SOURCE_DIR).
set(target_include_dir ${libigl_SOURCE_DIR}/include)
foreach(source_path IN ITEMS ${ARGN})
# Filter out .cpp files in "static lib" mode
if(LIBIGL_USE_STATIC_LIBRARY)
get_filename_component(extension ${source_path} LAST_EXT)
if(extension MATCHES ".cpp")
continue()
endif()
endif()
# Compute relative path to copy
get_filename_component(source_directory ${source_path} DIRECTORY)
file(RELATIVE_PATH source_subdir ${target_include_dir} ${source_directory})
# Create install rule to copy specific header
install(
FILES ${source_path}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${source_subdir}
)
endforeach()
endfunction()
+8
View File
@@ -0,0 +1,8 @@
function(igl_target_sources module_name)
if(${CMAKE_VERSION} VERSION_LESS 3.19 AND NOT LIBIGL_USE_STATIC_LIBRARY)
# Old approach: defines a dummy custom target for the IDE
add_custom_target(${module_name}_ SOURCES ${ARGN})
else()
target_sources(${module_name} PRIVATE ${ARGN})
endif()
endfunction()
+7
View File
@@ -0,0 +1,7 @@
if(MSVC)
# https://github.com/mozilla/sccache/issues/242
if(CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "sccache")
string(REGEX REPLACE "/Z[iI7]" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
endif()
endif()
+7
View File
@@ -0,0 +1,7 @@
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
find_dependency(Eigen3 REQUIRED)
find_dependency(Threads REQUIRED)
include("${CMAKE_CURRENT_LIST_DIR}/LibiglConfigTargets.cmake")
check_required_components(Libigl)
+34
View File
@@ -0,0 +1,34 @@
# 1. Define module
igl_add_library(igl_copyleft_cgal)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_copyleft_cgal ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/cgal/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/cgal/*.cpp")
igl_target_sources(igl_copyleft_cgal ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(cgal)
igl_include(copyleft core)
target_link_libraries(igl_copyleft_cgal ${IGL_SCOPE}
igl::core
igl_copyleft::core
CGAL::CGAL
CGAL::CGAL_Core
)
# 5. Unit tests
file(GLOB SRC_FILES
"${libigl_SOURCE_DIR}/tests/include/igl/copyleft/boolean/*.cpp"
"${libigl_SOURCE_DIR}/tests/include/igl/copyleft/cgal/*.cpp"
)
igl_add_test(igl_copyleft_cgal ${SRC_FILES})
if(TARGET test_igl_copyleft_cgal)
igl_copy_dll(test_igl_copyleft_cgal)
endif()
+27
View File
@@ -0,0 +1,27 @@
# 1. Define module
igl_add_library(igl_copyleft_comiso)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_copyleft_comiso ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/comiso/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/comiso/*.cpp")
igl_target_sources(igl_copyleft_comiso ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(comiso)
igl_include(copyleft core)
target_link_libraries(igl_copyleft_comiso ${IGL_SCOPE}
igl::core
igl_copyleft::core
CoMISo::CoMISo
)
# 5. Unit tests
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/copyleft/comiso/*.cpp")
igl_add_test(igl_copyleft_comiso ${SRC_FILES})
+19
View File
@@ -0,0 +1,19 @@
# 1. Define module
igl_add_library(igl_copyleft_core)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_copyleft_core ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/*.cpp")
igl_target_sources(igl_copyleft_core ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
target_link_libraries(igl_copyleft_core ${IGL_SCOPE}
igl::core
)
+27
View File
@@ -0,0 +1,27 @@
# 1. Define module
igl_add_library(igl_copyleft_tetgen)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_copyleft_tetgen ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/tetgen/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/copyleft/tetgen/*.cpp")
igl_target_sources(igl_copyleft_tetgen ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(tetgen)
igl_include(copyleft core)
target_link_libraries(igl_copyleft_tetgen ${IGL_SCOPE}
igl::core
igl_copyleft::core
tetgen::tetgen
)
# 5. Unit tests
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/copyleft/tetgen/*.cpp")
igl_add_test(igl_copyleft_tetgen ${SRC_FILES})
+32
View File
@@ -0,0 +1,32 @@
# 1. Define module
igl_add_library(igl_core)
if(LIBIGL_USE_STATIC_LIBRARY)
set_target_properties(igl_core PROPERTIES OUTPUT_NAME igl)
endif()
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_core ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/*.cpp")
igl_target_sources(igl_core ${INC_FILES} ${SRC_FILES})
# 4. Install target & headers
igl_install(igl_core ${INC_FILES} ${SRC_FILES})
# 5. Dependencies
include(eigen)
find_package(Threads REQUIRED)
target_link_libraries(igl_core ${IGL_SCOPE}
Eigen3::Eigen
Threads::Threads
)
# 6. Unit tests
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/*.cpp")
igl_add_test(igl_core ${SRC_FILES})
+25
View File
@@ -0,0 +1,25 @@
# 1. Define module
igl_add_library(igl_embree)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_embree ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/embree/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/embree/*.cpp")
igl_target_sources(igl_embree ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(embree)
target_link_libraries(igl_embree ${IGL_SCOPE}
igl::core
embree::embree
)
# 5. Unit tests
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/embree/*.cpp")
igl_add_test(igl_embree ${SRC_FILES})
+29
View File
@@ -0,0 +1,29 @@
# 1. Define module
igl_add_library(igl_glfw)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_glfw ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/glfw/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/glfw/*.cpp")
igl_target_sources(igl_glfw ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(glfw)
igl_include(opengl)
target_link_libraries(igl_glfw ${IGL_SCOPE}
igl::core
igl::opengl
glfw::glfw
)
# 5. Unit tests
if(LIBIGL_GLFW_TESTS)
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/opengl/glfw/*.cpp")
igl_add_test(igl_glfw ${SRC_FILES})
endif()
+27
View File
@@ -0,0 +1,27 @@
# 1. Define module
igl_add_library(igl_imgui)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_imgui ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/glfw/imgui/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/glfw/imgui/*.cpp")
igl_target_sources(igl_imgui ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(imgui)
include(imguizmo)
include(libigl_imgui_fonts)
igl_include(glfw)
target_link_libraries(igl_imgui ${IGL_SCOPE}
igl::core
igl::glfw
imgui::imgui
imguizmo::imguizmo
igl::imgui_fonts
)
+24
View File
@@ -0,0 +1,24 @@
# 1. Define module
igl_add_library(igl_opengl)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_opengl ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/*.cpp")
igl_target_sources(igl_opengl ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(glad)
find_package(OpenGL REQUIRED OPTIONAL_COMPONENTS OpenGL)
target_link_libraries(igl_opengl ${IGL_SCOPE}
igl::core
glad::glad
# Link against OpenGL::OpenGL if available, or fallback to OpenGL::GL
$<IF:$<TARGET_EXISTS:OpenGL::OpenGL>,OpenGL::OpenGL,OpenGL::GL>
)
+25
View File
@@ -0,0 +1,25 @@
# 1. Define module
igl_add_library(igl_predicates)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_predicates ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/predicates/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/predicates/*.cpp")
igl_target_sources(igl_predicates ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(predicates)
target_link_libraries(igl_predicates ${IGL_SCOPE}
igl::core
predicates::predicates
)
# 5. Unit tests
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/predicates/*.cpp")
igl_add_test(igl_predicates ${SRC_FILES})
+25
View File
@@ -0,0 +1,25 @@
# 1. Define module
igl_add_library(igl_restricted_matlab)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_restricted_matlab ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/matlab/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/matlab/*.cpp")
igl_target_sources(igl_restricted_matlab ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
# MATLAB_ADDITIONAL_VERSIONS should have already been set in libigl/CMakeLists.txt
find_package(Matlab REQUIRED COMPONENTS MEX_COMPILER MX_LIBRARY ENG_LIBRARY MAT_LIBRARY)
# to-do detect if imported targets are available (cmake 3.22's findmatlab has
# them) and use those instead of hard coding these.
target_link_libraries(igl_restricted_matlab ${IGL_SCOPE} igl::core ${Matlab_LIBRARIES})
target_include_directories(igl_restricted_matlab ${IGL_SCOPE} ${Matlab_INCLUDE_DIRS})
# 5. Unit tests
# to-do write some matlab tests
+27
View File
@@ -0,0 +1,27 @@
# 1. Define module
igl_add_library(igl_restricted_mosek)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_restricted_mosek ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/mosek/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/mosek/*.cpp")
igl_target_sources(igl_restricted_mosek ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
find_package(MOSEK REQUIRED)
target_include_directories(igl_restricted_mosek ${IGL_SCOPE} ${MOSEK_INCLUDE_DIRS})
target_link_libraries(igl_restricted_mosek ${IGL_SCOPE} igl::core ${MOSEK_LIBRARIES})
# 5. Unit tests
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/mosek/*.cpp")
igl_add_test(igl_restricted_mosek ${SRC_FILES})
IF(APPLE)
INCLUDE(${libigl_SOURCE_DIR}/cmake/misc/OSXFixDylibReferences.cmake)
OSX_FIX_DYLIB_REFERENCES(test_igl_restricted_mosek "${MOSEK_LIBRARIES}")
ENDIF()
@@ -0,0 +1,29 @@
# 1. Define module
igl_add_library(igl_restricted_triangle)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_restricted_triangle ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/triangle/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/triangle/*.cpp")
igl_target_sources(igl_restricted_triangle ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(triangle)
target_link_libraries(igl_restricted_triangle ${IGL_SCOPE}
igl::core
triangle::triangle
)
# 5. Unit tests
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/triangle/*.cpp")
igl_add_test(igl_restricted_triangle ${SRC_FILES})
if(TARGET test_igl_restricted_triangle)
igl_include(predicates)
target_link_libraries(test_igl_restricted_triangle PUBLIC igl::predicates)
endif()
+25
View File
@@ -0,0 +1,25 @@
# 1. Define module
igl_add_library(igl_spectra)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_spectra ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/spectra/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/spectra/*.cpp")
igl_target_sources(igl_spectra ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(spectra)
target_link_libraries(igl_spectra ${IGL_SCOPE}
igl::core
spectra::spectra
)
# 5. Unit tests
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/tests/include/igl/spectra/*.cpp")
igl_add_test(igl_spectra ${SRC_FILES})
+35
View File
@@ -0,0 +1,35 @@
# 1. Define module
igl_add_library(igl_stb)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_stb ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/stb/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/stb/*.cpp")
if(LIBIGL_OPENGL)
message(STATUS "Including igl/opengl/stb support")
file(GLOB OPENGL_INC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/stb/*.h")
file(GLOB OPENGL_SRC_FILES "${libigl_SOURCE_DIR}/include/igl/opengl/stb/*.cpp")
list(APPEND INC_FILES ${OPENGL_INC_FILES})
list(APPEND SRC_FILES ${OPENGL_SRC_FILES})
endif()
igl_target_sources(igl_stb ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(stb)
target_link_libraries(igl_stb ${IGL_SCOPE}
igl::core
stb::stb
)
if(LIBIGL_OPENGL)
igl_include(opengl)
target_link_libraries(igl_stb ${IGL_SCOPE}
igl::opengl
)
endif()
+21
View File
@@ -0,0 +1,21 @@
# 1. Define module
igl_add_library(igl_xml)
# 2. Include headers
include(GNUInstallDirs)
target_include_directories(igl_xml ${IGL_SCOPE}
$<BUILD_INTERFACE:${libigl_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
# 3. Target sources
file(GLOB INC_FILES "${libigl_SOURCE_DIR}/include/igl/xml/*.h")
file(GLOB SRC_FILES "${libigl_SOURCE_DIR}/include/igl/xml/*.cpp")
igl_target_sources(igl_xml ${INC_FILES} ${SRC_FILES})
# 4. Dependencies
include(tinyxml2)
target_link_libraries(igl_xml ${IGL_SCOPE}
igl::core
tinyxml2::tinyxml2
)
-8
View File
@@ -1,8 +0,0 @@
# This is a conda environment that can be used to compile libigl with CGAL on Windows
# Only boost is required to be installed on the system, CGAL is automatically downloaded
# by CMake and is built with libigl.
name: libigl-cgal
channels:
- conda-forge
dependencies:
- boost-cpp=1.65.0
-31
View File
@@ -1,31 +0,0 @@
@PACKAGE_INIT@
include(${CMAKE_CURRENT_LIST_DIR}/libigl-export.cmake)
# Check if Eigen3 target is avaiable, if not try to locate it
# with find_package.
message(STATUS "[libigl] Looking for Eigen3")
if (NOT TARGET Eigen3::Eigen)
# Try if Eigen3 can be found with find_package
find_package(Eigen3 CONFIG REQUIRED)
endif()
if (TARGET igl::core)
if (TARGET Eigen3::Eigen)
# Inject dependency
set_target_properties(igl::core PROPERTIES INTERFACE_LINK_LIBRARIES Eigen3::Eigen)
set(libigl_core_FOUND TRUE)
endif()
endif()
if (TARGET igl::common)
if (TARGET Eigen3::Eigen)
# Inject dependency
set_target_properties(igl::common PROPERTIES INTERFACE_LINK_LIBRARIES Eigen3::Eigen)
set(libigl_common_FOUND TRUE)
endif()
endif()
check_required_components(libigl)
+32 -568
View File
@@ -1,570 +1,34 @@
cmake_minimum_required(VERSION 3.1)
# https://github.com/libigl/libigl/issues/751
# http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160425/351643.html
if(APPLE)
if(NOT CMAKE_LIBTOOL)
find_program(CMAKE_LIBTOOL NAMES libtool)
endif()
if(CMAKE_LIBTOOL)
set(CMAKE_LIBTOOL ${CMAKE_LIBTOOL} CACHE PATH "libtool executable")
message(STATUS "Found libtool - ${CMAKE_LIBTOOL}")
get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
foreach(lang ${languages})
# Added -c
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
"${CMAKE_LIBTOOL} -c -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
endforeach()
endif()
# Sanity check for backward compatibility
get_filename_component(PATH_X "${libigl_SOURCE_DIR}" REALPATH)
get_filename_component(PATH_Y "${CMAKE_CURRENT_LIST_DIR}/.." REALPATH)
if(NOT PATH_X STREQUAL PATH_Y)
message(FATAL_ERROR "You included libigl.cmake directly from your own project. This behavior "
"is not supported anymore. Please add libigl to your project via "
"add_subdirectory(<path_to_libigl>). See the libigl example project for "
"more information: https://github.com/libigl/libigl-example-project/")
endif()
### Available options ###
option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" OFF)
option(LIBIGL_WITH_CGAL "Use CGAL" OFF)
option(LIBIGL_WITH_COMISO "Use CoMiso" OFF)
option(LIBIGL_WITH_CORK "Use Cork" OFF)
option(LIBIGL_WITH_EMBREE "Use Embree" OFF)
option(LIBIGL_WITH_MATLAB "Use Matlab" OFF)
option(LIBIGL_WITH_MOSEK "Use MOSEK" OFF)
option(LIBIGL_WITH_OPENGL "Use OpenGL" OFF)
option(LIBIGL_WITH_OPENGL_GLFW "Use GLFW" OFF)
option(LIBIGL_WITH_OPENGL_GLFW_IMGUI "Use ImGui" OFF)
option(LIBIGL_WITH_PNG "Use PNG" OFF)
option(LIBIGL_WITH_TETGEN "Use Tetgen" OFF)
option(LIBIGL_WITH_TRIANGLE "Use Triangle" OFF)
option(LIBIGL_WITH_PREDICATES "Use exact predicates" OFF)
option(LIBIGL_WITH_XML "Use XML" OFF)
option(LIBIGL_WITHOUT_COPYLEFT "Disable Copyleft libraries" OFF)
option(LIBIGL_EXPORT_TARGETS "Export libigl CMake targets" OFF)
if(LIBIGL_BUILD_PYTHON)
message(FATAL_ERROR "Python bindings have been removed in this version. Please use an older version of libigl, or wait for the new bindings to be released.")
endif()
################################################################################
### Configuration
set(LIBIGL_ROOT "${CMAKE_CURRENT_LIST_DIR}/..")
set(LIBIGL_SOURCE_DIR "${LIBIGL_ROOT}/include")
set(LIBIGL_EXTERNAL "${LIBIGL_ROOT}/external")
# Dependencies are linked as INTERFACE targets unless libigl is compiled as a static library
if(LIBIGL_USE_STATIC_LIBRARY)
set(IGL_SCOPE PUBLIC)
else()
set(IGL_SCOPE INTERFACE)
endif()
# Download and update 3rdparty libraries
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
include(LibiglDownloadExternal)
# Provides igl_set_folders() to set folders for Visual Studio/Xcode
include(LibiglFolders)
################################################################################
### IGL Common
################################################################################
add_library(igl_common INTERFACE)
target_include_directories(igl_common SYSTEM INTERFACE
$<BUILD_INTERFACE:${LIBIGL_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
# Export igl_common as igl::common
set_property(TARGET igl_common PROPERTY EXPORT_NAME igl::common)
if(LIBIGL_USE_STATIC_LIBRARY)
target_compile_definitions(igl_common INTERFACE -DIGL_STATIC_LIBRARY)
endif()
# Transitive C++11 flags
include(CXXFeatures)
target_compile_features(igl_common INTERFACE ${CXX11_FEATURES})
# Other compilation flags
if(MSVC)
# Enable parallel compilation for Visual Studio
target_compile_options(igl_common INTERFACE /MP /bigobj)
target_compile_definitions(igl_common INTERFACE -DNOMINMAX)
endif()
# Controls whether to use the static MSVC runtime or not
include(LibiglWindows)
if(BUILD_SHARED_LIBS)
# Generate position independent code
set_target_properties(igl_common PROPERTIES INTERFACE_POSITION_INDEPENDENT_CODE ON)
endif()
if(UNIX AND NOT HUNTER_ENABLED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
endif()
if(HUNTER_ENABLED)
hunter_add_package(Eigen)
find_package(Eigen3 CONFIG REQUIRED)
endif()
# Eigen
if(NOT TARGET Eigen3::Eigen)
igl_download_eigen()
add_library(igl_eigen INTERFACE)
target_include_directories(igl_eigen SYSTEM INTERFACE
$<BUILD_INTERFACE:${LIBIGL_EXTERNAL}/eigen>
$<INSTALL_INTERFACE:include>
)
set_property(TARGET igl_eigen PROPERTY EXPORT_NAME Eigen3::Eigen)
add_library(Eigen3::Eigen ALIAS igl_eigen)
endif()
target_link_libraries(igl_common INTERFACE Eigen3::Eigen)
# C++11 Thread library
find_package(Threads REQUIRED)
target_link_libraries(igl_common INTERFACE ${CMAKE_THREAD_LIBS_INIT})
################################################################################
## CGAL dependencies on Windows: GMP & MPFR
function(igl_download_cgal_deps)
if(WIN32)
igl_download_project(gmp
URL https://cgal.geometryfactory.com/CGAL/precompiled_libs/auxiliary/x64/GMP/5.0.1/gmp-all-CGAL-3.9.zip
URL_MD5 508c1292319c832609329116a8234c9f
)
igl_download_project(mpfr
URL https://cgal.geometryfactory.com/CGAL/precompiled_libs/auxiliary/x64/MPFR/3.0.0/mpfr-all-CGAL-3.9.zip
URL_MD5 48840454eef0ff18730050c05028734b
)
set(ENV{GMP_DIR} "${LIBIGL_EXTERNAL}/gmp")
set(ENV{MPFR_DIR} "${LIBIGL_EXTERNAL}/mpfr")
endif()
endfunction()
################################################################################
function(compile_igl_module module_dir)
string(REPLACE "/" "_" module_name "${module_dir}")
if(module_name STREQUAL "core")
set(module_libname "igl")
else()
set(module_libname "igl_${module_name}")
endif()
if(LIBIGL_USE_STATIC_LIBRARY)
file(GLOB SOURCES_IGL_${module_name}
"${LIBIGL_SOURCE_DIR}/igl/${module_dir}/*.cpp"
"${LIBIGL_SOURCE_DIR}/igl/${module_dir}/*.h*"
)
if(NOT LIBIGL_WITHOUT_COPYLEFT)
file(GLOB COPYLEFT_SOURCES_IGL_${module_name}
"${LIBIGL_SOURCE_DIR}/igl/copyleft/${module_dir}/*.cpp"
"${LIBIGL_SOURCE_DIR}/igl/copyleft/${module_dir}/*.h*"
)
list(APPEND SOURCES_IGL_${module_name} ${COPYLEFT_SOURCES_IGL_${module_name}})
endif()
add_library(${module_libname} STATIC ${SOURCES_IGL_${module_name}} ${ARGN})
if(MSVC)
# Silencing some compile warnings
target_compile_options(${module_libname} PRIVATE
# Type conversion warnings. These can be fixed with some effort and possibly more verbose code.
/wd4267 # conversion from 'size_t' to 'type', possible loss of data
/wd4244 # conversion from 'type1' to 'type2', possible loss of data
/wd4018 # signed/unsigned mismatch
/wd4305 # truncation from 'double' to 'float'
# This one is from template instantiations generated by autoexplicit.sh:
/wd4667 # no function template defined that matches forced instantiation ()
# This one is easy to fix, just need to switch to safe version of C functions
/wd4996 # this function or variable may be unsafe
# This one is when using bools in adjacency matrices
/wd4804 #'+=': unsafe use of type 'bool' in operation
)
endif()
else()
add_library(${module_libname} INTERFACE)
endif()
target_link_libraries(${module_libname} ${IGL_SCOPE} igl_common)
if(NOT module_name STREQUAL "core")
target_link_libraries(${module_libname} ${IGL_SCOPE} igl)
endif()
# Alias target because it looks nicer
message(STATUS "Creating target: igl::${module_name} (${module_libname})")
add_library(igl::${module_name} ALIAS ${module_libname})
# Export as igl::${module_name}
set_property(TARGET ${module_libname} PROPERTY EXPORT_NAME igl::${module_name})
endfunction()
################################################################################
### IGL Core
################################################################################
if(LIBIGL_USE_STATIC_LIBRARY)
file(GLOB SOURCES_IGL
"${LIBIGL_SOURCE_DIR}/igl/*.cpp"
"${LIBIGL_SOURCE_DIR}/igl/*.h*"
"${LIBIGL_SOURCE_DIR}/igl/copyleft/*.cpp"
"${LIBIGL_SOURCE_DIR}/igl/copyleft/*.h*"
)
endif()
compile_igl_module("core" ${SOURCES_IGL})
################################################################################
### Download the python part ###
if(LIBIGL_WITH_PYTHON)
endif()
################################################################################
### Compile the CGAL part ###
if(LIBIGL_WITH_CGAL)
# Try to find the CGAL library
# CGAL Core is needed for
# `Exact_predicates_exact_constructions_kernel_with_sqrt`
if(NOT TARGET CGAL::CGAL)
set(CGAL_DIR "${LIBIGL_EXTERNAL}/cgal")
igl_download_cgal()
igl_download_cgal_deps()
message("BOOST_ROOT: ${BOOST_ROOT}")
if(EXISTS ${LIBIGL_EXTERNAL}/boost)
set(BOOST_ROOT "${LIBIGL_EXTERNAL}/boost")
endif()
option(CGAL_Boost_USE_STATIC_LIBS "Use static Boost libs with CGAL" ON)
find_package(CGAL CONFIG COMPONENTS Core PATHS ${CGAL_DIR} NO_DEFAULT_PATH)
endif()
# If CGAL has been found, then build the libigl module
if(TARGET CGAL::CGAL AND TARGET CGAL::CGAL_Core)
compile_igl_module("cgal")
target_link_libraries(igl_cgal ${IGL_SCOPE} CGAL::CGAL CGAL::CGAL_Core)
else()
message(FATAL_ERROR "Could not define CGAL::CGAL and CGAL::CGAL_Core.")
endif()
endif()
# Helper function for `igl_copy_cgal_dll()`
function(igl_copy_imported_dll src_target dst_target)
get_target_property(other_libs ${src_target} INTERFACE_LINK_LIBRARIES)
set(locations)
list(APPEND locations ${main_lib} ${other_libs})
foreach(location ${locations})
string(REGEX MATCH "^(.*)\\.[^.]*$" dummy ${location})
set(location "${CMAKE_MATCH_1}.dll")
if(EXISTS "${location}" AND location MATCHES "^.*\\.dll$")
add_custom_command(TARGET ${dst_target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${location}" $<TARGET_FILE_DIR:${dst_target}>)
endif()
endforeach()
endfunction()
# Convenient functions to copy CGAL dlls into a target (executable) destination folder (for Windows)
function(igl_copy_cgal_dll target)
if(WIN32 AND LIBIGL_WITH_CGAL)
igl_copy_imported_dll(CGAL::CGAL ${target})
igl_copy_imported_dll(CGAL::CGAL_Core ${target})
endif()
endfunction()
################################################################################
### Compile the CoMISo part ###
# NOTE: this cmakefile works only with the
# comiso available here: https://github.com/libigl/CoMISo
if(LIBIGL_WITH_COMISO)
compile_igl_module("comiso")
if(NOT TARGET CoMISo)
igl_download_comiso()
add_subdirectory("${LIBIGL_EXTERNAL}/CoMISo" CoMISo)
endif()
target_link_libraries(igl_comiso ${IGL_SCOPE} CoMISo)
endif()
################################################################################
### Compile the cork part ###
if(LIBIGL_WITH_CORK)
set(CORK_DIR "${LIBIGL_EXTERNAL}/cork")
if(NOT TARGET cork)
# call this "lib-cork" instead of "cork", otherwise cmake gets confused about
# "cork" executable
igl_download_cork()
add_subdirectory("${CORK_DIR}" "lib-cork")
endif()
compile_igl_module("cork")
target_include_directories(igl_cork ${IGL_SCOPE} cork)
target_include_directories(igl_cork ${IGL_SCOPE} "${CORK_DIR}/src")
target_link_libraries(igl_cork ${IGL_SCOPE} cork)
endif()
################################################################################
### Compile the embree part ###
if(LIBIGL_WITH_EMBREE)
set(EMBREE_DIR "${LIBIGL_EXTERNAL}/embree")
if(NOT TARGET embree)
igl_download_embree()
set(EMBREE_TESTING_INTENSITY 0 CACHE STRING "")
set(EMBREE_ISPC_SUPPORT OFF CACHE BOOL " ")
set(EMBREE_TASKING_SYSTEM "INTERNAL" CACHE BOOL " ")
set(EMBREE_TUTORIALS OFF CACHE BOOL " ")
set(EMBREE_MAX_ISA "SSE2" CACHE STRING " ")
set(EMBREE_STATIC_LIB ON CACHE BOOL " ")
if(MSVC)
set(EMBREE_STATIC_RUNTIME ${IGL_STATIC_RUNTIME} CACHE BOOL "Use the static version of the C/C++ runtime library.")
endif()
add_subdirectory("${EMBREE_DIR}" "embree" EXCLUDE_FROM_ALL)
endif()
compile_igl_module("embree")
target_link_libraries(igl_embree ${IGL_SCOPE} embree)
target_include_directories(igl_embree ${IGL_SCOPE} ${EMBREE_DIR}/include)
target_compile_definitions(igl_embree ${IGL_SCOPE} -DEMBREE_STATIC_LIB)
endif()
################################################################################
### Compile the matlab part ###
if(LIBIGL_WITH_MATLAB)
find_package(Matlab REQUIRED COMPONENTS MEX_COMPILER MX_LIBRARY ENG_LIBRARY MAT_LIBRARY)
compile_igl_module("matlab")
target_link_libraries(igl_matlab ${IGL_SCOPE} ${Matlab_LIBRARIES})
target_include_directories(igl_matlab ${IGL_SCOPE} ${Matlab_INCLUDE_DIRS})
endif()
################################################################################
### Compile the mosek part ###
if(LIBIGL_WITH_MOSEK)
find_package(MOSEK REQUIRED)
compile_igl_module("mosek")
target_link_libraries(igl_mosek ${IGL_SCOPE} ${MOSEK_LIBRARIES})
target_include_directories(igl_mosek ${IGL_SCOPE} ${MOSEK_INCLUDE_DIRS})
target_compile_definitions(igl_mosek ${IGL_SCOPE} -DLIBIGL_WITH_MOSEK)
endif()
################################################################################
### Compile the opengl part ###
if(LIBIGL_WITH_OPENGL)
# OpenGL module
compile_igl_module("opengl")
# OpenGL library
if (NOT CMAKE_VERSION VERSION_LESS "3.11")
cmake_policy(SET CMP0072 NEW)
endif()
find_package(OpenGL REQUIRED)
if(TARGET OpenGL::GL)
target_link_libraries(igl_opengl ${IGL_SCOPE} OpenGL::GL)
else()
target_link_libraries(igl_opengl ${IGL_SCOPE} ${OPENGL_gl_LIBRARY})
target_include_directories(igl_opengl SYSTEM ${IGL_SCOPE} ${OPENGL_INCLUDE_DIR})
endif()
# glad module
if(NOT TARGET glad)
igl_download_glad()
add_subdirectory(${LIBIGL_EXTERNAL}/glad glad)
endif()
target_link_libraries(igl_opengl ${IGL_SCOPE} glad)
endif()
################################################################################
### Compile the GLFW part ###
if(LIBIGL_WITH_OPENGL_GLFW)
if(TARGET igl::opengl)
# GLFW module
compile_igl_module("opengl/glfw")
if(NOT TARGET glfw)
igl_download_glfw()
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
option(GLFW_INSTALL "Generate installation target" OFF)
if(IGL_STATIC_RUNTIME)
set(USE_MSVC_RUNTIME_LIBRARY_DLL OFF CACHE BOOL "Use MSVC runtime library DLL" FORCE)
else()
set(USE_MSVC_RUNTIME_LIBRARY_DLL ON CACHE BOOL "Use MSVC runtime library DLL" FORCE)
endif()
add_subdirectory(${LIBIGL_EXTERNAL}/glfw glfw)
endif()
target_link_libraries(igl_opengl_glfw ${IGL_SCOPE} igl_opengl glfw)
endif()
endif()
################################################################################
### Compile the ImGui part ###
if(LIBIGL_WITH_OPENGL_GLFW_IMGUI)
if(TARGET igl::opengl_glfw)
# ImGui module
compile_igl_module("opengl/glfw/imgui")
if(NOT TARGET imgui)
igl_download_imgui()
add_subdirectory(${LIBIGL_EXTERNAL}/libigl-imgui imgui)
endif()
target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui)
endif()
endif()
################################################################################
### Compile the png part ###
if(LIBIGL_WITH_PNG)
# png/ module is anomalous because it also depends on opengl it really should
# be moved into the opengl/ directory and namespace ...
if(TARGET igl_opengl)
if(NOT TARGET stb_image)
igl_download_stb()
add_subdirectory(${LIBIGL_EXTERNAL}/stb stb_image)
endif()
compile_igl_module("png" "")
target_link_libraries(igl_png ${IGL_SCOPE} igl_stb_image igl_opengl)
endif()
endif()
################################################################################
### Compile the tetgen part ###
if(LIBIGL_WITH_TETGEN)
set(TETGEN_DIR "${LIBIGL_EXTERNAL}/tetgen")
if(NOT TARGET tetgen)
igl_download_tetgen()
add_subdirectory("${TETGEN_DIR}" "tetgen")
endif()
compile_igl_module("tetgen")
target_link_libraries(igl_tetgen ${IGL_SCOPE} tetgen)
target_include_directories(igl_tetgen ${IGL_SCOPE} ${TETGEN_DIR})
endif()
################################################################################
### Compile the triangle part ###
if(LIBIGL_WITH_TRIANGLE)
set(TRIANGLE_DIR "${LIBIGL_EXTERNAL}/triangle")
if(NOT TARGET triangle)
igl_download_triangle()
add_subdirectory("${TRIANGLE_DIR}" "triangle")
endif()
compile_igl_module("triangle")
target_link_libraries(igl_triangle ${IGL_SCOPE} triangle)
target_include_directories(igl_triangle ${IGL_SCOPE} ${TRIANGLE_DIR})
endif()
################################################################################
### Compile the predicates part ###
if(LIBIGL_WITH_PREDICATES)
set(PREDICATES_DIR "${LIBIGL_EXTERNAL}/predicates")
if(NOT TARGET predicates)
igl_download_predicates()
add_subdirectory("${PREDICATES_DIR}" "predicates")
endif()
compile_igl_module("predicates")
target_link_libraries(igl_predicates ${IGL_SCOPE} predicates)
target_include_directories(igl_predicates ${IGL_SCOPE} ${PREDICATES_DIR})
target_compile_definitions(igl_predicates ${IGL_SCOPE} -DLIBIGL_WITH_PREDICATES)
endif()
################################################################################
### Compile the xml part ###
if(LIBIGL_WITH_XML)
set(TINYXML2_DIR "${LIBIGL_EXTERNAL}/tinyxml2")
if(NOT TARGET tinyxml2)
igl_download_tinyxml2()
add_library(tinyxml2 STATIC ${TINYXML2_DIR}/tinyxml2.cpp ${TINYXML2_DIR}/tinyxml2.h)
target_include_directories(tinyxml2 PUBLIC ${TINYXML2_DIR})
set_target_properties(tinyxml2 PROPERTIES
COMPILE_DEFINITIONS "TINYXML2_EXPORT"
VERSION "3.0.0"
SOVERSION "3")
endif()
compile_igl_module("xml")
target_link_libraries(igl_xml ${IGL_SCOPE} tinyxml2)
target_include_directories(igl_xml ${IGL_SCOPE} ${TINYXML2_DIR})
endif()
################################################################################
### Install and export all modules
if(NOT LIBIGL_EXPORT_TARGETS)
return()
endif()
function(install_dir_files dir_name)
if (dir_name STREQUAL "core")
set(subpath "")
else()
set(subpath "/${dir_name}")
endif()
file(GLOB public_headers
${CMAKE_CURRENT_SOURCE_DIR}/include/igl${subpath}/*.h
${CMAKE_CURRENT_SOURCE_DIR}/include/igl${subpath}/*.hpp
)
set(files_to_install ${public_headers})
if(NOT LIBIGL_USE_STATIC_LIBRARY)
file(GLOB public_sources
${CMAKE_CURRENT_SOURCE_DIR}/include/igl${subpath}/*.cpp
${CMAKE_CURRENT_SOURCE_DIR}/include/igl${subpath}/*.c
)
endif()
list(APPEND files_to_install ${public_sources})
install(
FILES ${files_to_install}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/igl${subpath}
)
endfunction()
################################################################################
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
if(TARGET igl_eigen)
set(IGL_EIGEN igl_eigen)
else()
set(IGL_EIGEN)
message(WARNING "Trying to export igl targets while using an imported target for Eigen.")
endif()
# Install and export core library
install(
TARGETS
igl
igl_common
${IGL_EIGEN}
EXPORT igl-export
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
export(
TARGETS
igl
igl_common
${IGL_EIGEN}
FILE libigl-export.cmake
)
# Install headers for core library
install_dir_files(core)
install_dir_files(copyleft)
# Write package configuration file
configure_package_config_file(
${CMAKE_CURRENT_LIST_DIR}/libigl-config.cmake.in
${CMAKE_BINARY_DIR}/libigl-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/libigl/cmake
)
install(
FILES
${CMAKE_BINARY_DIR}/libigl-config.cmake
DESTINATION
${CMAKE_INSTALL_DATADIR}/libigl/cmake
)
# Write export file
export(EXPORT igl-export
FILE "${CMAKE_BINARY_DIR}/libigl-export.cmake"
)
install(EXPORT igl-export DESTINATION ${CMAKE_INSTALL_DATADIR}/libigl/cmake FILE libigl-export.cmake)
export(PACKAGE libigl)
# Global options
include(igl_windows)
# Libigl permissive modules
igl_include(core)
igl_include_optional(embree)
igl_include_optional(opengl)
igl_include_optional(glfw)
igl_include_optional(imgui)
igl_include_optional(predicates)
igl_include_optional(stb)
igl_include_optional(spectra)
igl_include_optional(xml)
# Libigl copyleft modules
igl_include_optional(copyleft core)
igl_include_optional(copyleft cgal)
igl_include_optional(copyleft comiso)
igl_include_optional(copyleft tetgen)
# Libigl restricted modules
igl_include_optional(restricted matlab)
igl_include_optional(restricted mosek)
igl_include_optional(restricted triangle)
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2018, Ruslan Baratov
# Copyright (c) 2013-2019, Ruslan Baratov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -59,8 +59,9 @@ include(CMakeParseArguments) # cmake_parse_arguments
option(HUNTER_STATUS_PRINT "Print working status" ON)
option(HUNTER_STATUS_DEBUG "Print a lot info" OFF)
option(HUNTER_TLS_VERIFY "Enable/disable TLS certificate checking on downloads" ON)
set(HUNTER_ROOT "" CACHE FILEPATH "Override the HUNTER_ROOT.")
set(HUNTER_WIKI "https://github.com/ruslo/hunter/wiki")
set(HUNTER_ERROR_PAGE "https://hunter.readthedocs.io/en/latest/reference/errors")
function(hunter_gate_status_print)
if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)
@@ -79,9 +80,9 @@ function(hunter_gate_status_debug)
endif()
endfunction()
function(hunter_gate_wiki wiki_page)
message("------------------------------ WIKI -------------------------------")
message(" ${HUNTER_WIKI}/${wiki_page}")
function(hunter_gate_error_page error_page)
message("------------------------------ ERROR ------------------------------")
message(" ${HUNTER_ERROR_PAGE}/${error_page}.html")
message("-------------------------------------------------------------------")
message("")
message(FATAL_ERROR "")
@@ -94,14 +95,13 @@ function(hunter_gate_internal_error)
endforeach()
message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
hunter_gate_wiki("error.internal")
hunter_gate_error_page("error.internal")
endfunction()
function(hunter_gate_fatal_error)
cmake_parse_arguments(hunter "" "WIKI" "" "${ARGV}")
string(COMPARE EQUAL "${hunter_WIKI}" "" have_no_wiki)
if(have_no_wiki)
hunter_gate_internal_error("Expected wiki")
cmake_parse_arguments(hunter "" "ERROR_PAGE" "" "${ARGV}")
if("${hunter_ERROR_PAGE}" STREQUAL "")
hunter_gate_internal_error("Expected ERROR_PAGE")
endif()
message("")
foreach(x ${hunter_UNPARSED_ARGUMENTS})
@@ -109,11 +109,11 @@ function(hunter_gate_fatal_error)
endforeach()
message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
message("")
hunter_gate_wiki("${hunter_WIKI}")
hunter_gate_error_page("${hunter_ERROR_PAGE}")
endfunction()
function(hunter_gate_user_error)
hunter_gate_fatal_error(${ARGV} WIKI "error.incorrect.input.data")
hunter_gate_fatal_error(${ARGV} ERROR_PAGE "error.incorrect.input.data")
endfunction()
function(hunter_gate_self root version sha1 result)
@@ -149,24 +149,21 @@ endfunction()
# Set HUNTER_GATE_ROOT cmake variable to suitable value.
function(hunter_gate_detect_root)
# Check CMake variable
string(COMPARE NOTEQUAL "${HUNTER_ROOT}" "" not_empty)
if(not_empty)
if(HUNTER_ROOT)
set(HUNTER_GATE_ROOT "${HUNTER_ROOT}" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT detected by cmake variable")
return()
endif()
# Check environment variable
string(COMPARE NOTEQUAL "$ENV{HUNTER_ROOT}" "" not_empty)
if(not_empty)
if(DEFINED ENV{HUNTER_ROOT})
set(HUNTER_GATE_ROOT "$ENV{HUNTER_ROOT}" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT detected by environment variable")
return()
endif()
# Check HOME environment variable
string(COMPARE NOTEQUAL "$ENV{HOME}" "" result)
if(result)
if(DEFINED ENV{HOME})
set(HUNTER_GATE_ROOT "$ENV{HOME}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug("HUNTER_ROOT set using HOME environment variable")
return()
@@ -174,8 +171,7 @@ function(hunter_gate_detect_root)
# Check SYSTEMDRIVE and USERPROFILE environment variable (windows only)
if(WIN32)
string(COMPARE NOTEQUAL "$ENV{SYSTEMDRIVE}" "" result)
if(result)
if(DEFINED ENV{SYSTEMDRIVE})
set(HUNTER_GATE_ROOT "$ENV{SYSTEMDRIVE}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug(
"HUNTER_ROOT set using SYSTEMDRIVE environment variable"
@@ -183,8 +179,7 @@ function(hunter_gate_detect_root)
return()
endif()
string(COMPARE NOTEQUAL "$ENV{USERPROFILE}" "" result)
if(result)
if(DEFINED ENV{USERPROFILE})
set(HUNTER_GATE_ROOT "$ENV{USERPROFILE}/.hunter" PARENT_SCOPE)
hunter_gate_status_debug(
"HUNTER_ROOT set using USERPROFILE environment variable"
@@ -195,7 +190,7 @@ function(hunter_gate_detect_root)
hunter_gate_fatal_error(
"Can't detect HUNTER_ROOT"
WIKI "error.detect.hunter.root"
ERROR_PAGE "error.detect.hunter.root"
)
endfunction()
@@ -214,7 +209,7 @@ function(hunter_gate_download dir)
"Settings:"
" HUNTER_ROOT: ${HUNTER_GATE_ROOT}"
" HUNTER_SHA1: ${HUNTER_GATE_SHA1}"
WIKI "error.run.install"
ERROR_PAGE "error.run.install"
)
endif()
string(COMPARE EQUAL "${dir}" "" is_bad)
@@ -400,7 +395,7 @@ macro(HunterGate)
hunter_gate_fatal_error(
"Please set HunterGate *before* 'project' command. "
"Detected project: ${PROJECT_NAME}"
WIKI "error.huntergate.before.project"
ERROR_PAGE "error.huntergate.before.project"
)
endif()
@@ -470,7 +465,7 @@ macro(HunterGate)
"HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces."
"Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error"
"(Use at your own risk!)"
WIKI "error.spaces.in.hunter.root"
ERROR_PAGE "error.spaces.in.hunter.root"
)
endif()
endif()
@@ -518,7 +513,9 @@ macro(HunterGate)
hunter_gate_internal_error("${_sha1_location} not found")
endif()
file(READ "${_sha1_location}" _sha1_value)
string(COMPARE EQUAL "${_sha1_value}" "${HUNTER_GATE_SHA1}" _is_equal)
string(TOLOWER "${_sha1_value}" _sha1_value_lower)
string(TOLOWER "${HUNTER_GATE_SHA1}" _HUNTER_GATE_SHA1_lower)
string(COMPARE EQUAL "${_sha1_value_lower}" "${_HUNTER_GATE_SHA1_lower}" _is_equal)
if(NOT _is_equal)
hunter_gate_internal_error(
"Short SHA1 collision:"
+151
View File
@@ -0,0 +1,151 @@
# OS X requires a Mach-O dynamic library to have a baked "install name", that is used by other modules to link to it. Depending
# on how the library is built, the install name is not always an absolute path, nor necessarily the same as the name of the
# library file itself. This macro takes as input the name of a target, and a list of libraries that it links to (the output of
# FIND_PACKAGE or FIND_LIBRARY calls), and generates a set of custom, post-build commands that, for each linked dylib, changes
# the name the target uses to refer to it with a fully-qualified (absolute) version of the library's own install name. This
# helps ensure that the target can be used from any location while still being able to locate the linked dynamic libraries.
#
# Note that this script does NOT handle the case when a linked library itself refers to another library using a non-absolute
# name (Boost is a notorious example). To avoid such issues, it is recommended to use a static library instead of a shared one
# in a non-standard location. Alternatively, set DYLD_LIBRARY_PATH to include these non-standard locations when running the
# program (not recommended).
#
# Author: Siddhartha Chaudhuri, 2009.
#
# Set the minimum required CMake version
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
# See cmake --help-policy CMP0011 for details on this one
IF(POLICY CMP0011)
CMAKE_POLICY(SET CMP0011 NEW)
ENDIF(POLICY CMP0011)
# See cmake --help-policy CMP0026 for details on this one
IF(POLICY CMP0026)
CMAKE_POLICY(SET CMP0026 NEW)
ENDIF(POLICY CMP0026)
# See cmake --help-policy CMP0045 for details on this one
IF(POLICY CMP0045)
CMAKE_POLICY(SET CMP0045 NEW)
ENDIF(POLICY CMP0045)
MACRO(OSX_FIX_DYLIB_REFERENCES target libraries)
IF(APPLE)
SET(OFIN_${target}_RPATHS )
FOREACH(OFIN_${target}_Library ${libraries})
IF(${OFIN_${target}_Library} MATCHES "[.]dylib$"
OR ${OFIN_${target}_Library} MATCHES "[.]framework/.+")
# Resolve symlinks and get absolute location
GET_FILENAME_COMPONENT(OFIN_${target}_LibraryAbsolute ${OFIN_${target}_Library} ABSOLUTE)
# Get the baked install name of the library
EXECUTE_PROCESS(COMMAND otool -D ${OFIN_${target}_LibraryAbsolute}
OUTPUT_VARIABLE OFIN_${target}_LibraryInstallNameOutput
OUTPUT_STRIP_TRAILING_WHITESPACE)
STRING(REGEX REPLACE "[\r\n]" " " OFIN_${target}_LibraryInstallNameOutput ${OFIN_${target}_LibraryInstallNameOutput})
SEPARATE_ARGUMENTS(OFIN_${target}_LibraryInstallNameOutput)
LIST(GET OFIN_${target}_LibraryInstallNameOutput 1 OFIN_${target}_LibraryInstallName)
IF(${OFIN_${target}_LibraryInstallName} MATCHES "^[@]rpath/")
# Ideally, we want to eliminate the longest common suffix of the install name and the absolute path. Whatever's left
# will be the desired rpath. But this is difficult to do (especially if there are naming variations, e.g.
# "Versions/Current" vs "Versions/5" is a common culprit). So we'll add various candidate rpaths and hope at least one
# is correct.
# Typically, the rpath to a library within a framework looks like this:
# @rpath/A.framework/Versions/5/libFoo.dylib
#
# Hence, we'll extract for the path unit immediately following the @rpath (in this case A.framework) and then look for
# it in the library's actual path. Everything before this location will be put in the rpath.
SET(OFIN_${target}_PathPrefix ${OFIN_${target}_LibraryInstallName})
SET(OFIN_${target}_RpathFirstChild )
WHILE(NOT OFIN_${target}_PathPrefix STREQUAL "@rpath")
GET_FILENAME_COMPONENT(OFIN_${target}_RpathFirstChild ${OFIN_${target}_PathPrefix} NAME)
GET_FILENAME_COMPONENT(OFIN_${target}_PathPrefix ${OFIN_${target}_PathPrefix} PATH)
IF(NOT OFIN_${target}_PathPrefix) # should never happen but just in case
BREAK()
ENDIF(NOT OFIN_${target}_PathPrefix)
IF(OFIN_${target}_PathPrefix STREQUAL "/") # should never happen but just in case
BREAK()
ENDIF(OFIN_${target}_PathPrefix STREQUAL "/")
ENDWHILE(NOT OFIN_${target}_PathPrefix STREQUAL "@rpath")
IF(OFIN_${target}_RpathFirstChild)
SET(OFIN_${target}_PathPrefix ${OFIN_${target}_LibraryAbsolute})
SET(OFIN_${target}_PathUnit )
WHILE(NOT OFIN_${target}_PathUnit STREQUAL ${OFIN_${target}_RpathFirstChild})
GET_FILENAME_COMPONENT(OFIN_${target}_PathUnit ${OFIN_${target}_PathPrefix} NAME)
GET_FILENAME_COMPONENT(OFIN_${target}_PathPrefix ${OFIN_${target}_PathPrefix} PATH)
IF(NOT OFIN_${target}_PathPrefix)
BREAK()
ENDIF(NOT OFIN_${target}_PathPrefix)
IF(OFIN_${target}_PathPrefix STREQUAL "/")
BREAK()
ENDIF(OFIN_${target}_PathPrefix STREQUAL "/")
ENDWHILE(NOT OFIN_${target}_PathUnit STREQUAL ${OFIN_${target}_RpathFirstChild})
IF(OFIN_${target}_PathPrefix)
SET(OFIN_${target}_RPATHS ${OFIN_${target}_RPATHS} "${OFIN_${target}_PathPrefix}")
ENDIF(OFIN_${target}_PathPrefix)
ENDIF(OFIN_${target}_RpathFirstChild)
# Add the directory containing the library
GET_FILENAME_COMPONENT(OFIN_${target}_LibraryAbsolutePath ${OFIN_${target}_LibraryAbsolute} PATH)
SET(OFIN_${target}_RPATHS ${OFIN_${target}_RPATHS} "${OFIN_${target}_LibraryAbsolutePath}")
# Add paths specified as library search prefixes
FOREACH(prefix ${CMAKE_PREFIX_PATH})
SET(OFIN_${target}_RPATHS ${OFIN_${target}_RPATHS} "${CMAKE_PREFIX_PATH}")
SET(OFIN_${target}_RPATHS ${OFIN_${target}_RPATHS} "${CMAKE_PREFIX_PATH}/lib")
ENDFOREACH()
ELSEIF(NOT ${OFIN_${target}_LibraryInstallName} MATCHES "^[@/]") # just a relative path
# Replace the unqualified filename, if it appears, with the absolute location, either by directly changing the path or
# by editing the rpath
# -- handle the case when the actual filename is baked in
GET_FILENAME_COMPONENT(OFIN_${target}_LibraryFilename ${OFIN_${target}_LibraryAbsolute} NAME)
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND install_name_tool
ARGS -change
${OFIN_${target}_LibraryFilename}
${OFIN_${target}_LibraryAbsolute}
$<TARGET_FILE:${target}>)
# -- handle the case when the install name is baked in
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND install_name_tool
ARGS -change
${OFIN_${target}_LibraryInstallName}
${OFIN_${target}_LibraryAbsolute}
$<TARGET_FILE:${target}>)
ENDIF()
ENDIF()
ENDFOREACH(OFIN_${target}_Library)
# Add the collected rpaths
IF(OFIN_${target}_RPATHS)
LIST(REMOVE_DUPLICATES OFIN_${target}_RPATHS)
FOREACH(rpath ${OFIN_${target}_RPATHS})
ADD_CUSTOM_COMMAND(TARGET ${target} POST_BUILD
COMMAND bash
ARGS -c "install_name_tool -add_rpath '${rpath}' '$<TARGET_FILE:${target}>' > /dev/null 2>&1 || true"
VERBATIM)
ENDFOREACH()
ENDIF()
ENDIF()
ENDMACRO(OSX_FIX_DYLIB_REFERENCES)
+64
View File
@@ -0,0 +1,64 @@
if(TARGET Boost::boost)
return()
endif()
message(STATUS "Third-party: creating targets 'Boost::boost'...")
include(FetchContent)
FetchContent_Declare(
boost-cmake
GIT_REPOSITORY https://github.com/Orphis/boost-cmake.git
GIT_TAG 7f97a08b64bd5d2e53e932ddf80c40544cf45edf
)
set(PREVIOUS_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
set(OLD_CMAKE_POSITION_INDEPENDENT_CODE ${CMAKE_POSITION_INDEPENDENT_CODE})
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# This guy will download boost using FetchContent
FetchContent_GetProperties(boost-cmake)
if(NOT boost-cmake_POPULATED)
FetchContent_Populate(boost-cmake)
# File lcid.cpp from Boost_locale.cpp doesn't compile on MSVC, so we exclude them from the default
# targets being built by the project (only targets explicitly used by other targets will be built).
add_subdirectory(${boost-cmake_SOURCE_DIR} ${boost-cmake_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ${OLD_CMAKE_POSITION_INDEPENDENT_CODE})
set(CMAKE_CXX_FLAGS "${PREVIOUS_CMAKE_CXX_FLAGS}")
# Set VS target folders
set(boost_modules
container
regex
atomic
exception
chrono
wave
context
coroutine
date_time
fiber
filesystem
graph
iostreams
locale
log
log_setup
unit_test_framework
math
program_options
timer
random
serialization
system
thread
type_erasure
)
foreach(module IN ITEMS ${boost_modules})
if(TARGET Boost_${module})
set_target_properties(Boost_${module} PROPERTIES FOLDER ThirdParty/Boost)
endif()
endforeach()
+14
View File
@@ -0,0 +1,14 @@
if(TARGET Catch2::Catch2)
return()
endif()
message(STATUS "Third-party: creating target 'Catch2::Catch2'")
include(FetchContent)
FetchContent_Declare(
catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.8
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(catch2)
+58
View File
@@ -0,0 +1,58 @@
if(TARGET CGAL::CGAL)
return()
endif()
message(STATUS "Third-party: creating target 'CGAL::CGAL'")
include(FetchContent)
FetchContent_Declare(
cgal
URL https://github.com/CGAL/cgal/releases/download/v5.6/CGAL-5.6-library.tar.xz
URL_MD5 793da2d1597f3a5c0e3524f73a0b4039
)
FetchContent_GetProperties(cgal)
if(cgal_POPULATED)
return()
endif()
FetchContent_Populate(cgal)
function(cgal_import_target)
macro(ignore_package NAME VERSION_NUM)
include(CMakePackageConfigHelpers)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${NAME}/${NAME}Config.cmake "")
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/${NAME}/${NAME}ConfigVersion.cmake
VERSION ${VERSION_NUM}
COMPATIBILITY AnyNewerVersion
)
set(${NAME}_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NAME} CACHE PATH "")
set(${NAME}_ROOT ${CMAKE_CURRENT_BINARY_DIR}/${NAME} CACHE PATH "")
endmacro()
include(gmp)
include(mpfr)
include(boost)
ignore_package(GMP 5.0.1)
set(GMP_INCLUDE_DIR ${gmp_INCLUDE_DIR})
set(GMP_LIBRARIES gmp::gmp)
set(GMPXX_INCLUDE_DIR ${GMP_INCLUDE_DIR})
set(GMPXX_LIBRARIES ${GMP_LIBRARIES})
ignore_package(MPFR 3.0.0)
set(MPFR_INCLUDE_DIR "")
set(MPFR_LIBRARIES mpfr::mpfr)
ignore_package(Boost 1.71.0)
set(Boost_INCLUDE_DIRS "")
set(Boost_LIBRARIES Boost::thread Boost::system)
# Prefer Config mode before Module mode to prevent CGAL from loading its own FindXXX.cmake
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
# https://stackoverflow.com/a/71714947/148668
set(CGAL_DATA_DIR "unspecified")
find_package(CGAL CONFIG COMPONENTS Core PATHS ${cgal_SOURCE_DIR} NO_DEFAULT_PATH)
endfunction()
cgal_import_target()
+31
View File
@@ -0,0 +1,31 @@
if(TARGET CoMISo::CoMISo)
return()
endif()
message(STATUS "Third-party: creating target 'CoMISo::CoMISo'")
include(FetchContent)
FetchContent_Declare(
comiso
GIT_REPOSITORY https://github.com/libigl/CoMISo.git
GIT_TAG 536440e714f412e7ef6c0b96b90ba37b1531bb39
)
include(eigen)
FetchContent_MakeAvailable(comiso)
add_library(CoMISo::CoMISo ALIAS CoMISo)
# Copy .hh headers into a subfolder `CoMISo/`
file(GLOB_RECURSE INC_FILES "${comiso_SOURCE_DIR}/*.hh" "${comiso_SOURCE_DIR}/*.cc")
set(output_folder "${CMAKE_CURRENT_BINARY_DIR}/CoMISo/include/CoMISo")
message(VERBOSE "Copying CoMISo headers to '${output_folder}'")
foreach(filepath IN ITEMS ${INC_FILES})
file(RELATIVE_PATH filename "${comiso_SOURCE_DIR}" ${filepath})
configure_file(${filepath} "${output_folder}/${filename}" COPYONLY)
endforeach()
target_include_directories(CoMISo PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/CoMISo/include)
set_target_properties(CoMISo PROPERTIES FOLDER ThirdParty)
+43
View File
@@ -0,0 +1,43 @@
if(TARGET Eigen3::Eigen)
return()
endif()
message(STATUS "Third-party: creating target 'Eigen3::Eigen'")
include(FetchContent)
FetchContent_Declare(
eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG tags/3.4.0
GIT_SHALLOW TRUE
)
FetchContent_GetProperties(eigen)
if(NOT eigen_POPULATED)
FetchContent_Populate(eigen)
endif()
add_library(Eigen3_Eigen INTERFACE)
add_library(Eigen3::Eigen ALIAS Eigen3_Eigen)
include(GNUInstallDirs)
target_include_directories(Eigen3_Eigen SYSTEM INTERFACE
$<BUILD_INTERFACE:${eigen_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
option(EIGEN_MPL2_ONLY "Compile Eigen with MPL2 code only" OFF)
if(EIGEN_MPL2_ONLY)
target_compile_definitions(Eigen3_Eigen INTERFACE EIGEN_MPL2_ONLY)
endif()
# On Windows, enable natvis files to improve debugging experience
if(WIN32 AND eigen_SOURCE_DIR)
target_sources(Eigen3_Eigen INTERFACE $<BUILD_INTERFACE:${eigen_SOURCE_DIR}/debug/msvc/eigen.natvis>)
endif()
# Install rules
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME eigen)
set_target_properties(Eigen3_Eigen PROPERTIES EXPORT_NAME Eigen)
install(DIRECTORY ${eigen_SOURCE_DIR}/Eigen DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(TARGETS Eigen3_Eigen EXPORT EigenTargets)
install(EXPORT EigenTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/eigen NAMESPACE Eigen3::)
+53
View File
@@ -0,0 +1,53 @@
if(TARGET embree::embree)
return()
endif()
message(STATUS "Third-party: creating target 'embree::embree'")
include(FetchContent)
FetchContent_Declare(
embree
GIT_REPOSITORY https://github.com/embree/embree.git
GIT_TAG v3.13.3
GIT_SHALLOW TRUE
)
# Set Embree's default options
option(EMBREE_ISPC_SUPPORT "Build Embree with support for ISPC applications." OFF)
option(EMBREE_TUTORIALS "Enable to build Embree tutorials" OFF)
option(EMBREE_STATIC_LIB "Build Embree as a static library." ON)
set(EMBREE_TESTING_INTENSITY 0 CACHE STRING "Intensity of testing (0 = no testing, 1 = verify and tutorials, 2 = light testing, 3 = intensive testing.")
set(EMBREE_TASKING_SYSTEM "INTERNAL" CACHE STRING "Selects tasking system")
set(EMBREE_MAX_ISA "DEFAULT" CACHE STRING "Selects highest ISA to support.")
# Ready to include embree's atrocious CMake
FetchContent_MakeAvailable(embree)
# Disable warnings
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# Embree's subgrid.h is known for causing array subscript out of bound
# warning. Embree dev claim the code is correct and it is a GCC bug
# for misfiring warnings. See https://github.com/embree/embree/issues/271
#
# The issue should be fixed for gcc 9.2.1 and later.
target_compile_options(embree PRIVATE "-Wno-array-bounds")
endif()
# Now we need to do some juggling to propagate the include directory properties
# along with the `embree` target
include(GNUInstallDirs)
target_include_directories(embree SYSTEM INTERFACE
"$<BUILD_INTERFACE:${embree_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/>"
)
add_library(embree::embree ALIAS embree)
# Some order for IDEs
set_target_properties(embree PROPERTIES FOLDER "ThirdParty//Embree")
set_target_properties(lexers PROPERTIES FOLDER "ThirdParty//Embree")
set_target_properties(math PROPERTIES FOLDER "ThirdParty//Embree")
set_target_properties(simd PROPERTIES FOLDER "ThirdParty//Embree")
set_target_properties(sys PROPERTIES FOLDER "ThirdParty//Embree")
set_target_properties(tasking PROPERTIES FOLDER "ThirdParty//Embree")
set_target_properties(uninstall PROPERTIES FOLDER "ThirdParty//Embree")
+17
View File
@@ -0,0 +1,17 @@
if(TARGET glad::glad)
return()
endif()
message(STATUS "Third-party: creating target 'glad::glad'")
include(FetchContent)
FetchContent_Declare(
glad
GIT_REPOSITORY https://github.com/libigl/libigl-glad.git
GIT_TAG ead2d21fd1d9f566d8f9a9ce99ddf85829258c7a
)
FetchContent_MakeAvailable(glad)
add_library(glad::glad ALIAS glad)
set_target_properties(glad PROPERTIES FOLDER ThirdParty)
+42
View File
@@ -0,0 +1,42 @@
if(TARGET glfw::glfw)
return()
endif()
message(STATUS "Third-party: creating target 'glfw::glfw'")
include(FetchContent)
FetchContent_Declare(
glfw
GIT_REPOSITORY https://github.com/glfw/glfw.git
GIT_TAG 3327050ca66ad34426a82c217c2d60ced61526b7
)
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
option(GLFW_INSTALL "Generate installation target" OFF)
option(GLFW_VULKAN_STATIC "Use the Vulkan loader statically linked into application" OFF)
FetchContent_MakeAvailable(glfw)
add_library(glfw::glfw ALIAS glfw)
set_target_properties(glfw PROPERTIES FOLDER ThirdParty)
# Warning config
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
target_compile_options(glfw PRIVATE
"-Wno-missing-field-initializers"
"-Wno-objc-multiple-method-names"
)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
target_compile_options(glfw PRIVATE
"-Wno-missing-field-initializers"
"-Wno-objc-multiple-method-names"
)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_compile_options(glfw PRIVATE
"-Wno-missing-field-initializers"
"-Wno-sign-compare"
"-Wno-unused-parameter"
)
endif()
+96
View File
@@ -0,0 +1,96 @@
if(TARGET gmp::gmp)
return()
endif()
# Download precompiled .dll on Windows
if(WIN32)
include(gmp_mpfr)
# Find_package will look for our downloaded lib on Windows, and system-wide on Linux/macOS
find_package(GMP REQUIRED)
else()
message(STATUS "Third-party: creating target 'gmp::gmp'")
# SERIOUSLY !?! CMAKE and configure use transposed definitions of "build" and
# "host"?
#
# https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html#variable:CMAKE_SYSTEM_NAME
# https://gcc.gnu.org/onlinedocs/gccint/Configure-Terms.html
#
# Seems these aren't to be trusted much
# https://gitlab.kitware.com/cmake/cmake/-/issues/20989
if(APPLE)
# https://gmplib.org/list-archives/gmp-discuss/2020-November/006607.html
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(gmp_BUILD "x86_64-apple-darwin")
set(gmp_HOST "arm64-apple-darwin")
set(gmp_CFLAGS "--target=arm64-apple-darwin")
set(gmp_LDFLAGS "-arch arm64")
message(STATUS "GMP Recipe notices building on ${gmp_BUILD} for ${gmp_HOST}")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(gmp_HOST "x86_64-apple-darwin")
set(gmp_BUILD "arm64-apple-darwin")
set(gmp_CFLAGS "--target=x86_64-apple-darwin13.0.0")
set(gmp_LDFLAGS "")
message(STATUS "GMP Recipe notices building on ${gmp_HOST} for ${gmp_BUILD}")
endif()
endif()
include(FetchContent)
include(ProcessorCount)
ProcessorCount(Ncpu)
include(ExternalProject)
set(prefix ${FETCHCONTENT_BASE_DIR}/gmp)
set(gmp_INSTALL ${prefix}/install)
set(gmp_LIB_DIR ${gmp_INSTALL}/lib)
set(gmp_LIBRARY
${gmp_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gmp${CMAKE_STATIC_LIBRARY_SUFFIX}
${gmp_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gmpxx${CMAKE_STATIC_LIBRARY_SUFFIX}
)
set(gmp_INCLUDE_DIR ${gmp_INSTALL}/include)
# Try to use CONFIGURE_HANDLED_BY_BUILD ON to avoid constantly reconfiguring
if(${CMAKE_VERSION} VERSION_LESS 3.20)
# CMake < 3.20, do not use any extra option
set(gmp_ExternalProject_Add_extra_options)
else()
# CMake >= 3.20
set(gmp_ExternalProject_Add_extra_options "CONFIGURE_HANDLED_BY_BUILD;ON")
endif()
ExternalProject_Add(gmp
PREFIX ${prefix}
URL https://github.com/alisw/GMP/archive/refs/tags/v6.2.1.tar.gz
URL_MD5 f060ad4e762ae550d16f1bb477aadba5
UPDATE_DISCONNECTED true # need this to avoid constant rebuild
PATCH_COMMAND
curl "https://gist.githubusercontent.com/alecjacobson/d34d9307c17d1b853571699b9786e9d1/raw/8d14fc21cb7654f51c2e8df4deb0f82f9d0e8355/gmp-patch" "|" git apply -v
${gmp_ExternalProject_Add_extra_options}
CONFIGURE_COMMAND
${CMAKE_COMMAND} -E env
CFLAGS=${gmp_CFLAGS}
LDFLAGS=${gmp_LDFLAGS}
${prefix}/src/gmp/configure
--disable-debug --disable-dependency-tracking --enable-cxx --with-pic
--prefix=${gmp_INSTALL}
--build=${gmp_BUILD}
--host=${gmp_HOST}
--disable-shared
BUILD_COMMAND make -j${Ncpu}
INSTALL_COMMAND make -j${Ncpu} install
INSTALL_DIR ${gmp_INSTALL}
TEST_COMMAND ""
BUILD_BYPRODUCTS ${gmp_LIBRARY}
)
ExternalProject_Get_Property(gmp SOURCE_DIR)
set(gmp_LIBRARIES ${gmp_LIBRARY})
add_library(gmp::gmp INTERFACE IMPORTED GLOBAL)
file(MAKE_DIRECTORY ${gmp_INCLUDE_DIR}) # avoid race condition
target_include_directories(gmp::gmp INTERFACE ${gmp_INCLUDE_DIR})
target_link_libraries(gmp::gmp INTERFACE "${gmp_LIBRARIES}") # need the quotes to expand list
add_dependencies(gmp::gmp gmp)
endif()
if(NOT TARGET gmp::gmp)
message(FATAL_ERROR "Creation of target 'gmp::gmp' failed")
endif()
+34
View File
@@ -0,0 +1,34 @@
if(WIN32)
message(STATUS "Third-party: downloading gmp + mpfr")
include(FetchContent)
# CGAL 5+ ships with a single .zip combining GMP + MPFR's precompiled dlls.
# For now we still download them separately.
FetchContent_Declare(
gmp
URL https://cgal.geometryfactory.com/CGAL/precompiled_libs/auxiliary/x64/GMP/5.0.1/gmp-all-CGAL-3.9.zip
URL_MD5 508c1292319c832609329116a8234c9f
)
FetchContent_MakeAvailable(gmp)
FetchContent_Declare(
mpfr
URL https://cgal.geometryfactory.com/CGAL/precompiled_libs/auxiliary/x64/MPFR/3.0.0/mpfr-all-CGAL-3.9.zip
URL_MD5 48840454eef0ff18730050c05028734b
)
FetchContent_MakeAvailable(mpfr)
# FetchContent_Declare(
# gmp_mpfr
# URL https://github.com/CGAL/cgal/releases/download/v5.2.1/CGAL-5.2.1-win64-auxiliary-libraries-gmp-mpfr.zip
# URL_MD5 247f4dca741c6b9a9be76286414070fa
# )
# For CGAL
set(ENV{GMP_DIR} "${gmp_SOURCE_DIR}")
set(ENV{MPFR_DIR} "${mpfr_SOURCE_DIR}")
else()
# On Linux/macOS, gmp+mpfr will be fetched and compiled
endif()
+53
View File
@@ -0,0 +1,53 @@
if(TARGET imgui::imgui)
return()
endif()
message(STATUS "Third-party: creating target 'imgui::imgui'")
include(FetchContent)
FetchContent_Declare(
imgui
GIT_REPOSITORY https://github.com/ocornut/imgui.git
GIT_TAG v1.85
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(imgui)
set(IMGUI_SRC
"${imgui_SOURCE_DIR}/imgui.h"
"${imgui_SOURCE_DIR}/imconfig.h"
"${imgui_SOURCE_DIR}/imgui_internal.h"
"${imgui_SOURCE_DIR}/imgui.cpp"
"${imgui_SOURCE_DIR}/imgui_demo.cpp"
"${imgui_SOURCE_DIR}/imgui_draw.cpp"
"${imgui_SOURCE_DIR}/imgui_widgets.cpp"
"${imgui_SOURCE_DIR}/imgui_tables.cpp"
"${imgui_SOURCE_DIR}/imstb_rectpack.h"
"${imgui_SOURCE_DIR}/imstb_textedit.h"
"${imgui_SOURCE_DIR}/imstb_truetype.h"
"${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.h"
"${imgui_SOURCE_DIR}/backends/imgui_impl_opengl3.cpp"
"${imgui_SOURCE_DIR}/backends/imgui_impl_glfw.h"
"${imgui_SOURCE_DIR}/backends/imgui_impl_glfw.cpp"
"${imgui_SOURCE_DIR}/misc/cpp/imgui_stdlib.h"
"${imgui_SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp"
)
add_library(imgui ${IMGUI_SRC})
add_library(imgui::imgui ALIAS imgui)
# Include headers
target_include_directories(imgui PUBLIC "${imgui_SOURCE_DIR}")
# Compile definitions
target_compile_definitions(imgui PUBLIC
IMGUI_IMPL_OPENGL_LOADER_GLAD
IMGUI_DISABLE_OBSOLETE_FUNCTIONS # to check for obsolete functions
)
# Dependencies
include(glfw)
include(glad)
target_link_libraries(imgui PUBLIC glfw::glfw glad::glad)
set_target_properties(imgui PROPERTIES FOLDER ThirdParty)
+30
View File
@@ -0,0 +1,30 @@
if(TARGET imguizmo::imguizmo)
return()
endif()
message(STATUS "Third-party: creating target 'imguizmo::imguizmo'")
include(FetchContent)
FetchContent_Declare(
imguizmo
GIT_REPOSITORY https://github.com/CedricGuillemet/ImGuizmo.git
GIT_TAG a23567269f6617342bcc112394bdad937b54b2d7
)
FetchContent_MakeAvailable(imguizmo)
set(IMGUIZMO_SRC
"${imguizmo_SOURCE_DIR}/ImGuizmo.h"
"${imguizmo_SOURCE_DIR}/ImGuizmo.cpp"
)
add_library(imguizmo ${IMGUIZMO_SRC})
add_library(imguizmo::imguizmo ALIAS imguizmo)
target_compile_features(imguizmo PUBLIC cxx_std_11)
target_include_directories(imguizmo PUBLIC "${imguizmo_SOURCE_DIR}")
include(imgui)
target_link_libraries(imguizmo PUBLIC imgui::imgui)
set_target_properties(imguizmo PROPERTIES FOLDER ThirdParty)
+25
View File
@@ -0,0 +1,25 @@
if(TARGET igl::imgui_fonts)
return()
endif()
message(STATUS "Third-party: creating target 'igl::imgui_fonts'")
include(FetchContent)
FetchContent_Declare(
libigl_imgui_fonts
GIT_REPOSITORY https://github.com/libigl/libigl-imgui.git
GIT_TAG 7e1053e750b0f4c129b046f4e455243cb7f804f3
)
FetchContent_GetProperties(libigl_imgui_fonts)
if(NOT libigl_imgui_fonts_POPULATED)
FetchContent_Populate(libigl_imgui_fonts)
endif()
add_library(igl_imgui_fonts INTERFACE)
add_library(igl::imgui_fonts ALIAS igl_imgui_fonts)
include(GNUInstallDirs)
target_include_directories(igl_imgui_fonts SYSTEM INTERFACE
$<BUILD_INTERFACE:${libigl_imgui_fonts_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
+18
View File
@@ -0,0 +1,18 @@
if(TARGET igl::tests_data)
return()
endif()
message(STATUS "Third-party: creating target 'igl::tests_data'")
include(FetchContent)
FetchContent_Declare(
libigl_tests_tata
GIT_REPOSITORY https://github.com/libigl/libigl-tests-data
GIT_TAG 19cedf96d70702d8b3a83eb27934780c542356fe
)
FetchContent_MakeAvailable(libigl_tests_tata)
add_library(igl_tests_data INTERFACE)
add_library(igl::tests_data ALIAS igl_tests_data)
target_compile_definitions(igl_tests_data INTERFACE LIBIGL_DATA_DIR=\"${libigl_tests_tata_SOURCE_DIR}\")
+18
View File
@@ -0,0 +1,18 @@
if(TARGET igl::tutorial_data)
return()
endif()
message(STATUS "Third-party: creating target 'igl::tutorial_data'")
include(FetchContent)
FetchContent_Declare(
libigl_tutorial_tata
GIT_REPOSITORY https://github.com/libigl/libigl-tutorial-data
GIT_TAG c1f9ede366d02e3531ecbaec5e3769312f31cccd
)
FetchContent_MakeAvailable(libigl_tutorial_tata)
add_library(igl_tutorial_data INTERFACE)
add_library(igl::tutorial_data ALIAS igl_tutorial_data)
target_compile_definitions(igl_tutorial_data INTERFACE "-DTUTORIAL_SHARED_PATH=\"${libigl_tutorial_tata_SOURCE_DIR}\"")
+91
View File
@@ -0,0 +1,91 @@
# Expects
# gmp_INCLUDE_DIR
# gmp_LIB_DIR
# gmp_LIBRARIES
if(TARGET mpfr::mpfr)
return()
endif()
# Download precompiled .dll on Windows
if(WIN32)
include(gmp_mpfr)
# Find_package will look for our downloaded lib on Windows, and system-wide on Linux/macOS
find_package(MPFR REQUIRED)
else()
message(STATUS "Third-party: creating target 'mpfr::mpfr'")
# Praying this will work the same as gmp
if(APPLE)
# https://gmplib.org/list-archives/gmp-discuss/2020-November/006607.html
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(mpfr_BUILD "x86_64-apple-darwin")
set(mpfr_HOST "arm64-apple-darwin")
set(mpfr_CFLAGS "--target=arm64-apple-darwin")
set(mpfr_LDFLAGS "-arch arm64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(mpfr_HOST "x86_64-apple-darwin")
set(mpfr_BUILD "arm64-apple-darwin")
set(mpfr_CFLAGS "--target=x86_64-apple-darwin13.0.0")
set(mpfr_LDFLAGS "")
endif()
endif()
include(FetchContent)
include(ProcessorCount)
ProcessorCount(Ncpu)
include(ExternalProject)
set(prefix ${FETCHCONTENT_BASE_DIR}/mpfr)
set(mpfr_INSTALL ${prefix}/install)
set(mpfr_LIBRARY ${mpfr_INSTALL}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}mpfr${CMAKE_STATIC_LIBRARY_SUFFIX})
set(mpfr_INCLUDE_DIR ${mpfr_INSTALL}/include)
# Try to use CONFIGURE_HANDLED_BY_BUILD ON to avoid constantly reconfiguring
if(${CMAKE_VERSION} VERSION_LESS 3.20)
# CMake < 3.20, do not use any extra option
set(mpfr_ExternalProject_Add_extra_options)
else()
# CMake >= 3.20
set(mpfr_ExternalProject_Add_extra_options "CONFIGURE_HANDLED_BY_BUILD;ON")
endif()
ExternalProject_Add(mpfr
PREFIX ${prefix}
DEPENDS gmp
URL https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.xz
URL_MD5 a25091f337f25830c16d2054d74b5af7
UPDATE_DISCONNECTED true # need this to avoid constant rebuild
${mpfr_ExternalProject_Add_extra_options} # avoid constant reconfigure
CONFIGURE_COMMAND
${CMAKE_COMMAND} -E env
CFLAGS=${gmp_CFLAGS}
LDFLAGS=${gmp_LDFLAGS}
${prefix}/src/mpfr/configure
--disable-debug --disable-dependency-tracking --disable-silent-rules --enable-cxx --with-pic
--with-gmp-include=${gmp_INCLUDE_DIR} --with-gmp-lib=${gmp_LIB_DIR}
--disable-shared
--prefix=${mpfr_INSTALL}
--build=${gmp_BUILD}
--host=${gmp_HOST}
--disable-shared
BUILD_COMMAND make -j${Ncpu}
INSTALL_COMMAND make -j${Ncpu} install
INSTALL_DIR ${mpfr_INSTALL}
TEST_COMMAND ""
BUILD_BYPRODUCTS ${mpfr_LIBRARY}
)
#PATCH_COMMAND curl "https://raw.githubusercontent.com/Homebrew/formula-patches/03cf8088210822aa2c1ab544ed58ea04c897d9c4/libtool/configure-big_sur.diff" "|" sed -e "s/configure.orig/configure/g" "|" git apply -v
ExternalProject_Get_Property(mpfr SOURCE_DIR)
set(mpfr_LIBRARIES ${mpfr_LIBRARY})
add_library(mpfr::mpfr INTERFACE IMPORTED GLOBAL)
file(MAKE_DIRECTORY ${mpfr_INCLUDE_DIR}) # avoid race condition
target_include_directories(mpfr::mpfr INTERFACE ${mpfr_INCLUDE_DIR})
target_link_libraries(mpfr::mpfr INTERFACE "${mpfr_LIBRARIES}") # need the quotes to expand list
# This is necessary to ensure that mpfr appears before gmp in link order.
# Otherwise undefined reference errors occur at link time on Linux with gcc
target_link_libraries(mpfr::mpfr INTERFACE "${gmp_LIBRARIES}")
add_dependencies(mpfr::mpfr mpfr)
endif()
if(NOT TARGET mpfr::mpfr)
message(FATAL_ERROR "Creation of target 'mpfr::mpfr' failed")
endif()
+17
View File
@@ -0,0 +1,17 @@
if(TARGET predicates::predicates)
return()
endif()
message(STATUS "Third-party: creating target 'predicates::predicates'")
include(FetchContent)
FetchContent_Declare(
predicates
GIT_REPOSITORY https://github.com/libigl/libigl-predicates.git
GIT_TAG 488242fa2b1f98a9c5bd1441297fb4a99a6a9ae4
)
FetchContent_MakeAvailable(predicates)
add_library(predicates::predicates ALIAS predicates)
set_target_properties(predicates PROPERTIES FOLDER ThirdParty)
+16
View File
@@ -0,0 +1,16 @@
if(TARGET spectra::spectra)
return()
endif()
include(FetchContent)
message(STATUS "Third-party: creating target 'spectra::spectra'")
# Use fork because yixuan/spectra struggles to find Eigen3
FetchContent_Declare(
Spectra
GIT_REPOSITORY https://github.com/alecjacobson/spectra/
GIT_TAG bbdc521b70a733c52ebfc0ac1484c82e13c3d140
)
FetchContent_MakeAvailable(Spectra)
add_library(spectra::spectra ALIAS Spectra)
+32
View File
@@ -0,0 +1,32 @@
if(TARGET stb::stb)
return()
endif()
message(STATUS "Third-party: creating target 'stb::stb'")
include(FetchContent)
FetchContent_Declare(
stb
GIT_REPOSITORY https://github.com/nothings/stb.git
GIT_TAG f67165c2bb2af3060ecae7d20d6f731173485ad0
)
FetchContent_MakeAvailable(stb)
# Generate implementation file
file(WRITE "${stb_BINARY_DIR}/stb_image.cpp.in" [[
#define STB_IMAGE_IMPLEMENTATION
#include <stb_image.h>
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include <stb_image_write.h>
]])
configure_file(${stb_BINARY_DIR}/stb_image.cpp.in ${stb_BINARY_DIR}/stb_image.cpp COPYONLY)
# Define stb library
add_library(stb ${stb_BINARY_DIR}/stb_image.cpp)
add_library(stb::stb ALIAS stb)
target_include_directories(stb PUBLIC "${stb_SOURCE_DIR}")
set_target_properties(stb PROPERTIES FOLDER ThirdParty)
+19
View File
@@ -0,0 +1,19 @@
if(TARGET tetgen::tetgen)
return()
endif()
message(STATUS "Third-party: creating target 'tetgen::tetgen'")
include(FetchContent)
FetchContent_Declare(
tetgen
GIT_REPOSITORY https://github.com/libigl/tetgen.git
GIT_TAG 4f3bfba3997f20aa1f96cfaff604313a8c2c85b6
)
FetchContent_MakeAvailable(tetgen)
add_library(tetgen::tetgen ALIAS tetgen)
target_include_directories(tetgen INTERFACE "${tetgen_SOURCE_DIR}")
set_target_properties(tetgen PROPERTIES FOLDER ThirdParty)
+24
View File
@@ -0,0 +1,24 @@
if(TARGET tinyxml2::tinyxml2)
return()
endif()
message(STATUS "Third-party: creating target 'tinyxml2::tinyxml2'")
# TODO: Update tinyxml2 version + use FetchContent_MakeAvailable with upstream CMake code
include(FetchContent)
FetchContent_Declare(
tinyxml2
GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git
GIT_TAG d175e9de0be0d4db75d0a8cf065599a435a87eb6
)
FetchContent_GetProperties(tinyxml2)
if(NOT tinyxml2_POPULATED)
FetchContent_Populate(tinyxml2)
endif()
add_library(tinyxml2 STATIC ${tinyxml2_SOURCE_DIR}/tinyxml2.cpp ${tinyxml2_SOURCE_DIR}/tinyxml2.h)
add_library(tinyxml2::tinyxml2 ALIAS tinyxml2)
target_include_directories(tinyxml2 PUBLIC ${tinyxml2_SOURCE_DIR})
set_target_properties(tinyxml2 PROPERTIES DEFINE_SYMBOL "TINYXML2_EXPORT")
set_target_properties(tinyxml2 PROPERTIES FOLDER ThirdParty)
+19
View File
@@ -0,0 +1,19 @@
if(TARGET triangle::triangle)
return()
endif()
message(STATUS "Third-party: creating target 'triangle::triangle'")
include(FetchContent)
FetchContent_Declare(
triangle
GIT_REPOSITORY https://github.com/libigl/triangle.git
GIT_TAG 3ee6cac2230f0fe1413879574f741c7b6da11221
)
FetchContent_MakeAvailable(triangle)
add_library(triangle::triangle ALIAS triangle)
target_include_directories(triangle INTERFACE "${triangle_SOURCE_DIR}")
set_target_properties(triangle PROPERTIES FOLDER ThirdParty)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+1
View File
@@ -0,0 +1 @@
include(${CMAKE_CURRENT_LIST_DIR}/../external/catch2.cmake)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+2
View File
@@ -0,0 +1,2 @@
hunter_add_package(Eigen)
find_package(Eigen3 CONFIG REQUIRED)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
@@ -0,0 +1 @@
include(${CMAKE_CURRENT_LIST_DIR}/../external/libigl_tests_data.cmake)
@@ -0,0 +1 @@
include(${CMAKE_CURRENT_LIST_DIR}/../external/libigl_tutorial_data.cmake)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
+5
View File
@@ -0,0 +1,5 @@
get_filename_component(current_filename ${CMAKE_CURRENT_LIST_FILE} NAME_WLE)
message(FATAL_ERROR
"${current_filename} is not set up to be used with Hunter. "
"Please disable the libigl modules depending on it, or set HUNTER_ENABLED to OFF."
)
File diff suppressed because it is too large Load Diff
+2729
View File
File diff suppressed because it is too large Load Diff
+54
View File
@@ -0,0 +1,54 @@
# libigl - A simple C++ geometry processing library
This detailed documentation browser is automatically generated from the comments
in libigl header (.h) files.
In general, each [libigl function](./namespaceigl.html#func-members) (e.g., `igl::func`) will be defined in a
correspondingly named header file (e.g., `#include <igl/func.h>`).
The _core_ library only depends on the standard template library (`std::`) and
Eigen. These functions reside directly the [`igl::` namespace](./namespaceigl.html)
Functions with further dependencies reside in a corresonding sub-namespace. For
example, the function `igl::spectra::lscm` depends on the Spectra library so it
resides in the [`igl::spectra::` namespace](./namespaceigl_1_1spectra.html).
Functions which depend on external code under a copyleft license reside in the
[`igl::copyleft::` namepsace](file:///Users/alecjacobson/Repos/libigl/dox/namespaceigl_1_1copyleft.html).
Most libigl functions are templated over the Eigen matrix inputs and outputs.
Callers can choose their own scalar types (e.g., `double`/`float`) and storage
orders (`Eigen::ColMajor`/`Eigen::RowMajor`). Libigl can be used as a:
- **header only library** (via CMake, make sure
`LIBIGL_USE_STATIC_LIBRARY=OFF`) and insure that `IGL_STATIC_LIBRARY` is
_not_ defined_ when compiling --- easiest if you're new to libigl, or
- **static library** (`LIBIGL_USE_STATIC_LIBRARY=ON``IGL_STATIC_LIBRARY` is
defined) --- speeds up repeated compilation.
The libigl static library is filled with _explicit template instantiations_ for
common Eigen inputs and outputs. If the library doesn't contain your types, you
may get some form of linker error (e.g., `Undefined symbols for architecture`,
`undefined reference to` or `unresolved external symbol`).
You can fix this by:
1. Switching to header only mode for your project,
2. Making a file in your project to compile the missing templates. E.g., `my_templates.cpp`
```cpp
#ifdef IGL_STATIC_LIBRARY
#undef IGL_STATIC_LIBRARY
#endif
#include <igl/per_vertex_normals.h>
template void igl::per_vertex_normals<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >&);
```
3. [Submit a PR](https://github.com/libigl/libigl/pulls) containing your missing template to the development branch of libigl
4. Change your input/output types to match existing templates (e.g., `Eigen::MatrixXd`).
https://libigl.github.io/
https://github.com/libigl/libigl/
+227 -175
View File
@@ -10,6 +10,7 @@
#include "barycenter.h"
#include "colon.h"
#include "doublearea.h"
#include "increment_ulp.h"
#include "point_simplex_squared_distance.h"
#include "project_to_line_segment.h"
#include "sort.h"
@@ -24,6 +25,113 @@
#include <queue>
#include <stack>
// This would be so much better with C++17 if constexpr
namespace
{
template <
typename DerivedV,
typename DerivedEle,
typename Derivedq,
int DIM>
struct AABB_all_positive_barycentric_coordinates_helper;
template <
typename DerivedV,
typename DerivedEle,
typename Derivedq>
struct AABB_all_positive_barycentric_coordinates_helper<
DerivedV,
DerivedEle,
Derivedq,
2>
{
static inline bool compute(
const Eigen::MatrixBase<DerivedV> & V,
const Eigen::MatrixBase<DerivedEle> & Ele,
const int primitive,
const Eigen::MatrixBase<Derivedq> & q)
{
using namespace igl;
using Scalar = typename DerivedV::Scalar;
const Scalar epsilon = igl::EPS<Scalar>();
static_assert(
DerivedV::ColsAtCompileTime == 2 ||
DerivedV::ColsAtCompileTime == Eigen::Dynamic,
"V should be 2D");
static_assert(
Derivedq::ColsAtCompileTime == 2 ||
Derivedq::ColsAtCompileTime == Eigen::Dynamic,
"q should be 2D");
// Barycentric coordinates
typedef Eigen::Matrix<Scalar,2,1> Vector2S;
const Vector2S V1 = V.row(Ele(primitive,0));
const Vector2S V2 = V.row(Ele(primitive,1));
const Vector2S V3 = V.row(Ele(primitive,2));
// Hack for now to keep templates simple. If becomes bottleneck
// consider using std::enable_if_t
const Vector2S q2 = q.head(2);
Scalar a1 = doublearea_single(V1,V2,q2);
Scalar a2 = doublearea_single(V2,V3,q2);
Scalar a3 = doublearea_single(V3,V1,q2);
// Normalization is important for correcting magnitude near epsilon
Scalar sum = a1+a2+a3;
a1 /= sum;
a2 /= sum;
a3 /= sum;
return a1>=-epsilon && a2>=-epsilon && a3>=-epsilon;
}
};
template <
typename DerivedV,
typename DerivedEle,
typename Derivedq>
struct AABB_all_positive_barycentric_coordinates_helper<
DerivedV,
DerivedEle,
Derivedq,
3>
{
static inline bool compute(
const Eigen::MatrixBase<DerivedV> & V,
const Eigen::MatrixBase<DerivedEle> & Ele,
const int primitive,
const Eigen::MatrixBase<Derivedq> & q)
{
using namespace igl;
using Scalar = typename DerivedV::Scalar;
const Scalar epsilon = igl::EPS<Scalar>();
static_assert(
DerivedV::ColsAtCompileTime == 3 ||
DerivedV::ColsAtCompileTime == Eigen::Dynamic,
"V should be 2D");
static_assert(
Derivedq::ColsAtCompileTime == 3 ||
Derivedq::ColsAtCompileTime == Eigen::Dynamic,
"q should be 2D");
// Barycentric coordinates
typedef Eigen::Matrix<Scalar,1,3> RowVector3S;
const RowVector3S V1 = V.row(Ele(primitive,0));
const RowVector3S V2 = V.row(Ele(primitive,1));
const RowVector3S V3 = V.row(Ele(primitive,2));
const RowVector3S V4 = V.row(Ele(primitive,3));
Scalar a1 = volume_single(V2,V4,V3,(RowVector3S)q);
Scalar a2 = volume_single(V1,V3,V4,(RowVector3S)q);
Scalar a3 = volume_single(V1,V4,V2,(RowVector3S)q);
Scalar a4 = volume_single(V1,V2,V3,(RowVector3S)q);
Scalar sum = a1+a2+a3+a4;
a1 /= sum;
a2 /= sum;
a3 /= sum;
a4 /= sum;
return a1>=-epsilon && a2>=-epsilon && a3>=-epsilon && a4>=-epsilon;
}
};
}
template <typename DerivedV, int DIM>
template <typename DerivedEle, typename Derivedbb_mins, typename Derivedbb_maxs, typename Derivedelements>
IGL_INLINE void igl::AABB<DerivedV,DIM>::init(
@@ -215,7 +323,6 @@ IGL_INLINE std::vector<int> igl::AABB<DerivedV,DIM>::find(
"Query dimension should match aabb dimension");
assert(Ele.cols() == V.cols()+1 &&
"AABB::find only makes sense for (d+1)-simplices");
const Scalar epsilon = igl::EPS<Scalar>();
// Check if outside bounding box
bool inside = m_box.contains(q.transpose());
if(!inside)
@@ -225,52 +332,8 @@ IGL_INLINE std::vector<int> igl::AABB<DerivedV,DIM>::find(
assert(m_primitive==-1 || (m_left == NULL && m_right == NULL));
if(is_leaf())
{
// Initialize to some value > -epsilon
Scalar a1=0,a2=0,a3=0,a4=0;
switch(DIM)
{
case 3:
{
// Barycentric coordinates
typedef Eigen::Matrix<Scalar,1,3> RowVector3S;
const RowVector3S V1 = V.row(Ele(m_primitive,0));
const RowVector3S V2 = V.row(Ele(m_primitive,1));
const RowVector3S V3 = V.row(Ele(m_primitive,2));
const RowVector3S V4 = V.row(Ele(m_primitive,3));
a1 = volume_single(V2,V4,V3,(RowVector3S)q);
a2 = volume_single(V1,V3,V4,(RowVector3S)q);
a3 = volume_single(V1,V4,V2,(RowVector3S)q);
a4 = volume_single(V1,V2,V3,(RowVector3S)q);
break;
}
case 2:
{
// Barycentric coordinates
typedef Eigen::Matrix<Scalar,2,1> Vector2S;
const Vector2S V1 = V.row(Ele(m_primitive,0));
const Vector2S V2 = V.row(Ele(m_primitive,1));
const Vector2S V3 = V.row(Ele(m_primitive,2));
// Hack for now to keep templates simple. If becomes bottleneck
// consider using std::enable_if_t
const Vector2S q2 = q.head(2);
a1 = doublearea_single(V1,V2,q2);
a2 = doublearea_single(V2,V3,q2);
a3 = doublearea_single(V3,V1,q2);
break;
}
default:assert(false);
}
// Normalization is important for correcting sign
Scalar sum = a1+a2+a3+a4;
a1 /= sum;
a2 /= sum;
a3 /= sum;
a4 /= sum;
if(
a1>=-epsilon &&
a2>=-epsilon &&
a3>=-epsilon &&
a4>=-epsilon)
if(AABB_all_positive_barycentric_coordinates_helper<
DerivedV,DerivedEle,Derivedq, DIM>::compute(V,Ele,m_primitive,q))
{
return std::vector<int>(1,m_primitive);
}else
@@ -486,7 +549,7 @@ IGL_INLINE void igl::AABB<DerivedV,DIM>::squared_distance(
//for(int p = 0;p<P.rows();p++)
igl::parallel_for(P.rows(),[&](int p)
{
RowVectorDIMS Pp = P.row(p), c;
RowVectorDIMS Pp = P.row(p).template head<DIM>(), c;
int Ip;
sqrD(p) = squared_distance(V,Ele,Pp,Ip,c);
I(p) = Ip;
@@ -804,11 +867,7 @@ IGL_INLINE void igl::AABB<DerivedV,DIM>::leaf_squared_distance(
template <typename DerivedV, int DIM>
IGL_INLINE void igl::AABB<DerivedV,DIM>::set_min(
const RowVectorDIMS &
#ifndef NDEBUG
p
#endif
,
const RowVectorDIMS & /* p */,
const Scalar sqr_d_candidate,
const int i_candidate,
const RowVectorDIMS & c_candidate,
@@ -816,13 +875,6 @@ IGL_INLINE void igl::AABB<DerivedV,DIM>::set_min(
int & i,
Eigen::PlainObjectBase<RowVectorDIMS> & c) const
{
#ifndef NDEBUG
//std::cout<<matlab_format(c_candidate,"c_candidate")<<std::endl;
//// This doesn't quite make sense to check with bounds
// const Scalar pc_norm = (p-c_candidate).squaredNorm();
// const Scalar diff = fabs(sqr_d_candidate - pc_norm);
// assert(diff<=1e-10 && "distance should match norm of difference");
#endif
if(sqr_d_candidate < sqr_d)
{
i = i_candidate;
@@ -842,37 +894,10 @@ igl::AABB<DerivedV,DIM>::intersect_ray(
const RowVectorDIMS & dir,
std::vector<igl::Hit> & hits) const
{
hits.clear();
const Scalar t0 = 0;
const Scalar t1 = std::numeric_limits<Scalar>::infinity();
{
Scalar _1,_2;
if(!ray_box_intersect(origin,dir,m_box,t0,t1,_1,_2))
{
return false;
}
}
if(this->is_leaf())
{
// Actually process elements
assert((Ele.size() == 0 || Ele.cols() == 3) && "Elements should be triangles");
// Cheesecake way of hitting element
bool ret = ray_mesh_intersect(origin,dir,V,Ele.row(m_primitive),hits);
// Since we only gave ray_mesh_intersect a single face, it will have set
// any hits to id=0. Set these to this primitive's id
for(auto & hit : hits)
{
hit.id = m_primitive;
}
return ret;
}
std::vector<igl::Hit> left_hits;
std::vector<igl::Hit> right_hits;
const bool left_ret = m_left->intersect_ray(V,Ele,origin,dir,left_hits);
const bool right_ret = m_right->intersect_ray(V,Ele,origin,dir,right_hits);
hits.insert(hits.end(),left_hits.begin(),left_hits.end());
hits.insert(hits.end(),right_hits.begin(),right_hits.end());
return left_ret || right_ret;
RowVectorDIMS inv_dir = dir.cwiseInverse();
RowVectorDIMS inv_dir_pad = inv_dir;
igl::increment_ulp(inv_dir_pad, 2);
return intersect_ray_opt(V, Ele, origin, dir, inv_dir, inv_dir_pad, hits);
}
template <typename DerivedV, int DIM>
@@ -944,22 +969,76 @@ igl::AABB<DerivedV,DIM>::intersect_ray(
const Scalar _min_t,
igl::Hit & hit) const
{
//// Naive, slow
//std::vector<igl::Hit> hits;
//intersect_ray(V,Ele,origin,dir,hits);
//if(hits.size() > 0)
//{
// hit = hits.front();
// return true;
//}else
//{
// return false;
//}
RowVectorDIMS inv_dir = dir.cwiseInverse();
RowVectorDIMS inv_dir_pad = inv_dir;
igl::increment_ulp(inv_dir_pad, 2);
return intersect_ray_opt(V, Ele, origin, dir, inv_dir, inv_dir_pad, _min_t, hit);
}
template <typename DerivedV, int DIM>
template <typename DerivedEle>
IGL_INLINE bool
igl::AABB<DerivedV,DIM>::intersect_ray_opt(
const Eigen::MatrixBase<DerivedV> & V,
const Eigen::MatrixBase<DerivedEle> & Ele,
const RowVectorDIMS & origin,
const RowVectorDIMS & dir,
const RowVectorDIMS & inv_dir,
const RowVectorDIMS & inv_dir_pad,
std::vector<igl::Hit> & hits) const
{
hits.clear();
const Scalar t0 = 0;
const Scalar t1 = std::numeric_limits<Scalar>::infinity();
{
Scalar _1,_2;
if(!ray_box_intersect(origin,inv_dir,inv_dir_pad,m_box,t0,t1,_1,_2))
{
return false;
}
}
if(this->is_leaf())
{
// Actually process elements
assert((Ele.size() == 0 || Ele.cols() == 3) && "Elements should be triangles");
// Cheesecake way of hitting element
bool ret = ray_mesh_intersect(origin,dir,V,Ele.row(m_primitive),hits);
// Since we only gave ray_mesh_intersect a single face, it will have set
// any hits to id=0. Set these to this primitive's id
for(auto & hit: hits)
{
hit.id = m_primitive;
}
return ret;
}
std::vector<igl::Hit> left_hits;
std::vector<igl::Hit> right_hits;
const bool left_ret = m_left->intersect_ray_opt(V,Ele,origin,dir,inv_dir,inv_dir_pad,left_hits);
const bool right_ret = m_right->intersect_ray_opt(V,Ele,origin,dir,inv_dir,inv_dir_pad,right_hits);
hits.insert(hits.end(),left_hits.begin(),left_hits.end());
hits.insert(hits.end(),right_hits.begin(),right_hits.end());
return left_ret || right_ret;
}
template <typename DerivedV, int DIM>
template <typename DerivedEle>
IGL_INLINE bool
igl::AABB<DerivedV,DIM>::intersect_ray_opt(
const Eigen::MatrixBase<DerivedV> & V,
const Eigen::MatrixBase<DerivedEle> & Ele,
const RowVectorDIMS & origin,
const RowVectorDIMS & dir,
const RowVectorDIMS & inv_dir,
const RowVectorDIMS & inv_dir_pad,
const Scalar _min_t,
igl::Hit & hit) const
{
Scalar min_t = _min_t;
const Scalar t0 = 0;
{
Scalar _1,_2;
if(!ray_box_intersect(origin,dir,m_box,t0,min_t,_1,_2))
if(!ray_box_intersect(origin,inv_dir,inv_dir_pad,m_box,t0,min_t,_1,_2))
{
return false;
}
@@ -978,7 +1057,7 @@ igl::AABB<DerivedV,DIM>::intersect_ray(
// differnce
igl::Hit left_hit;
igl::Hit right_hit;
bool left_ret = m_left->intersect_ray(V,Ele,origin,dir,min_t,left_hit);
bool left_ret = m_left->intersect_ray_opt(V,Ele,origin,dir,inv_dir,inv_dir_pad,min_t,left_hit);
if(left_ret && left_hit.t<min_t)
{
// It's scary that this line doesn't seem to matter....
@@ -989,7 +1068,7 @@ igl::AABB<DerivedV,DIM>::intersect_ray(
{
left_ret = false;
}
bool right_ret = m_right->intersect_ray(V,Ele,origin,dir,min_t,right_hit);
bool right_ret = m_right->intersect_ray_opt(V,Ele,origin,dir,inv_dir,inv_dir_pad,min_t,right_hit);
if(right_ret && right_hit.t<min_t)
{
min_t = right_hit.t;
@@ -1002,89 +1081,62 @@ igl::AABB<DerivedV,DIM>::intersect_ray(
return left_ret || right_ret;
}
// This is a bullshit template because AABB annoyingly needs templates for bad
// combinations of 3D V with DIM=2 AABB
//
// _Define_ as a no-op rather than monkeying around with the proper code above
//
// Meanwhile, GCC seems to have a bug. Let's see if GCC likes using explicit
// namespace block instead. https://stackoverflow.com/a/25594681/148668
namespace igl
{
template<> template<> IGL_INLINE float AABB<Eigen::Matrix<float, -1, 3, 1, -1, 3>, 2>::squared_distance( Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::Matrix<float, 1, 2, 1, 1, 2> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<float, 1, 2, 1, 1, 2> >&) const { assert(false);return -1;};
template<> template<> IGL_INLINE float igl::AABB<Eigen::Matrix<float, -1, 3, 1, -1, 3>, 2>::squared_distance( Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::Matrix<float, 1, 2, 1, 1, 2> const&, float, float, int&, Eigen::PlainObjectBase<Eigen::Matrix<float, 1, 2, 1, 1, 2> >&) const { assert(false);return -1;};
template<> template<> IGL_INLINE void igl::AABB<Eigen::Matrix<float, -1, 3, 1, -1, 3>, 2>::init (Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&) { assert(false);};
template<> template<> IGL_INLINE double AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 2>::squared_distance( Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::Matrix<double, 1, 2, 1, 1, 2> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 2, 1, 1, 2> >&) const { assert(false);return -1;};
template<> template<> IGL_INLINE double igl::AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 2>::squared_distance( Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::Matrix<double, 1, 2, 1, 1, 2> const&, double, double, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 2, 1, 1, 2> >&) const { assert(false);return -1;};
template<> template<> IGL_INLINE void igl::AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 2>::init (Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&) { assert(false);};
template<> template<> IGL_INLINE void igl::AABB<Eigen::Matrix<float, -1, 3, 0, -1, 3>, 2>::init(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&) {assert(false);};
template<> template<> IGL_INLINE float igl::AABB<Eigen::Matrix<float, -1, 3, 0, -1, 3>, 2>::squared_distance(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::Matrix<float, 1, 2, 1, 1, 2> const&, float, float, int&, Eigen::PlainObjectBase<Eigen::Matrix<float, 1, 2, 1, 1, 2> >&) const { assert(false);return -1;};
}
#ifdef IGL_STATIC_LIBRARY
// Explicit template instantiation
// generated by autoexplicit.sh
template double igl::AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 3>::squared_distance<Eigen::Matrix<int, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, double, double, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&) const;
template double igl::AABB<Eigen::Matrix<double, -1, 3, 0, -1, 3>, 3>::squared_distance<Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, double, double, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 3>::init<Eigen::Matrix<int, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&);
template double igl::AABB<Eigen::Matrix<double, -1, 2, 0, -1, 2>, 2>::squared_distance<Eigen::Matrix<int, -1, 2, 0, -1, 2> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 2, 0, -1, 2> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > const&, Eigen::Matrix<double, 1, 2, 1, 1, 2> const&, double, double, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 2, 1, 1, 2> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, 3, 0, -1, 3>, 3>::init<Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&);
// generated by autoexplicit.sh
template float igl::AABB<Eigen::Matrix<float, -1, 3, 0, -1, 3>, 3>::squared_distance<Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::Matrix<float, 1, 3, 1, 1, 3> const&, float, float, int&, Eigen::PlainObjectBase<Eigen::Matrix<float, 1, 3, 1, 1, 3> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, 2, 0, -1, 2>, 2>::init<Eigen::Matrix<int, -1, 2, 0, -1, 2> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 2, 0, -1, 2> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> > const&);
// generated by autoexplicit.sh
template bool igl::AABB<Eigen::Matrix<float, -1, -1, 0, -1, -1>, 3>::intersect_ray<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<float, 1, 3, 1, 1, 3> const&, Eigen::Matrix<float, 1, 3, 1, 1, 3> const&, std::vector<igl::Hit, std::allocator<igl::Hit> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<float, -1, 3, 0, -1, 3>, 3>::init<Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&);
template void igl::AABB<Eigen::Matrix<float, -1, -1, 0, -1, -1>, 3>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::serialize<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, int) const;
template void igl::AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> >&) const;
// generated by autoexplicit.sh
template std::vector<int, std::allocator<int> > igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::find<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 1, -1, 1, 1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, 1, -1, 1, 1, -1> > const&, bool) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::serialize<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, int) const;
// generated by autoexplicit.sh
template std::vector<int, std::allocator<int> > igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::find<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 1, -1, 1, 1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, 1, -1, 1, 1, -1> > const&, bool) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, int);
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, int);
// generated by autoexplicit.sh
template float igl::AABB<Eigen::Matrix<float, -1, 3, 1, -1, 3>, 3>::squared_distance<Eigen::Matrix<int, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::Matrix<float, 1, 3, 1, 1, 3> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<float, 1, 3, 1, 1, 3> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<long, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
// generated by autoexplicit.sh
template double igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<long, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
// generated by autoexplicit.sh
template double igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, 1, 2, 1, 1, 2> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 2, 1, 1, 2> >&) const;
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<float, -1, 3, 1, -1, 3>, 3>::init<Eigen::Matrix<int, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&);
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
// generated by autoexplicit.sh
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
template double igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, double, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 3>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
template bool igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::intersect_ray<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, igl::Hit&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 2, 3, 0, 2, 3>, Eigen::Matrix<double, 2, 1, 0, 2, 1>, Eigen::Matrix<int, 2, 1, 0, 2, 1>, Eigen::Matrix<double, 2, 3, 0, 2, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, 2, 3, 0, 2, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, 2, 1, 0, 2, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, 2, 1, 0, 2, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, 2, 3, 0, 2, 3> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::init<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&);
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::init<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&);
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template double igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, 1, 2, 1, 1, 2> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 2, 1, 1, 2> >&) const;
template double igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, double, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&) const;
template double igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&) const;
template double igl::AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 3>::squared_distance<Eigen::Matrix<int, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, double, double, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&) const;
template float igl::AABB<Eigen::Matrix<float, -1, 3, 0, -1, 3>, 3>::squared_distance<Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::Matrix<float, 1, 3, 1, 1, 3> const&, float, float, int&, Eigen::PlainObjectBase<Eigen::Matrix<float, 1, 3, 1, 1, 3> >&) const;
template float igl::AABB<Eigen::Matrix<float, -1, 3, 1, -1, 3>, 3>::squared_distance<Eigen::Matrix<int, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&, Eigen::Matrix<float, 1, 3, 1, 1, 3> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<float, 1, 3, 1, 1, 3> >&) const;
template std::vector<int, std::allocator<int> > igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::find<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 1, -1, 1, 1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, 1, -1, 1, 1, -1> > const&, bool) const;
template std::vector<int, std::allocator<int> > igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::find<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1> const, 1, -1, false> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Block<Eigen::Matrix<double, -1, -1, 0, -1, -1> const, 1, -1, false> > const&, bool) const;
template std::vector<int, std::allocator<int> > igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::find<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 1, -1, 1, 1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, 1, -1, 1, 1, -1> > const&, bool) const;
template std::vector<int> igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::find<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 1, 2, 1, 1, 2>>(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1>> const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1>> const&, Eigen::MatrixBase<Eigen::Matrix<double, 1, 2, 1, 1, 2>> const&, bool) const;
template std::vector<int> igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::find<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 1, 3, 1, 1, 3>>(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1>> const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1>> const&, Eigen::MatrixBase<Eigen::Matrix<double, 1, 3, 1, 1, 3>> const&, bool) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, int);
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::init<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&);
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::serialize<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, int) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&);
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::init<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, int);
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::init<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&);
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::serialize<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, int) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<long, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<long, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 2, 3, 0, 2, 3>, Eigen::Matrix<double, 2, 1, 0, 2, 1>, Eigen::Matrix<int, 2, 1, 0, 2, 1>, Eigen::Matrix<double, 2, 3, 0, 2, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, 2, 3, 0, 2, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, 2, 1, 0, 2, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, 2, 1, 0, 2, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, 2, 3, 0, 2, 3> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&) const;
template void igl::AABB<Eigen::Matrix<double, -1, 3, 1, -1, 3>, 3>::init<Eigen::Matrix<int, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&);
template void igl::AABB<Eigen::Matrix<float, -1, 3, 0, -1, 3>, 3>::init<Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&);
template void igl::AABB<Eigen::Matrix<float, -1, 3, 1, -1, 3>, 3>::init<Eigen::Matrix<int, -1, 3, 1, -1, 3> >(Eigen::MatrixBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 3, 1, -1, 3> > const&);
template double igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 3>::squared_distance<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::Matrix<double, 1, 3, 1, 1, 3> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 3, 1, 1, 3> >&) const;
template double igl::AABB<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>::squared_distance<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::MatrixBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::Matrix<double, 1, 2, 1, 1, 2> const&, int&, Eigen::PlainObjectBase<Eigen::Matrix<double, 1, 2, 1, 1, 2> >&) const;
#ifdef WIN32
template void igl::AABB<class Eigen::Matrix<double,-1,-1,0,-1,-1>,2>::squared_distance<class Eigen::Matrix<int,-1,-1,0,-1,-1>,class Eigen::Matrix<double,-1,-1,0,-1,-1>,class Eigen::Matrix<double,-1,1,0,-1,1>,class Eigen::Matrix<__int64,-1,1,0,-1,1>,class Eigen::Matrix<double,-1,3,0,-1,3> >(class Eigen::MatrixBase<class Eigen::Matrix<double,-1,-1,0,-1,-1> > const &,class Eigen::MatrixBase<class Eigen::Matrix<int,-1,-1,0,-1,-1> > const &,class Eigen::MatrixBase<class Eigen::Matrix<double,-1,-1,0,-1,-1> > const &,class Eigen::PlainObjectBase<class Eigen::Matrix<double,-1,1,0,-1,1> > &,class Eigen::PlainObjectBase<class Eigen::Matrix<__int64,-1,1,0,-1,1> > &,class Eigen::PlainObjectBase<class Eigen::Matrix<double,-1,3,0,-1,3> > &)const;
template void igl::AABB<class Eigen::Matrix<double,-1,-1,0,-1,-1>,3>::squared_distance<class Eigen::Matrix<int,-1,-1,0,-1,-1>,class Eigen::Matrix<double,-1,-1,0,-1,-1>,class Eigen::Matrix<double,-1,1,0,-1,1>,class Eigen::Matrix<__int64,-1,1,0,-1,1>,class Eigen::Matrix<double,-1,3,0,-1,3> >(class Eigen::MatrixBase<class Eigen::Matrix<double,-1,-1,0,-1,-1> > const &,class Eigen::MatrixBase<class Eigen::Matrix<int,-1,-1,0,-1,-1> > const &,class Eigen::MatrixBase<class Eigen::Matrix<double,-1,-1,0,-1,-1> > const &,class Eigen::PlainObjectBase<class Eigen::Matrix<double,-1,1,0,-1,1> > &,class Eigen::PlainObjectBase<class Eigen::Matrix<__int64,-1,1,0,-1,1> > &,class Eigen::PlainObjectBase<class Eigen::Matrix<double,-1,3,0,-1,3> > &)const;
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More