Bläddra i källkod

Merge remote-tracking branch 'upstream/master'

Former-commit-id: fe58cbe79bc689c75ada4a438eb0831fedcfbf9c
Qingnan Zhou 9 år sedan
förälder
incheckning
cef87e3e71

+ 3 - 2
include/igl/copyleft/boolean/CSGTree.h

@@ -26,13 +26,14 @@ namespace igl
       //template <typename DerivedF>
       class CSGTree
       {
-        private:
+        public:
           typedef CGAL::Epeck::FT ExactScalar;
-          typedef Eigen::Matrix<ExactScalar,Eigen::Dynamic,3> MatrixX3E;
           //typedef Eigen::PlainObjectBase<DerivedF> POBF;
           typedef Eigen::MatrixXi POBF;
           typedef POBF::Index FIndex;
+          typedef Eigen::Matrix<ExactScalar,Eigen::Dynamic,3> MatrixX3E;
           typedef Eigen::Matrix<FIndex,Eigen::Dynamic,1> VectorJ;
+        private:
           // Resulting mesh
           MatrixX3E m_V;
           POBF m_F;

+ 24 - 7
include/igl/copyleft/boolean/mesh_boolean.cpp

@@ -65,6 +65,23 @@ IGL_INLINE void igl::copyleft::boolean::mesh_boolean(
       DerivedFC FF(FA.rows() + FB.rows(), 3);
       VV << VA, VB;
       FF << FA, FB.array() + VA.rows();
+      //// Handle annoying empty cases
+      //if(VA.size()>0)
+      //{
+      //  VV<<VA;
+      //}
+      //if(VB.size()>0)
+      //{
+      //  VV<<VB;
+      //}
+      //if(FA.size()>0)
+      //{
+      //  FF<<FA;
+      //}
+      //if(FB.size()>0)
+      //{
+      //  FF<<FB.array()+VA.rows();
+      //}
       resolve_fun(VV, FF, V, F, CJ);
   }
 
@@ -165,13 +182,13 @@ IGL_INLINE void igl::copyleft::boolean::mesh_boolean(
     Eigen::PlainObjectBase<DerivedFC > & FC,
     Eigen::PlainObjectBase<DerivedJ > & J)
 {
-  typedef CGAL::Epeck Kernel;
-  typedef Kernel::FT ExactScalar;
-  typedef Eigen::Matrix<
-    ExactScalar,
-    Eigen::Dynamic,
-    Eigen::Dynamic,
-    DerivedVC::IsRowMajor> MatrixXES;
+  //typedef CGAL::Epeck Kernel;
+  //typedef Kernel::FT ExactScalar;
+  //typedef Eigen::Matrix<
+  //  ExactScalar,
+  //  Eigen::Dynamic,
+  //  Eigen::Dynamic,
+  //  DerivedVC::IsRowMajor> MatrixXES;
 
   switch (type) {
     case MESH_BOOLEAN_TYPE_UNION:

+ 1 - 1
include/igl/copyleft/cgal/closest_facet.cpp

@@ -426,5 +426,5 @@ IGL_INLINE void igl::copyleft::cgal::closest_facet(
 }
 
 #ifdef IGL_STATIC_LIBRARY
-template void igl::copyleft::cgal::closest_facet<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1>, unsigned long, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1> > const&, std::__1::vector<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >, std::__1::allocator<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > > > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+template void igl::copyleft::cgal::closest_facet<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1>, unsigned long, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<CGAL::Lazy_exact_nt<CGAL::Gmpq>, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
 #endif

+ 2 - 0
include/igl/doublearea.cpp

@@ -204,6 +204,8 @@ Eigen::PlainObjectBase<DeriveddblA> & dblA)
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // generated by autoexplicit.sh
+template void igl::doublearea<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3>, Eigen::Matrix<float, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 1, 0, -1, 1> >&);
+// generated by autoexplicit.sh
 template void igl::doublearea<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 // generated by autoexplicit.sh
 template void igl::doublearea<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);

+ 2 - 0
include/igl/edge_lengths.cpp

@@ -72,6 +72,8 @@ IGL_INLINE void igl::edge_lengths(
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // generated by autoexplicit.sh
+template void igl::edge_lengths<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3>, Eigen::Matrix<float, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> >&);
+// generated by autoexplicit.sh
 template void igl::edge_lengths<Eigen::Matrix<float, -1, 2, 0, -1, 2>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, Eigen::Matrix<float, -1, 2, 0, -1, 2> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 2, 0, -1, 2> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 2, 0, -1, 2> >&);
 // generated by autoexplicit.sh
 template void igl::edge_lengths<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&);

+ 2 - 0
include/igl/internal_angles.cpp

@@ -96,6 +96,8 @@ IGL_INLINE void igl::internal_angles(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
+// generated by autoexplicit.sh
+template void igl::internal_angles<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3>, Eigen::Matrix<float, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 0, -1, 3> >&);
 template void igl::internal_angles<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::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::internal_angles<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, -1, 1, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::internal_angles<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);

+ 2 - 0
include/igl/per_face_normals.cpp

@@ -105,6 +105,8 @@ IGL_INLINE void igl::per_face_normals_stable(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
+// generated by autoexplicit.sh
+template void igl::per_face_normals<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3>, Eigen::Matrix<float, -1, 3, 1, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> >&);
 template void igl::per_face_normals<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> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::per_face_normals<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 1, 0, 3, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::per_face_normals<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&);

+ 1 - 0
include/igl/per_vertex_normals.cpp

@@ -107,4 +107,5 @@ template void igl::per_vertex_normals<Eigen::Matrix<double, -1, -1, 0, -1, -1>,
 template void igl::per_vertex_normals<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, igl::PerVertexNormalsWeightingType, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&);
 template void igl::per_vertex_normals<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&);
 template void igl::per_vertex_normals<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> >&);
+template void igl::per_vertex_normals<Eigen::Matrix<float, -1, 3, 1, -1, 3>, Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<unsigned int, -1, 3, 1, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, 3, 1, -1, 3> >&);
 #endif

+ 2 - 2
include/igl/resolve_duplicated_faces.cpp

@@ -21,14 +21,14 @@ IGL_INLINE void igl::resolve_duplicated_faces(
     Eigen::PlainObjectBase<DerivedF2>& F2,
     Eigen::PlainObjectBase<DerivedJ>& J) {
 
-  typedef typename DerivedF1::Scalar Index;
+  //typedef typename DerivedF1::Scalar Index;
   Eigen::VectorXi IA,IC;
   DerivedF1 uF;
   igl::unique_simplices(F1,uF,IA,IC);
 
   const size_t num_faces = F1.rows();
   const size_t num_unique_faces = uF.rows();
-  assert(IA.rows() == num_unique_faces);
+  assert((size_t) IA.rows() == num_unique_faces);
   // faces on top of each unique face
   std::vector<std::vector<int> > uF2F(num_unique_faces);
   // signed counts

+ 1 - 1
include/igl/vertex_triangle_adjacency.cpp

@@ -50,5 +50,5 @@ template void igl::vertex_triangle_adjacency<Eigen::Matrix<double, -1, 3, 1, -1,
 template void igl::vertex_triangle_adjacency<Eigen::Matrix<double, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 3, 0, -1, 3>, int>(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&);
 template void igl::vertex_triangle_adjacency<Eigen::Matrix<double, -1, -1, 0, -1, -1>, long, long>(Eigen::Matrix<double, -1, -1, 0, -1, -1>::Scalar, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<long, std::allocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > >&, std::vector<std::vector<long, std::allocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > >&);
 template void igl::vertex_triangle_adjacency<Eigen::Matrix<int, -1, -1, 0, -1, -1>, long, long>(Eigen::Matrix<int, -1, -1, 0, -1, -1>::Scalar, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<long, std::allocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > >&, std::vector<std::vector<long, std::allocator<long> >, std::allocator<std::vector<long, std::allocator<long> > > >&);
-template void igl::vertex_triangle_adjacency<Eigen::Matrix<int, -1, -1, 0, -1, -1>, unsigned long, unsigned long>(Eigen::Matrix<int, -1, -1, 0, -1, -1>::Scalar, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::__1::vector<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >, std::__1::allocator<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > > >&, std::__1::vector<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >, std::__1::allocator<std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > > >&);
+template void igl::vertex_triangle_adjacency<Eigen::Matrix<int, -1, -1, 0, -1, -1>, unsigned long, unsigned long>(Eigen::Matrix<int, -1, -1, 0, -1, -1>::Scalar, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > >&, std::vector<std::vector<unsigned long, std::allocator<unsigned long> >, std::allocator<std::vector<unsigned long, std::allocator<unsigned long> > > >&);
 #endif

+ 1 - 1
libigl-teaser.pdf.REMOVED.git-id

@@ -1 +1 @@
-6d633e0a6c52bd9130db774013a00a5dbe7adeb6
+d95997c253523e4aaf71fc6c570639f4bfafd399

+ 6 - 11
scripts/update_gh-pages.sh

@@ -1,7 +1,6 @@
 #!/bin/bash
 # Usage: cd $LIBIGL; scripts/update_gh-pages.sh
 set -o xtrace
-git pull && git checkout gh-pages && git rebase master && git pull
 
 HEADER="title: libigl
 author: Alec Jacobson and Daniele Panozzo and others
@@ -14,8 +13,10 @@ html header:   <script type='text/javascript' src='http://cdn.mathjax.org/mathja
 "
 
 echo "$HEADER" \
-  | cat - README.md | multimarkdown -o index.html && \
-  git commit -m "update index.html to match README.md" README.md index.html
+  | cat - README.md | multimarkdown -o index.html
+
+echo "$HEADER" \
+  | cat - style-guidelines.md | multimarkdown -o style-guidelines.html 
 
 HEADER="title: libigl
 author: Alec Jacobson and Daniele Panozzo and others
@@ -28,12 +29,6 @@ html header:   <script type='text/javascript' src='http://cdn.mathjax.org/mathja
 "
 
 echo "$HEADER" \
-  | cat - google-soc/google-soc.md | multimarkdown -o google-soc/index.html && \
-  git commit -m "update google-soc/index.html to match google-soc/google-soc.md" google-soc/google-soc.md google-soc/index.html 
-
-echo "$HEADER" \
-  | cat - optional/README.md | multimarkdown -o optional/index.html && \
-  git commit -m "update index.html to match README.md" optional/README.md \
-  optional/index.html
+  | cat - optional/README.md | multimarkdown -o optional/index.html
 
-git push origin gh-pages && git checkout master && git merge gh-pages && git push
+multimarkdown tutorial/tutorial.md -o tutorial/tutorial.html

+ 0 - 31
scripts/update_gh-pages_nogit.sh

@@ -1,31 +0,0 @@
-#!/bin/bash
-# Usage: cd $LIBIGL; scripts/update_gh-pages.sh
-set -o xtrace
-
-HEADER="title: libigl
-author: Alec Jacobson and Daniele Panozzo and others
-css: tutorial/style.css
-html header:   <script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
-<link rel='stylesheet' href='http://yandex.st/highlightjs/7.3/styles/default.min.css'>
-<script src='http://yandex.st/highlightjs/7.3/highlight.min.js'></script>
-<script>hljs.initHighlightingOnLoad();</script>
-
-"
-
-echo "$HEADER" \
-  | cat - README.md | multimarkdown -o index.html
-
-HEADER="title: libigl
-author: Alec Jacobson and Daniele Panozzo and others
-css: ../tutorial/style.css
-html header:   <script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
-<link rel='stylesheet' href='http://yandex.st/highlightjs/7.3/styles/default.min.css'>
-<script src='http://yandex.st/highlightjs/7.3/highlight.min.js'></script>
-<script>hljs.initHighlightingOnLoad();</script>
-
-"
-
-echo "$HEADER" \
-  | cat - optional/README.md | multimarkdown -o optional/index.html
-
-multimarkdown tutorial/tutorial.md -o tutorial/tutorial.html

+ 316 - 0
style-guidelines.html

@@ -0,0 +1,316 @@
+<!DOCTYPE html>
+<html>
+<head>
+	<meta charset="utf-8"/>
+	<title>libigl</title>
+	<meta name="author" content="Alec Jacobson and Daniele Panozzo and others"/>
+	<link type="text/css" rel="stylesheet" href="tutorial/style.css"/>
+<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>
+<link rel='stylesheet' href='http://yandex.st/highlightjs/7.3/styles/default.min.css'>
+<script src='http://yandex.st/highlightjs/7.3/highlight.min.js'></script>
+<script>hljs.initHighlightingOnLoad();</script>
+</head>
+<body>
+
+<h1 id="libiglstyleguidelines">Libigl Style Guidelines</h1>
+
+<p>This library is shared by many people. This document highlights some style
+guidelines for <em>developers</em> of the library, but also act as best-practices for
+users.</p>
+
+<blockquote>
+<p>This is still a work in progress and will likely grow in the near future.</p>
+</blockquote>
+
+<h2 id="filefunction">One function, one .h/.cpp pair</h2>
+
+<p>The structure of libigl is very flat and function-based. For every
+function/sub-routine create a single .h and .cpp file. For example, if you have
+a function that determines connected components from a face list <code>F</code> you would
+create the header <code>connected_components.h</code> and <code>connected_components.cpp</code> and the only
+function defined should be <code>void connected_components(const ... F, ... C)</code>. If the
+implementation of <code>connected_components</code> requires a subroutine to compute an
+adjacency matrix then <em>create another pair</em> <code>adjacency_matrix.h</code> and
+<code>adjacency_matrix.cpp</code> with a single function <code>void adjacency_matrix(const ... F, ...
+A)</code>.</p>
+
+<h3 id="example">Example</h3>
+
+<p>Here is an example function that would be defined in
+<code>include/igl/example_fun.h</code> and implemented in <code>include/igl/example_fun.cpp</code>.</p>
+
+<h4 id="example_fun.h"><code>example_fun.h</code></h4>
+
+<pre><code class="cpp">// This file is part of libigl, a simple c++ geometry processing library.
+// 
+// Copyright (C) 2015 [Your Name] [your email address]
+// 
+// This Source Code Form is subject to the terms of the Mozilla Public License 
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+// obtain one at http://mozilla.org/MPL/2.0/
+#ifndef IGL_EXAMPLE_FUN_H
+#define IGL_EXAMPLE_FUN_H
+
+#include &quot;igl_inline.h&quot;
+
+namespace igl
+{
+  // This is an example of a function, it takes a templated parameter and
+  // shovels it into cout
+  //
+  // Templates:
+  //   T  type that supports
+  // Input:
+  //   input  some input of a Printable type
+  // Returns true for the sake of returning something
+  template &lt;typename Printable&gt;
+  IGL_INLINE bool example_fun(const Printable &amp; input);
+}
+
+#ifndef IGL_STATIC_LIBRARY
+#  include &quot;example_fun.cpp&quot;
+#endif
+
+#endif
+</code></pre>
+
+<h4 id="example_fun.cpp"><code>example_fun.cpp</code></h4>
+
+<pre><code>// This file is part of libigl, a simple c++ geometry processing library.
+// 
+// Copyright (C) 2015 [Your Name] [your email address]
+// 
+// This Source Code Form is subject to the terms of the Mozilla Public License 
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+// obtain one at http://mozilla.org/MPL/2.0/
+#include &quot;igl/example_fun.h&quot;
+#include &lt;iostream&gt;
+
+template &lt;typename Printable&gt;
+IGL_INLINE bool igl::example_fun(const Printable &amp; input)
+{
+  using namespace std;
+  cout&lt;&lt;&quot;example_fun: &quot;&lt;&lt;input&lt;&lt;endl;
+  return true;
+}
+
+#ifdef IGL_STATIC_LIBRARY
+template bool igl::example_fun&lt;double&gt;(const double&amp; input);
+template bool igl::example_fun&lt;int&gt;(const int&amp; input);
+#endif
+</code></pre>
+
+<h3 id="avoidstatichelperfunctions">Avoid static &#8220;helper&#8221; functions</h3>
+
+<p>Strive to encapsulate sub-functions that could possibly be useful outside of
+the implementation of your current function. This might mean abstracting the
+interface a bit. If it doesn&#8217;t dramatically effect performance then create a
+new pair of .h/.cpp files with this sub-function.</p>
+
+<h4 id="lambdafunctions">Lambda functions</h4>
+
+<p>If encapsulation in a separate file is not possible or does not make sense,
+then avoid crowding the namespace by creating lambda functions within the
+function implmentation.</p>
+
+<h3 id="avoidhelperclasses">Avoid &#8220;helper&#8221; classes</h3>
+
+<p>Libigl is built around the high-performance paradigm of &#8220;struct of arrays&#8221;
+rather than &#8220;array of structs&#8221;. The way we achieve this is to avoid classes and
+pass &#8220;basic types&#8221; directly. The price we pay is long function interfaces, but
+this increases code reuse dramatically. A &#8220;basic type&#8221; in our context is a
+Eigen type, stl type, or basic C type.</p>
+
+<h2 id="headerdocumentation">Header Documentation</h2>
+
+<p>Each function prototype should be well documented in its corresponding .h
+header file. A typical documentation consists of four parts:</p>
+
+<pre><code class="cpp">// [A human readable description of what the function does.]
+//
+// Inputs:
+//   [variable name of first (const) input]   [dimensions and
+//     description of this input variable]
+//   [variable name of second (const) input]   [dimensions and
+//     description of this input variable]
+//   ...
+// Outputs:
+//   [variable name of first output ]   [dimensions and
+//     description of this output variable]
+//   [variable name of second output ]   [dimensions and
+//     description of this output variable]
+//   ...
+// Returns [description of return value]
+</code></pre>
+
+<h3 id="example">Example</h3>
+
+<p>For example the header <code>barycenter.h</code></p>
+
+<pre><code>// Computes the barycenter of every simplex
+//
+// Inputs:
+//   V  #V x dim matrix of vertex coordinates
+//   F  #F x simplex_size  matrix of indices of simplex corners into V
+// Output:
+//   BC  #F x dim matrix of 3d vertices
+//
+</code></pre>
+
+<h2 id="constinputs">Const inputs</h2>
+
+<p>All input parameters should be demarcated <code>const</code>. If an input is also an
+output than consider exposing two parameters (one <code>const</code>) or be sure to list
+the variable under both <code>// Inputs:</code> and <code>// Outputs:</code> in the header comments.</p>
+
+<h2 id="referenceparameters">Reference parameters</h2>
+
+<p>All but simple types should be passed by reference (e.g. <code>Matrix &amp; mat</code>) rather
+than pointers (e.g. <code>Matrix * mat</code>) or value (e.g. <code>Matrix mat</code>).</p>
+
+<h2 id="returnsvsoutputparameters">Returns vs output parameters</h2>
+
+<p>All functions should be implemented with at least one overload that has a
+<code>void</code> or simple return type (e.g. <code>bool</code> on success/failure). With this
+implementation its then possible to write an overload that returns a single
+output.</p>
+
+<p>For example:</p>
+
+<pre><code class="cpp">template &lt;typename Atype&gt;
+void adjacency_matrix(const ... &amp; F, Eigen::SparseMatrix&lt;AType&gt; &amp; A);
+
+template &lt;typename Atype&gt;
+Eigen::SparseMatrix&lt;Atype&gt; adjacency_matrix(const ... &amp; F);
+</code></pre>
+
+<h2 id="functionnamingconventions">Function naming conventions</h2>
+
+<p>Functions (and <a href="#filefunction">thus also files</a>) should have simple,
+descriptive names using lowercase letters and underscores between words. Avoid
+unnecessary prefaces. For example, instead of <code>compute_adjacency_matrix</code>,
+<code>construct_adjacency_matrix</code>, <code>extract_adjacency_matrix</code>,
+<code>get_adjacency_matrix</code>, or <code>set_adjacency_matrix</code> just call the function
+<code>adjacency_matrix</code>.</p>
+
+<h2 id="variablenamingconventions">Variable naming conventions</h2>
+
+<p>Libigl prefers short (even single character) variable names <em>with heavy
+documentation</em> in the comments in the header file or above the declaration of
+the function. When possible use <code>V</code> to mean a list of vertex positions and <code>F</code>
+to mean a list of faces/triangles.</p>
+
+<h2 id="classnamingconventions">Class naming conventions</h2>
+
+<p>Classes should be avoided. When naming a class use CamelCase (e.g.
+SortableRow.h).</p>
+
+<h2 id="enumnamingconvertion">Enum naming convertion</h2>
+
+<p>Enums types should be placed in the appropriate <code>igl::</code> namespace and should be
+named in CamelCase (e.g. <code>igl::SolverStatus</code>) and instances should be named in
+ALL_CAPS with underscores between words and prefaced with the name of the enum.
+For example:</p>
+
+<pre><code class="cpp">namespace igl
+{
+  enum SolverStatus
+  {
+    // Good
+    SOLVER_STATUS_CONVERGED = 0,
+    // OK
+    SOLVER_STATUS_MAX_ITER = 1,
+    // Bad
+    SOLVER_STATUS_ERROR = 2,
+    NUM_SOLVER_STATUSES = 3,
+  };
+};
+</code></pre>
+
+<h3 id="exceptionforfileio">Exception for file IO</h3>
+
+<p>For legacy reasons, file reading and writing functions use a different naming
+convention. A functions reading a <code>.xyz</code> file should be named <code>readXYZ</code> and a
+function writing <code>.xyz</code> files should be names <code>writeXYZ</code>.</p>
+
+<h2 id="usingnamespace...inglobalscope"><code>using namespace ...</code> in global scope</h2>
+
+<p>Writing <code>using namespace std;</code>, <code>using namespace Eigen;</code> etc. outside of a
+global scope is strictly forbidden. Place these lines at the top of each
+function instead.</p>
+
+<h2 id="namespacesandexternaldependencies">Namespaces and external dependencies</h2>
+
+<p>Functions in the main library (directly in <code>include/igl</code>) should only depend on
+Eigen and stl. These functions should have the <code>igl::</code> namespace.</p>
+
+<p>Functions with other dependencies should be placed into
+appropriate sub-directories (e.g. if <code>myfunction</code> depends on tetgen then create
+<code>igl/copyleft/tetgen/myfunction.h</code> and <code>igl/copyleft/tetgen/myfunction.cpp</code> and give the function
+the namespace <code>igl::copyleft::tetgen::myfunction</code>.</p>
+
+<h3 id="copyleftsubdirectorynamespace">copyleft subdirectory/namespace</h3>
+
+<p>Dependencies that require users of libigl to release their projects open source
+(e.g. GPL) are considered aggressively &#8220;copyleft&#8221; and should be placed in the
+<code>include/igl/copyleft/</code> sub-directory and <code>igl::copyleft::</code> namespace.</p>
+
+<h2 id="assertions">Assertions</h2>
+
+<p>Be generous with assertions and always identify the assertion with strings:</p>
+
+<pre><code class="cpp">assert(m &lt; n &amp;&amp; &quot;m must be less than n&quot;);
+</code></pre>
+
+<h2 id="ifndefincludeguard">ifndef include guard</h2>
+
+<p>Every header file should be wrapped in an <code>#ifndef</code> compiler directive. The
+name of the guard should be in direct correspondence with the path of the .h
+file. For example, <code>include/igl/copyleft/tetgen/tetrahedralize.h</code> should be</p>
+
+<pre><code class="cpp">#ifndef IGL_COPYLEFT_TETGEN_TETRAHEDRALIZE_H
+#define IGL_COPYLEFT_TETGEN_TETRAHEDRALIZE_H
+...
+#endif
+</code></pre>
+
+<h2 id="spacesvs.tabsindentation">Spaces vs. tabs indentation</h2>
+
+<p>Do not use tabs. Use 2 spaces for each indentation level.</p>
+
+<h2 id="maxlinelength">Max line length</h2>
+
+<p>Limit lines to 80 characters. Break up long lines into many operations (this
+also helps performance).</p>
+
+<h2 id="includeorder">Include order</h2>
+
+<p><code>#include</code> directives at the top of a .h or .cpp file should be sorted
+according to a simple principle: place headers of files most likely to be
+edited by you first. This means for
+<code>include/igl/copyleft/tetgen/tetrahedralize.cpp</code> you might see</p>
+
+<pre><code class="cpp">// [Includes of headers in this directory]
+#include &quot;tetrahedralize.h&quot;
+#include &quot;mesh_to_tetgenio.h&quot;
+#include &quot;tetgenio_to_tetmesh.h&quot;
+// [Includes of headers in this project]
+#include &quot;../../matrix_to_list.h&quot;
+#include &quot;../../list_to_matrix.h&quot;
+#include &quot;../../boundary_facets.h&quot;
+// [Includes of headers of related projects]
+#include &lt;Eigen/Core&gt;
+// [Includes of headers of standard libraries]
+#include &lt;cassert&gt;
+#include &lt;iostream&gt;
+</code></pre>
+
+<h2 id="placementofincludes">Placement of includes</h2>
+
+<p>Whenever possible <code>#include</code> directives should be placed in the <code>.cpp</code>
+implementation file rather than the <code>.h</code> header file.</p>
+
+<h2 id="eigentemplates">Eigen templates</h2>
+
+</body>
+</html>

+ 87 - 22
style-guidelines.md

@@ -1,22 +1,87 @@
 # Libigl Style Guidelines
 
-This library is shared by many people. This document highlights some style
-guidelines for _developers_ of the library, but also act as best-practices for
-users.
-
-> This is still a work in progress and will likely grow in the near future.
+Libigl is used and developed by many people. This document highlights some
+style guidelines for _developers_ of the library, but also acts as
+best-practices for users.
 
 ## One function, one .h/.cpp pair [filefunction]
 
 The structure of libigl is very flat and function-based. For every
-function/sub-routine create a single .h and .cpp file. For example, if you have
+function/sub-routine, create a single .h and .cpp file. For example, if you have
 a function that determines connected components from a face list `F` you would
 create the header `connected_components.h` and `connected_components.cpp` and the only
 function defined should be `void connected_components(const ... F, ... C)`. If the
 implementation of `connected_components` requires a subroutine to compute an
 adjacency matrix then _create another pair_ `adjacency_matrix.h` and
-`adjacency_matrix.cpp` with a single function `void adjacency_matrix(const ... F, ...
-A)`.
+`adjacency_matrix.cpp` with a single function `void adjacency_matrix(const ... F, ... A)`.
+
+### Example
+Here is an example function that would be defined in
+`include/igl/example_fun.h` and implemented in `include/igl/example_fun.cpp`.
+
+#### `example_fun.h`
+
+```cpp
+// This file is part of libigl, a simple c++ geometry processing library.
+// 
+// Copyright (C) 2015 [Your Name] [your email address]
+// 
+// This Source Code Form is subject to the terms of the Mozilla Public License 
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+// obtain one at http://mozilla.org/MPL/2.0/
+#ifndef IGL_EXAMPLE_FUN_H
+#define IGL_EXAMPLE_FUN_H
+
+#include "igl_inline.h"
+
+namespace igl
+{
+  // This is an example of a function, it takes a templated parameter and
+  // shovels it into cout
+  //
+  // Templates:
+  //   T  type that supports
+  // Input:
+  //   input  some input of a Printable type
+  // Returns true for the sake of returning something
+  template <typename Printable>
+  IGL_INLINE bool example_fun(const Printable & input);
+}
+
+#ifndef IGL_STATIC_LIBRARY
+#  include "example_fun.cpp"
+#endif
+
+#endif
+```
+
+#### `example_fun.cpp`
+
+```
+// This file is part of libigl, a simple c++ geometry processing library.
+// 
+// Copyright (C) 2015 [Your Name] [your email address]
+// 
+// This Source Code Form is subject to the terms of the Mozilla Public License 
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+// obtain one at http://mozilla.org/MPL/2.0/
+#include "igl/example_fun.h"
+#include <iostream>
+
+template <typename Printable>
+IGL_INLINE bool igl::example_fun(const Printable & input)
+{
+  using namespace std;
+  cout<<"example_fun: "<<input<<endl;
+  return true;
+}
+
+#ifdef IGL_STATIC_LIBRARY
+template bool igl::example_fun<double>(const double& input);
+template bool igl::example_fun<int>(const int& input);
+#endif
+```
+
 
 ### Avoid static "helper" functions
 
@@ -49,16 +114,16 @@ header file. A typical documentation consists of four parts:
 // [A human readable description of what the function does.]
 //
 // Inputs:
-//   [variable name of first (const) input]   [dimensions and
-//     description of this input variable]
-//   [variable name of second (const) input]   [dimensions and
-//     description of this input variable]
+//   [variable name of first (const) input]   [dimensions and description of
+//     this input variable]
+//   [variable name of second (const) input]   [dimensions and description of
+//     this input variable]
 //   ...
 // Outputs:
-//   [variable name of first output ]   [dimensions and
-//     description of this output variable]
-//   [variable name of second output ]   [dimensions and
-//     description of this output variable]
+//   [variable name of first output ]   [dimensions and description of this
+//     output variable]
+//   [variable name of second output ]   [dimensions and description of this
+//     output variable]
 //   ...
 // Returns [description of return value]
 ```
@@ -71,10 +136,10 @@ For example the header `barycenter.h`
 // Computes the barycenter of every simplex
 //
 // Inputs:
-//   V  #V x dim matrix of vertex coordinates
-//   F  #F x simplex_size  matrix of indices of simplex corners into V
+//   V  #V by dim matrix of vertex coordinates
+//   F  #F by simplex_size  matrix of indices of simplex corners into V
 // Output:
-//   BC  #F x dim matrix of 3d vertices
+//   BC  #F by dim matrix of 3d vertices
 //
 ```
 
@@ -233,7 +298,7 @@ edited by you first. This means for
 #include <iostream>
 ```
 
-## Eigen templates
-
-
+## Placement of includes
 
+Whenever possible `#include` directives should be placed in the `.cpp`
+implementation file rather than the `.h` header file.

+ 0 - 212
style_guidelines.html

@@ -1,212 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-  <head>
-    <title>libigl - Style Guidelines</title>
-    <link href="./style.css" rel="stylesheet" type="text/css">
-  <body>
-    <div id=container>
-    <div class=article_inner>
-    <a href=.><img src=libigl-logo.jpg alt="igl logo" class=center></a>
-    <h1>libigl Style Guidelines</h1>
-    <p>
-This library is shared by many people. This document highlights some style
-guidelines for <i>developers</i> of the <a href=.>libigl</a> library.
-   </p>
-   <p>
-Each function prototype should be well documented.  Write a summary of what
-the function does and a description of each template, input and output in
-each prototype. 
-    </p>
-
-    <h2>Example</h2>
-    <p>
-Here is an example function defined in <code>include/igl/example_fun.h</code> and
-implemented in <code>include/igl/example_fun.cpp</code>.
-    </p>
-    <h3>example_fun.h</h3>
-    <pre><code>
-// This file is part of libigl, a simple c++ geometry processing library.
-// 
-// Copyright (C) 2013 Alec Jacobson &lt;alecjacobson@gmail.com&gt;
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
-// obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef IGL_EXAMPLE_FUN_H
-#define IGL_EXAMPLE_FUN_H
-
-#include "igl_inline.h"
-
-namespace igl
-{
-  // This is an example of a function, it takes a templated parameter and
-  // shovels it into cout
-  //
-  // Templates:
-  //   T  type that supports
-  // Input:
-  //   input  some input of a Printable type
-  // Returns true for the sake of returning something
-  template &lt;typename Printable&gt;
-  IGL_INLINE bool example_fun(const Printable &amp; input);
-}
-
-#ifndef IGL_STATIC_LIBRARY
-#  include "example_fun.cpp"
-#endif
-
-#endif
-    </code></pre>
-    <h3>example_fun.cpp</h3>
-    <pre><code>
-// This file is part of libigl, a simple c++ geometry processing library.
-// 
-// Copyright (C) 2013 Alec Jacobson &lt;alecjacobson@gmail.com&gt;
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
-// obtain one at http://mozilla.org/MPL/2.0/.#include "igl/example_fun.h"
-#include &lt;iostream&gt;
-
-template &lt;typename Printable&gt;
-IGL_INLINE bool igl::example_fun(const Printable &amp; input)
-{
-  using namespace std;
-  cout&lt;&lt;"example_fun: "&lt;&lt;input&lt;&lt;endl;
-  return true;
-}
-
-#ifdef IGL_STATIC_LIBRARY
-template bool igl::example_fun&lt;double&gt;(const double&amp; input);
-template bool igl::example_fun&lt;int&gt;(const int&amp; input);
-#endif
-    </code></pre>
-
-
-
-    <h2 id=general_rules>General rules</h2>
-    <ul>
-      <li> Use a single .h/.cpp pair with the same name as the function </li>
-      <li>
-At least one version of the function should use references for all outputs
-      </li>
-      <li>
-Use wrappers and additional prototypes for returning single-output functions'
-outputs, but the default is to only use outputs
-      </li>
-      <li> All inputs should be <code>const</code>.</li>
-      <li>
-Use C++ references (e.g. <code>Matrix &amp; mat</code>) for inputs and outputs
-rather than pointers (e.g. <code>Matrix * mat</code>) or pass-by-copy (e.g.
-<code>Matrix mat</code>).
-      </li>
-      <li>
-Write multiple prototypes if you'd like to have optional parameters with
-default values.
-      </li>
-      <li>
-External dependencies (besides Eigen and OpenGL) are only allowed within extras.
-      </li>
-      <li>
-New extras and their dependencies must be discussed first.
-      </li>
-      <li>
-Hard-to-compile or obscure external dependencies can go in the <code>external/</code> directory.
-      </li>
-      <li>
-Do not use the <code>using namespace</code> directive anywhere outside a local scope. This
-means never write: <code>using namespace std;</code> or <code>using namespace
-igl;</code> etc. at the top of a file.
-      </li>
-      <li>
-Function names should either be the same as the corresponding MATLAB function
-or should use all lowercase separated by underscores: e.g.
-<code>my_function_name</code>
-      </li>
-      <li> Classes should be in <code>CamelCase</code></li>
-      <li> No tabs, only two spaces per indentation level </li>
-      <li> Be generous with assertions and always identify them with strings:
-      <br> e.g. <code>assert(m&lt;n &amp;&amp; "m must be less than n");</code></li>
-  </ul>
-
-    <h2>Specific rules</h2>
-    <p>
-Each file should be wrapped in an ifndef compiler directive. If the
-file's (and function's) name is example.h, then the ifndef should
-always begin with IGL_, then the function/file name in all caps then
-_H. As in:
-    </p>
-    <pre><code>
-#ifndef IGL_EXAMPLE_H
-#define IGL_EXAMPLE_H
-...
-#endif</code></pre>
-  
-    <p>
-Each file should begin with prototypes *without implementations* of
-each version of the function. All defined in the igl namespace. Each
-prototype should have its own comments describing what it is doing,
-and its templates, inputs, outputs.
-    </p>
-
-    <p>
-Implementation should be separated from prototypes in a .cpp file.
-    </p>
-
-    <p>
-Any includes, such as std libraries etc. should be in the .cpp file not the
-header .h file (whenever feasibly possible).
-    </p>
-
-    <p>
-Be generous by templating your inputs and outputs. If you do use
-templates, you must document the template just as you document inputs
-and outputs.
-    </p>
-
-    <h2>Useful scripts to check style</h2>
-  
-    <table>
-      <tr>
-        <th>script</th>
-        <th>Description</th>
-      <tr class=d0>
-        <td><code>grep -L IGL_INLINE *</code></td>
-        <td>Find files that aren't using "IGL_INLINE"</td>
-      </tr>
-      <tr class=d1>
-        <td><code>grep -L "namespace igl" *</code></td>
-        <td>Find files that aren't using igl namespace</td>
-      </tr>
-      <tr class=d0>
-        <td><code>grep -lP '\t' *</code></td>
-        <td>Find files using [TAB] character</td>
-      </tr>
-      <tr class=d1>
-        <td><code>grep -l "^using namespace" *.cpp</code></td>
-        <td>Find .cpp files that contain ^using namespace</td>
-      </tr>
-      <tr class=d0>
-        <td><code>grep -l 'assert([^"]*);' *</code></td>
-        <td>Find files using asserts without identifier strings</td>
-      </tr>
-      <tr class=d1>
-        <td><code>grep -l "ifndef IGL_.*[^H] *$" *.h</code></td>
-        <td>Find .h files that contain ifndef IGL_*[^H]</td>
-      </tr>
-      <tr class=d0>
-        <td><code>grep -L "^#ifndef IGL_" *</code></td>
-        <td>Find files that don't contain #ifndef IGL_</td>
-      </tr>
-      <tr class=d1>
-        <td><code>grep -L "^// This file is part of libigl" *</code></td>
-      </tr>
-    </table>
-
-    <p>See also: <a href=tutorial.html>tutorial</a>, <a
-    href=doc.html>auto-documentation</a>, <a href=file-formats/index.html>file
-    formats</a></p>
-  </div>
-  </div>
-  </body>
-</html>

+ 6 - 0
tutorial/CMakeLists.txt

@@ -60,6 +60,12 @@ ENDIF(MSVC)
 
 option(ENABLE_TUTORIALS " " OFF)
 
+IF(EMBREE_FOUND)
+  add_subdirectory("../external/embree/" "embree")		
+  include_directories("../external/embree/include")		
+  list(APPEND SHARED_LIBRARIES "embree")		
+ENDIF(EMBREE_FOUND)
+
 # endif(True)
 
 # if(True)

+ 1 - 1
tutorial/tutorial.html.REMOVED.git-id

@@ -1 +1 @@
-5d18dcc0e2feb40028d7020f495e49d98bc1c2ad
+658461f27515ecf34dba2bb605a927096b74da75