Browse Source

Merge branch 'master' of https://github.com/libigl/libigl

Former-commit-id: 7c2eaf0d2cbfac22f7b5cb846a1c9f209706ba73
schuellc 10 years ago
parent
commit
6c645d4144
100 changed files with 379 additions and 1089 deletions
  1. 22 0
      README.md
  2. 2 0
      RELEASE_HISTORY.txt
  3. 1 1
      VERSION.txt
  4. 6 16
      build/Makefile
  5. 47 3
      build/Makefile.conf
  6. 1 0
      build/Makefile_bbw
  7. 1 0
      build/Makefile_boolean
  8. 1 0
      build/Makefile_boost
  9. 1 0
      build/Makefile_cgal
  10. 45 0
      build/Makefile_comiso
  11. 2 1
      build/Makefile_embree
  12. 1 0
      build/Makefile_lim
  13. 4 3
      build/Makefile_matlab
  14. 1 0
      build/Makefile_mosek
  15. 1 0
      build/Makefile_png
  16. 1 0
      build/Makefile_svd3x3
  17. 1 0
      build/Makefile_tetgen
  18. 1 0
      build/Makefile_triangle
  19. 1 0
      build/Makefile_viewer
  20. 1 0
      build/Makefile_xml
  21. 3 8
      examples/MatlabWorkspace/Makefile
  22. 2 7
      examples/ReAntTweakBar/Makefile
  23. 2 6
      examples/affine/Makefile
  24. 0 10
      examples/ambient-occlusion-mex/README
  25. 0 22
      examples/ambient-occlusion-mex/ambient_occlusion.m
  26. 0 9
      examples/ambient-occlusion-mex/compile.m
  27. 0 32
      examples/ambient-occlusion-mex/example.m
  28. 0 51
      examples/ambient-occlusion-mex/mexFunction.cpp
  29. 0 59
      examples/ambient-occlusion-mex/parse_rhs.cpp
  30. 0 27
      examples/ambient-occlusion-mex/parse_rhs.h
  31. 2 13
      examples/ambient-occlusion/Makefile
  32. 1 35
      examples/arap/Makefile
  33. 0 1
      examples/arap/example.cpp
  34. 0 24
      examples/basic_topology/Makefile
  35. 0 7
      examples/basic_topology/README
  36. 0 53
      examples/basic_topology/example1.cpp
  37. 1 13
      examples/bbw/Makefile
  38. 0 17
      examples/beach-balls/Makefile
  39. 2 26
      examples/camera/Makefile
  40. 0 25
      examples/cat/Makefile
  41. 0 9
      examples/cat/README
  42. 0 36
      examples/cat/example.cpp
  43. 0 16
      examples/colored-mesh/Makefile
  44. 2 6
      examples/dmat/Makefile
  45. 4 8
      examples/eigen-gotchas/Makefile
  46. 0 1
      examples/eigen-gotchas/example.cpp
  47. 0 15
      examples/embree/Makefile
  48. 4 7
      examples/example_fun/Makefile
  49. 2 5
      examples/file_contents_as_string/Makefile
  50. 0 24
      examples/flare-eyes/Makefile
  51. 0 9
      examples/flare-eyes/example.cpp
  52. 2 5
      examples/get_seconds/Makefile
  53. 2 3
      examples/glslversion/Makefile
  54. 5 5
      examples/glut_speed_test/Makefile
  55. 4 8
      examples/harwell_boeing/Makefile
  56. 1 16
      examples/intersections/Makefile
  57. 2 5
      examples/is_dir/Makefile
  58. 2 6
      examples/marching_cubes/Makefile
  59. 2 6
      examples/meshio/Makefile
  60. 2 6
      examples/mode/Makefile
  61. 1 8
      examples/multi-viewport/Makefile
  62. 3 23
      examples/patches/Makefile
  63. 2 5
      examples/path_tests/Makefile
  64. 2 5
      examples/pathinfo/Makefile
  65. 2 6
      examples/quicklook-mesh/Makefile
  66. 1 1
      examples/quicklook-mesh/README
  67. 2 24
      examples/randomly-sample-mesh/Makefile
  68. 3 10
      examples/render_to_png/Makefile
  69. 2 23
      examples/rotate-widget/Makefile
  70. 2 23
      examples/scene-rotation/Makefile
  71. 2 26
      examples/shadow-mapping/Makefile
  72. 3 46
      examples/skeleton-builder/Makefile
  73. 4 31
      examples/skeleton-posing/Makefile
  74. 3 25
      examples/skeleton/Makefile
  75. 0 1
      examples/skeleton/example.cpp
  76. 2 6
      examples/slice/Makefile
  77. 2 5
      examples/sort/Makefile
  78. 2 6
      examples/sortrows/Makefile
  79. 2 3
      examples/stdin_to_temp/Makefile
  80. 2 3
      examples/svd/Makefile
  81. 1 21
      examples/textured-mesh/Makefile
  82. 2 4
      examples/trackball/Makefile
  83. 2 14
      examples/transparency/Makefile
  84. 2 6
      examples/transpose_blocks/Makefile
  85. 2 12
      examples/upright/Makefile
  86. 2 2
      google-soc/index.html
  87. 1 0
      include/igl/HalfEdgeIterator.h
  88. 45 47
      include/igl/RotateWidget.h
  89. 1 0
      include/igl/all_edges.cpp
  90. 9 9
      include/igl/angle_bound_frame_fields.cpp
  91. 2 0
      include/igl/angles.cpp
  92. 1 0
      include/igl/avg_edge_length.cpp
  93. 5 4
      include/igl/barycenter.cpp
  94. 48 9
      include/igl/boolean/mesh_boolean.cpp
  95. 2 2
      include/igl/boundary_facets.cpp
  96. 13 6
      include/igl/boundary_loop.cpp
  97. 5 4
      include/igl/bounding_box.cpp
  98. 4 4
      include/igl/cgal/SelfIntersectMesh.h
  99. 1 0
      include/igl/cgal/complex_to_mesh.cpp
  100. 1 0
      include/igl/cgal/mesh_to_cgal_triangle_list.cpp

+ 22 - 0
README.md

@@ -95,6 +95,28 @@ caution.
 You can keep up to date by cloning a read-only copy of our GitHub
 [repository](https://github.com/libigl).
 
+## Known Issues
+We really heavily on Eigen. Nearly all inputs and outputs are Eigen matrices of
+some kind. However, we currently _only_ support Eigen's default column-major
+ordering. That means, we **do not** expect our code to work for matrices using
+the `Eigen::RowMajor` flag. If you can, change definitions like:
+
+```cpp
+Eigen::Matrix<double, Eigen::Dynamic, 3, Eigen::RowMajor> A;
+```
+
+to
+
+```cpp
+Eigen::Matrix<double, Eigen::Dynamic, 3, Eigen::ColMajor> A;
+// or simply
+Eigen::Matrix<double, Eigen::Dynamic, 3> A;
+```
+
+We hope to fix this, or at least identify which functions are safe (many of
+them probably work just fine). This requires setting up unit testing, which is
+a major _todo_ for our development.
+
 ## How to contribute
 
 If you are interested in joining development, please fork the repository and

+ 2 - 0
RELEASE_HISTORY.txt

@@ -1,3 +1,5 @@
+1.1.5  Bug fix in booleans
+1.1.4  Edge collapsing and linear program solving
 1.1.3  Bug fixes in active set and boundary_conditions
 1.1.1  PLY file format support
 1.1.0  Mesh boolean operations using CGAL and cork, implementing [Attene 14]

+ 1 - 1
VERSION.txt

@@ -3,4 +3,4 @@
 # Anyone may increment Minor to indicate a small change.
 # Major indicates a large change or large number of changes (upload to website)
 # World indicates a substantial change or release
-1.1.3
+1.1.5

+ 6 - 16
build/Makefile

@@ -3,6 +3,7 @@ all: lib extras examples
 framework: lib extras lib/igl.framework/
 
 # Shared flags etc.
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 $(info Hello, $(IGL_USERNAME)!)
 
@@ -32,6 +33,9 @@ endif
 ifeq ($(IGL_WITH_EMBREE),1)
 	EXTRAS += embree
 endif
+ifeq ($(IGL_WITH_COMISO),1)
+	EXTRAS += comiso
+endif
 ifeq ($(IGL_WITH_MATLAB),1)
 	EXTRAS += matlab
 endif
@@ -69,7 +73,7 @@ extras:
 
 
 #############################################################################
-# SOURCE 
+# SOURCE
 #############################################################################
 CPP_FILES=$(wildcard ../include/igl/*.cpp)
 H_FILES=$(wildcard ../include/igl/*.h)
@@ -82,25 +86,11 @@ INC+=-I../include/
 # DEPENDENCIES
 #############################################################################
 INC+=$(OPENGL_INC)
-
-# Eigen dependency
-ifndef EIGEN3_INC
-	EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
-endif
 INC+=$(EIGEN3_INC)
-
-# AntTweakBar dependency
-#ANTTWEAKBAR_INC=-I$(DEFAULT_PREFIX)/include
-ANTTWEAKBAR_INC=-I../external/AntTweakBar/include
 INC+=$(ANTTWEAKBAR_INC)
 
-## OpenGL dependency
-#LIB+=-framework OpenGL
-#LIB+=-framework GLUT
-#LIB+=-framework AppKit
-
 .PHONY: obj
-obj: 
+obj:
 	mkdir -p obj
 
 ../lib/libigl.a: obj $(OBJ_FILES)

+ 47 - 3
build/Makefile.conf

@@ -3,6 +3,8 @@
 #############################################################################
 UNAME := $(shell uname)
 
+THIS_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+
 GG=g++
 #GG=clang++
 #GG=/usr/bin/g++     17s
@@ -10,7 +12,6 @@ GG=g++
 #GG=g++-mp-4.3       15.5s
 #GG=g++-mp-4.7       19.9s
 
-CFLAGS += -DIGL_STATIC_LIBRARY
 CFLAGS += -Wall
 CFLAGS += -std=c++11
 
@@ -46,6 +47,7 @@ ifeq ($(IGL_USERNAME),whitinge)
 endif
 
 ifeq ($(IGL_USERNAME),ajx)
+	CFLAGS += -DIGL_STATIC_LIBRARY
 	MOSEKPLATFORM=osx64x86
 	MOSEKVERSION=7
 	IGL_WITH_VIEWER=1
@@ -114,10 +116,15 @@ endif
 
 ifeq ($(IGL_USERNAME),olkido)
     IGL_WITH_MATLAB=1
-	IGL_WITH_XML=1
+		IGL_WITH_COMISO=1
+		IGL_WITH_XML=1
+		COMISO=/Users/olkido/Documents/igl/MIQ/src/CoMISo
+	  IGL_WITH_XML=1
     AFLAGS= -m64
     IGL_WITH_EMBREE=1
     IGL_WITH_PNG=1
+		IGL_WITH_VIEWER=1
+		MATLAB=/Applications/MATLAB_R2014b.app/
 endif
 
 ifeq ($(IGL_USERNAME),chrsch)
@@ -194,7 +201,44 @@ endif
 ifndef GLUT_LIB
 	GLUT_LIB=-framework GLUT
 endif
+# Eigen dependency
+ifndef EIGEN3_INC
+	EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
+endif
+
+ifndef LIBIGL
+	LIBIGL=$(THIS_DIR)/../
+endif
+LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
+LIBIGL_INC=-I$(LIBIGL)/include
+
+ifndef ANTTWEAKBAR_INC
+	ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
+endif
 ifndef ANTTWEAKBAR_LIB
 	# AntTweakBar needs AppKit on mac os x
-	ANTTWEAKBAR_LIB=-lAntTweakBar -framework AppKit
+	ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
+endif
+
+ifndef SINGULAR_VALUE_DECOMPOSITION_INC
+				SINGULAR_VALUE_DECOMPOSITION_INC=\
+				-I$(LIBIGL)/external/Singular_Value_Decomposition/
+endif
+
+ifndef TETGEN
+# By default I'm using the libigl version. Adjust accordingly
+				TETGEN=$(LIBIGL)/external/tetgen
+				TETGEN_LIB=-L$(TETGEN) -ligltetgen -ltet 
+				TETGEN_INC=-I$(TETGEN)
+endif
+
+ifndef EMBREE
+				EMBREE=$(LIBIGL)/external/embree
+				EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/include
+				EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
+endif
+ifndef YIMG
+				YIMG=$(LIBIGL)/external/yimg
+				YIMG_LIB=-L$(YIMG) -lyimg -lz -L/usr/X11/lib -L$(DEFAULT_PREFIX)/lib -lpng -bind_at_load
+				YIMG_INC=-I/usr/X11/include -I$(YIMG) 
 endif

+ 1 - 0
build/Makefile_bbw

@@ -2,6 +2,7 @@
 all: libiglbbw
 debug: libiglbbw
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
 debug: OPTFLAGS += -g -Wall

+ 1 - 0
build/Makefile_boolean

@@ -4,6 +4,7 @@ include Makefile.conf
 all: libiglboolean
 debug: libiglboolean
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG -std=c++11
 debug: CFLAGS += -g -Wall -std=c++11

+ 1 - 0
build/Makefile_boost

@@ -4,6 +4,7 @@ include Makefile.conf
 all: libiglboost
 debug: libiglboost
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG
 debug: CFLAGS += -g -Wall 

+ 1 - 0
build/Makefile_cgal

@@ -3,6 +3,7 @@
 all: libiglcgal
 debug: libiglcgal
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG 
 debug: CFLAGS += -g -Wall -Werror

+ 45 - 0
build/Makefile_comiso

@@ -0,0 +1,45 @@
+include Makefile.conf
+
+.PHONY: all
+all: libiglcomiso
+debug: libiglcomiso
+
+CFLAGS += -DIGL_STATIC_LIBRARY
+include Makefile.conf
+all: CFLAGS += -O3 -DNDEBUG -std=c++11
+debug: CFLAGS += -g -Wall -std=c++11
+CFLAGS += -DINCLUDE_TEMPLATES
+
+.PHONY: libiglcomiso
+libiglcomiso: obj ../lib/libiglcomiso.a
+
+SRC_DIR=../include/igl/comiso/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
+OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
+
+# include igl headers
+INC+=-I../include/
+
+# EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY
+
+# Eigen dependency
+EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
+INC+=$(EIGEN3_INC)
+
+# comiso dependency
+COMISO_INC=-I$(COMISO)/ -I$(COMISO)/gmm/include -I$(COMISO)/../
+INC+=$(COMISO_INC)
+
+obj:
+	mkdir -p obj
+
+../lib/libiglcomiso.a: $(OBJ_FILES)
+	rm -f $@
+	ar cqs $@ $(OBJ_FILES)
+
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
+	g++ $(AFLAGS) $(OPENMP) $(CFLAGS) -c -o $@ $< $(INC)
+
+clean:
+	rm -f $(OBJ_FILES)
+	rm -f ../lib/libiglcomiso.a

+ 2 - 1
build/Makefile_embree

@@ -4,6 +4,7 @@ include Makefile.conf
 all: libiglembree
 debug: libiglembree
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG -std=c++11
 debug: CFLAGS += -g -Wall -std=c++11
@@ -28,7 +29,7 @@ INC+=$(EIGEN3_INC)
 #EMBREE=../external/embree
 #EMBREE_INC=-I$(EMBREE)/common -I$(EMBREE)/rtcore/
 EMBREE=../external/embree/
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
+EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/include
 #EMBREE_LIB=-L$(EMBREE)/bin -lrtcore -lsys
 INC+=$(EMBREE_INC)
 

+ 1 - 0
build/Makefile_lim

@@ -4,6 +4,7 @@ include Makefile.conf
 all: libigllim
 debug: libigllim
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG
 debug: CFLAGS += -g -Wall 

+ 4 - 3
build/Makefile_matlab

@@ -1,3 +1,4 @@
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG
 debug: CFLAGS += -g -Wall -Werror
@@ -16,7 +17,7 @@ OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 # include igl headers
 INC+=-I../include/
 
-# EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
+# EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY
 
 # Eigen dependency
 EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
@@ -24,14 +25,14 @@ INC+=$(EIGEN3_INC)
 
 # Matlab dependency
 ifndef MATLAB
-  MATLAB=/Applications/MATLAB_R2013b.app/
+  MATLAB=/Applications/MATLAB_R2014b.app/
   $(warning MATLAB undefined. Setting MATLAB=${MATLAB})
 endif
 MATLAB_INC=-I$(MATLAB)/extern/include/
 MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -leng
 INC+=$(MATLAB_INC)
 
-obj: 
+obj:
 	mkdir -p obj
 
 ../lib/libiglmatlab.a: $(OBJ_FILES)

+ 1 - 0
build/Makefile_mosek

@@ -1,3 +1,4 @@
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 
 .PHONY: all

+ 1 - 0
build/Makefile_png

@@ -1,3 +1,4 @@
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG 
 debug: CFLAGS += -g -Wall -Werror

+ 1 - 0
build/Makefile_svd3x3

@@ -1,3 +1,4 @@
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 
 .PHONY: all

+ 1 - 0
build/Makefile_tetgen

@@ -3,6 +3,7 @@
 all: libigltetgen
 debug: libigltetgen
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG 
 debug: CFLAGS += -g -Wall -Werror

+ 1 - 0
build/Makefile_triangle

@@ -3,6 +3,7 @@
 all: libigltriangle
 debug: libigltriangle
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG 
 debug: CFLAGS += -g -Wall -Werror

+ 1 - 0
build/Makefile_viewer

@@ -1,3 +1,4 @@
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG -fopenmp
 debug: CFLAGS += -g -Wall -Werror -fopenmp

+ 1 - 0
build/Makefile_xml

@@ -1,3 +1,4 @@
+CFLAGS += -DIGL_STATIC_LIBRARY
 include Makefile.conf
 
 .PHONY: all

+ 3 - 8
examples/MatlabWorkspace/Makefile

@@ -2,18 +2,13 @@
 
 # Shared flags etc.
 include ../../build/Makefile.conf
-
-IGL=../../
-IGL_LIB=-L$(IGL)/lib -ligl
-IGL_INC=-I$(IGL)/include
-
-EIGEN3_INC=-I/usr/local/include/eigen3 -I/usr/local/include/eigen3/unsupported -I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
+LIBIGL_LIB+=-liglmatlab
 
 MATLAB_INC=-I$(MATLAB)/extern/include/
 MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat
 
-LIB+=$(IGL_LIB) $(MATLAB_LIB)
-INC+=$(IGL_INC) $(EIGEN3_INC) $(MATLAB_INC)
+LIB+=$(LIBIGL_LIB) $(MATLAB_LIB)
+INC+=$(LIBIGL_INC) $(EIGEN3_INC) $(MATLAB_INC)
 
 CFLAGS += -g
 

+ 2 - 7
examples/ReAntTweakBar/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,12 +7,8 @@ all: example
 
 .PHONY: example
 
-IGL=../../
-
-ANTTWEAKBAR_INC=-I$(IGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(IGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-inc=-DIGL_HEADER_ONLY -I$(IGL)/include -I$(DEFAULT_PREFIX)/include $(ANTTWEAKBAR_INC)
-lib=-L$(IGL)/lib -ligl -L$(DEFAULT_PREFIX)/lib $(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB)
+inc=$(LIBIGL_INC) $(ANTTWEAKBAR_INC)
+lib=$(LIBIGL_LIB) $(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB)
 CFLAGS+=-g
 
 example: example.o

+ 2 - 6
examples/affine/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 all: example
@@ -8,12 +7,9 @@ include ../../build/Makefile.conf
 
 .PHONY: example
 
-igl_lib=../../
-eigen=$(DEFAULT_PREFIX)/include/eigen3
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include -I$(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 0 - 10
examples/ambient-occlusion-mex/README

@@ -1,10 +0,0 @@
-Small example showing how to build a mex function to call the
-igl/embree/ambient_occlusion function from matlab.
-
-To compile open matlab, `cd` to this directory and issue:
-
-    compile
-
-To run the example, add the IGL_TOOLBOX to your path and issue:
-
-    example

+ 0 - 22
examples/ambient-occlusion-mex/ambient_occlusion.m

@@ -1,22 +0,0 @@
-  % AMBIENT_OCCLUSION Compute ambient occlusion per given point
-  %
-  % S = ambient_occlusion(V,F,P,N,num_samples)
-  %
-  % Inputs:
-  %    V  #V by 3 list of mesh vertex positions
-  %    F  #F by 3 list of mesh triangle facet indices into V
-  %    P  #P by 3 list of origin points
-  %    N  #P by 3 list of origin normals
-  %    num_samples  number of samples
-  % Outputs:
-  %    S  #P list of ambient occlusion values between 1 (fully occluded) and 0
-  %      (not occluded)
-  %
-  % Examples:
-  %   % mesh (V,F), scalar field Z
-  %   AO = ambient_occlusion(V,F,V,per_vertex_normals(V,F),1000);
-  %   tsurf(F,V,'FaceVertexCData', ...
-  %     bsxfun(@times,1-AO, ...
-  %       squeeze(ind2rgb(floor(matrixnormalize(Z)*256),jet(256)))), ...
-  %     fphong,'EdgeColor','none');
-  %

+ 0 - 9
examples/ambient-occlusion-mex/compile.m

@@ -1,9 +0,0 @@
-mex -v -o ambient_occlusion -DMEX -largeArrayDims ...
-  -I/opt/local/include/eigen3 -I/usr/local/igl/libigl/include ...
-  -L/usr/local/igl/libigl/lib -ligl -liglmatlab -liglembree ...
-  CXXFLAGS="\$CXXFLAGS -m64 -msse4.2 -fopenmp" ...
-  -I/usr/local/igl/libigl/external/embree/embree/ ...
-  -I/usr/local/igl/libigl/external/embree/ ...
-  -L/usr/local/igl/libigl/external/embree/build -lembree -lsys ... 
-  mexFunction.cpp parse_rhs.cpp;
-

+ 0 - 32
examples/ambient-occlusion-mex/example.m

@@ -1,32 +0,0 @@
-[V,F] = load_mesh('../shared/cheburashka.off');
-N = per_vertex_normals(V,F);
-S = ambient_occlusion(V,F,V,N,1000);
-L = cotmatrix(V,F);
-M = massmatrix(V,F,'voronoi');
-[EV,~] = eigs(-L,M,15,'sm');
-Z = EV(:,7);
-qZ = round(255*(Z - min(Z))/(max(Z)-min(Z)));
-C = ind2rgb(qZ,jet(256));
-%Z = connected_components(F);
-%C = ind2rgb(Z(:),jet(max(Z)));
-
-nsp = 3;
-fs = 20;
-subplot(nsp,1,1);
-set(tsurf(F,V),'CData',Z,'EdgeColor','none',fphong);
-title('Pseudo-color  ','FontSize',fs);
-axis equal;
-view(2);
-colormap(jet(256));
-
-subplot(nsp,1,2);
-set(tsurf(F,V),'CData',permute(1-[S S S],[1 3 2]),'EdgeColor','none',fphong);
-title('Inverted ambient occlusion  ','FontSize',fs);
-axis equal;
-view(2);
-
-subplot(nsp,1,3);
-set(tsurf(F,V),'CData',bsxfun(@times,1-S,C),'EdgeColor','none',fphong);
-title('Product  ','FontSize',fs);
-axis equal;
-view(2);

+ 0 - 51
examples/ambient-occlusion-mex/mexFunction.cpp

@@ -1,51 +0,0 @@
-#include "parse_rhs.h"
-
-#include <igl/matlab/MexStream.h>
-#include <igl/embree/ambient_occlusion.h>
-
-#include <igl/read_triangle_mesh.h>
-#include <igl/per_vertex_normals.h>
-
-#include <mex.h>
-
-#include <iostream>
-#include <string>
-
-void mexFunction(int nlhs, mxArray *plhs[],
-    int nrhs, const mxArray *prhs[])
-{
-  // This is useful for debugging whether Matlab is caching the mex binary
-  //mexPrintf("%s %s\n",__TIME__,__DATE__);
-  igl::MexStream mout;
-  std::streambuf *outbuf = std::cout.rdbuf(&mout);
-
-  using namespace std;
-  using namespace Eigen;
-  using namespace igl;
-
-  MatrixXd V,P,N;
-  VectorXd S;
-  MatrixXi F;
-  int num_samples;
-  parse_rhs(nrhs,prhs,V,F,P,N,num_samples);
-  // Prepare left-hand side
-  nlhs = 1;
-
-  //read_triangle_mesh("../shared/cheburashka.off",V,F);
-  //P = V;
-  //per_vertex_normals(V,F,N);
-  ambient_occlusion(V,F,P,N,num_samples,S);
-  //MatlabWorkspace mw;
-  //mw.save(V,"V");
-  //mw.save(P,"P");
-  //mw.save(N,"N");
-  //mw.save_index(F,"F");
-  //mw.save(S,"S");
-  //mw.write("out.mat");
-
-  plhs[0] = mxCreateDoubleMatrix(S.rows(),S.cols(), mxREAL);
-  copy(S.data(),S.data()+S.size(),mxGetPr(plhs[0]));
-
-  // Restore the std stream buffer Important!
-  std::cout.rdbuf(outbuf);
-}

+ 0 - 59
examples/ambient-occlusion-mex/parse_rhs.cpp

@@ -1,59 +0,0 @@
-#ifdef MEX
-#include "parse_rhs.h"
-#include <algorithm>
-#include <functional>
-
-void parse_rhs(
-  const int nrhs, 
-  const mxArray *prhs[], 
-  Eigen::MatrixXd & V,
-  Eigen::MatrixXi & F,
-  Eigen::MatrixXd & P,
-  Eigen::MatrixXd & N,
-  int & num_samples)
-{
-  using namespace std;
-  if(nrhs < 5)
-  {
-    mexErrMsgTxt("nrhs < 5");
-  }
-
-  const int dim = mxGetN(prhs[0]);
-  if(dim != 3)
-  {
-    mexErrMsgTxt("Mesh vertex list must be #V by 3 list of vertex positions");
-  }
-  if(dim != (int)mxGetN(prhs[1]))
-  {
-   mexErrMsgTxt("Mesh facet size must be 3");
-  }
-  if(mxGetN(prhs[2]) != dim)
-  {
-    mexErrMsgTxt("Point list must be #P by 3 list of origin locations");
-  }
-  if(mxGetN(prhs[3]) != dim)
-  {
-    mexErrMsgTxt("Normal list must be #P by 3 list of origin normals");
-  }
-  if(mxGetN(prhs[4]) != 1 || mxGetM(prhs[4]) != 1)
-  {
-    mexErrMsgTxt("Number of samples must be scalar.");
-  }
-
-
-  V.resize(mxGetM(prhs[0]),mxGetN(prhs[0]));
-  copy(mxGetPr(prhs[0]),mxGetPr(prhs[0])+V.size(),V.data());
-  F.resize(mxGetM(prhs[1]),mxGetN(prhs[1]));
-  copy(mxGetPr(prhs[1]),mxGetPr(prhs[1])+F.size(),F.data());
-  F.array() -= 1;
-  P.resize(mxGetM(prhs[2]),mxGetN(prhs[2]));
-  copy(mxGetPr(prhs[2]),mxGetPr(prhs[2])+P.size(),P.data());
-  N.resize(mxGetM(prhs[3]),mxGetN(prhs[3]));
-  copy(mxGetPr(prhs[3]),mxGetPr(prhs[3])+N.size(),N.data());
-  if(*mxGetPr(prhs[4]) != (int)*mxGetPr(prhs[4]))
-  {
-    mexErrMsgTxt("Number of samples should be non negative integer.");
-  }
-  num_samples = (int) *mxGetPr(prhs[4]);
-}
-#endif

+ 0 - 27
examples/ambient-occlusion-mex/parse_rhs.h

@@ -1,27 +0,0 @@
-#ifndef PARSE_RHS_H
-#define PARSE_RHS_H
-
-#include <mex.h>
-#include <Eigen/Core>
-// Parse right hand side arguments for a matlab mex function.
-//
-// Inputs:
-//   nrhs  number of right hand side arguments
-//   prhs  pointer to right hand side arguments
-// Outputs:
-//   V  n by dim list of mesh vertex positions
-//   F  m by dim list of mesh face indices
-//   P  #P by 3 list of origin points
-//   N  #P by 3 list of origin normals
-//   num_samples  number of samples
-// Throws matlab errors if dimensions are not sane.
-void parse_rhs(
-  const int nrhs, 
-  const mxArray *prhs[], 
-  Eigen::MatrixXd & V,
-  Eigen::MatrixXi & F,
-  Eigen::MatrixXd & P,
-  Eigen::MatrixXd & N,
-  int & num_samples);
-
-#endif 

+ 2 - 13
examples/ambient-occlusion/Makefile

@@ -1,28 +1,17 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB+=-liglembree
 
 all: example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-#EMBREE=$(LIBIGL)/external/embree
-#EMBREE_INC=-I$(EMBREE)/rtcore -I$(EMBREE)/common
-#EMBREE_LIB=-L$(EMBREE)/build -lrtcore -lsys
 EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
+EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/include
 EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
 
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(EMBREE_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(EMBREE_LIB)
 

+ 1 - 35
examples/arap/Makefile

@@ -1,47 +1,13 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB+=-liglsvd3x3
 
 all: example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglpng -liglsvd3x3
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-#CFLAGS+=-DIGL_HEADER_ONLY
-
-
-#EMBREE=$(LIBIGL)/external/embree
-#EMBREE_INC=-I$(EMBREE)/rtcore -I$(EMBREE)/common
-#EMBREE_LIB=-L$(EMBREE)/build -lrtcore -lsys
-EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
-EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
-
-# YIMAGE Library
-YIMG=$(LIBIGL)/external/yimg/
-YIMG_LIB=-L$(YIMG) -lyimg -lz -L/opt/local/lib -lpng
-YIMG_INC=-I/usr/X11/include -I$(YIMG)
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar
-UNAME := $(shell uname)
-# Apple needs to load the AppKit framework for anttweakbar and maybe bind at
-# load for png
-ifeq ($(UNAME), Darwin)
-	YIMG_LIB+=-bind_at_load
-	ANTTWEAKBAR_LIB+=-framework AppKit
-endif
-
-# SVD 
-SINGULAR_VALUE_DECOMPOSITION_INC=\
-	-I$(LIBIGL)/external/Singular_Value_Decomposition/
-
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(YIMG_INC) $(SINGULAR_VALUE_DECOMPOSITION_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(YIMG_LIB) 
 

+ 0 - 1
examples/arap/example.cpp

@@ -34,7 +34,6 @@
 #include <igl/get_seconds.h>
 #include <igl/PI.h>
 #include <igl/STR.h>
-#include <YImage.hpp>
 
 #ifdef __APPLE__
 #  include <GLUT/glut.h>

+ 0 - 24
examples/basic_topology/Makefile

@@ -1,24 +0,0 @@
-
-all: example1
-
-# Shared flags etc.
-include ../../build/Makefile.conf
-
-igl_lib=../../
-eigen_lib=$(DEFAULT_PREFIX)/include/eigen3/
-
-CFLAGS+=-g
-inc=-I$(igl_lib)/include -I$(eigen_lib)
-lib=-L$(igl_lib)/lib -ligl
-
-example1: example1.o
-	g++ $(CFLAGS) -o example1 example1.o $(lib)
-
-example1.o: example1.cpp
-	g++ $(CFLAGS) -c example1.cpp -o example1.o $(inc)
-
-
-clean:
-	rm -f example1.o
-	rm -f example1
-	rm -f bunny_out.off

+ 0 - 7
examples/basic_topology/README

@@ -1,7 +0,0 @@
-igl_lib is a lightweight C++ for mesh processing
-
-Example1.cpp: 
-- Load/save a mesh
-- Compute face and edge topology
-- Compute the cotan matrix of the loaded mesh
-

+ 0 - 53
examples/basic_topology/example1.cpp

@@ -1,53 +0,0 @@
-//
-//  IGL Lib - Simple C++ mesh library
-//
-//  Copyright 2011, Daniele Panozzo. All rights reserved.
-
-// IMPORTANT DO NOT REMOVE OR MOVE
-#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
-
-#include <iostream>
-#include <string>
-#include <igl/read_triangle_mesh.h>
-#include <igl/write_triangle_mesh.h>
-#include <igl/triangle_triangle_adjacency.h>
-#include <igl/edge_topology.h>
-
-using namespace std;
-
-int main (int argc, const char * argv[])
-{
-    Eigen::MatrixXd V;
-    Eigen::MatrixXi F;
-    igl::read_triangle_mesh("../shared/TinyTorus.obj",V,F);
-
-    std::cout << "Mesh loaded!\n";
-    cout << "Vertex Array:" << endl;
-    cout << V << endl;
-    cout << "-------------" << endl;
-    cout << "Face Array:" << endl;
-    cout << F << endl;
-    cout << "-------------" << endl;
-
-    igl::write_triangle_mesh("bunny_out.off",V,F);
-
-    // Face Topology
-    cout << "TT Topology:" << endl;
-    Eigen::MatrixXi TT;
-    igl::triangle_triangle_adjacency(V,F,TT);
-    cout << TT << endl;
-    cout << "-------------" << endl;
-
-    // Edge Topology
-    cout << "Edge Topology:" << endl;
-    Eigen::MatrixXi EV;
-    Eigen::MatrixXi FE;
-    Eigen::MatrixXi EF;
-
-    igl::edge_topology(V,F,EV,FE, EF);
-    cout << EV << endl << FE << endl << EF << endl;
-    cout << "-------------" << endl;
-
-
-    return 0;
-}

+ 1 - 13
examples/bbw/Makefile

@@ -2,9 +2,7 @@ include ../../build/Makefile.conf
 
 CXX=g++
 
-LIBIGL=../../
-LIBIGL_INC=-I${LIBIGL}/include
-LIBIGL_LIB=-L${LIBIGL}/lib -ligl -liglmosek -liglbbw
+LIBIGL_LIB+=-liglmosek -liglbbw -ligltetgen
 
 ifdef IGL_NO_MOSEK
 CFLAGS+=-DIGL_NO_MOSEK
@@ -16,22 +14,12 @@ endif
 ifndef MOSEKVERSION
   MOSEKVERSION=6
 endif
-IGLMOSEK=../mosek/
-IGLMOSEK_INC=-I$(IGLMOSEK)/
-INC+=${IGLMOSEK_INC}
 MOSEK=/usr/local/mosek
 MOSEK_INC=-I$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/h
 MOSEK_LIB=-L$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/bin -lmosek64
 INC+=$(MOSEK_INC)
 endif
 
-EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
-
-# By default I'm using the libigl version. Adjust accordingly
-TETGEN=$(LIBIGL)/external/tetgen
-TETGEN_LIB=-L$(TETGEN) -ligltetgen -ltet 
-TETGEN_INC=-I$(TETGEN)
-
 INC=-I. ${EIGEN3_INC} ${LIBIGL_INC} ${TETGEN_INC} ${MOSEK_INC} 
 LIB=${TETGEN_LIB} ${MOSEK_LIB} ${OPENGL_LIB} ${GLUT_LIB} ${LIBIGL_LIB} 
 

+ 0 - 17
examples/beach-balls/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -10,22 +9,6 @@ all: obj example
 
 CFLAGS+=-g -std=c++11
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-# Use free glut for mouse scrolling
-GLUT_LIB=-framework GLUT
-GLUT_INC=-framework GLUT
-
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 

+ 2 - 26
examples/camera/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,31 +7,8 @@ all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-CARBON_LIB=-framework Carbon
-
-## Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-#GLUT_LIB=$(FREE_GLUT_LIB)
-#GLUT_INC=$(FREE_GLUT_INC)
-GLUT_LIB=-framework GLUT
-GLUT_INC=
-
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(CARBON_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 0 - 25
examples/cat/Makefile

@@ -1,25 +0,0 @@
-
-.PHONY: all
-
-# Shared flags etc.
-include ../../build/Makefile.conf
-
-all: example
-
-.PHONY: example
-
-igl_lib=../../
-eigen=$(DEFAULT_PREFIX)/include/eigen3/
-
-CFLAGS+=-g
-inc=-I$(igl_lib)/include -I$(eigen)
-lib=-L$(igl_lib)/lib -ligl
-
-example: example.o
-	g++ $(CFLAGS) -o example example.o $(lib)
-
-example.o: example.cpp
-	g++ $(CFLAGS) -c example.cpp -o example.o $(inc)
-clean:
-	rm -f example.o
-	rm -f example

+ 0 - 9
examples/cat/README

@@ -1,9 +0,0 @@
-This is a simple example program that shows how to use the cat function on
-eigen matrices like matlab's C = cat(dim,A,B) function
-
-
-To Build:
-  make
-
-To Run:
-  ./example

+ 0 - 36
examples/cat/example.cpp

@@ -1,36 +0,0 @@
-// g++ -o main main.cpp -I. -I/usr/local/include/eigen3
-#include <Eigen/Core>
-#include <iostream>
-#include <igl/cat.h>
-
-using namespace std;
-using namespace igl;
-using namespace Eigen;
-
-
-template <class T>
-void matlab_print(const string name, const T & X)
-{
-  cout<<name<<"=["<<endl<<X<<endl<<"];"<<endl;
-}
-
-int main(int argc, char * argv[])
-{
-  Eigen::MatrixXd A(3,4);
-  A << 
-    3,5,4,5,
-    1,2,4,2,
-    1,1,2,5;
-  matlab_print("A",A);
-  Eigen::MatrixXd B(3,4);
-  B << 
-    13,15,14,15,
-    11,12,14,12,
-    11,11,12,15;
-  matlab_print("B",B);
-  Eigen::MatrixXd C;
-  C = cat(1,A,B);
-  matlab_print("cat(1,A,B)",C);
-  C = cat(2,A,B);
-  matlab_print("cat(2,A,B)",C);
-}

+ 0 - 16
examples/colored-mesh/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,21 +7,6 @@ all: example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-#EMBREE=$(LIBIGL)/external/embree
-#EMBREE_INC=-I$(EMBREE)/rtcore -I$(EMBREE)/common
-#EMBREE_LIB=-L$(EMBREE)/build -lrtcore -lsys
-EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
-EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(EMBREE_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(EMBREE_LIB)
 

+ 2 - 6
examples/dmat/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,12 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=$(DEFAULT_PREFIX)/include/eigen3
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include -I$(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 4 - 8
examples/eigen-gotchas/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,18 +7,15 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include $(eigen)
-lib=-L$(igl_lib)/lib -ligl
+INC=$(LIBIGL_INC) $(EIGEN3_INC)
+LIB=$(LIBIGL_LIB)
 
 example: example.o
-	g++ $(CFLAGS) -o example example.o $(lib)
+	g++ $(CFLAGS) -o example example.o $(LIB)
 
 example.o: example.cpp
-	g++ $(CFLAGS) -c example.cpp -o example.o $(inc)
+	g++ $(CFLAGS) -c example.cpp -o example.o $(INC)
 clean:
 	rm -f example.o
 	rm -f example

+ 0 - 1
examples/eigen-gotchas/example.cpp

@@ -4,7 +4,6 @@
 #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
 #define EIGEN_IM_MAD_AS_HELL_AND_IM_NOT_GOING_TO_TAKE_IT_ANYMORE
 #include <Eigen/Sparse>
-#include <Eigen/SparseExtra>
 using namespace Eigen;
 
 #include <cstdio>

+ 0 - 15
examples/embree/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,20 +7,6 @@ all: example
 
 .PHONY: example
 
-LIBIGL=../../
-#LIBIGL_INC=-I$(LIBIGL)/include -DIGL_HEADER_ONLY
-#LIBIGL_LIB=
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
-EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(EMBREE_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(EMBREE_LIB)
 

+ 4 - 7
examples/example_fun/Makefile

@@ -5,26 +5,23 @@ all: example_static example_header_only
 # Shared flags etc.
 include ../../build/Makefile.conf
 
-igl_lib=../../
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include
+INC=$(LIBIGL_INC)
 
-STATIC_LIB=-ligl -L../../lib
-HEADER_ONLY_DEF=-DIGL_HEADER_ONLY
+STATIC_LIB=-ligl -L../../lib -DIGL_STATIC_LIBRARY
 
 example_static: example_static.o
 	#g++ $(CFLAGS) -o example_static example_static.o $(lib) $(STATIC_LIB) ../../obj/example_fun.o
 	g++ $(CFLAGS) -o example_static example_static.o ../../obj/example_fun.o
 
 example_static.o: example.cpp
-	g++ $(CFLAGS) -c example.cpp -o example_static.o $(inc)
+	g++ $(CFLAGS) -c example.cpp -o example_static.o $(INC)
 
 example_header_only: example_header_only.o
 	g++ $(CFLAGS) -o example_header_only example_header_only.o $(lib)
 
 example_header_only.o: example.cpp
-	g++ $(CFLAGS) -c example.cpp -o example_header_only.o $(inc) $(HEADER_ONLY_DEF)
+	g++ $(CFLAGS) -c example.cpp -o example_header_only.o $(INC)
 
 clean:
 	rm -f example_static.o

+ 2 - 5
examples/file_contents_as_string/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,11 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 0 - 24
examples/flare-eyes/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,29 +7,6 @@ all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglmatlab -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-CARBON_LIB=-framework Carbon
-
-## Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-#GLUT_LIB=$(FREE_GLUT_LIB)
-#GLUT_INC=$(FREE_GLUT_INC)
-GLUT_LIB=-framework GLUT
-GLUT_INC=
-
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(CARBON_LIB)
 

+ 0 - 9
examples/flare-eyes/example.cpp

@@ -31,7 +31,6 @@
 
 #ifdef __APPLE__
 #include <GLUT/glut.h>
-#include <Carbon/Carbon.h>
 #else
 #include <GL/glut.h>
 #endif
@@ -525,14 +524,6 @@ void init_relative()
 }
 
 
-KeyMap keyStates ;
-bool IS_KEYDOWN( uint16_t vKey )
-{
-  uint8_t index = vKey / 32 ;
-  uint8_t shift = vKey % 32 ;
-  return keyStates[index].bigEndianValue & (1 << shift) ;
-}
-
 void undo()
 {
   using namespace std;

+ 2 - 5
examples/get_seconds/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,11 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-
 CFLAGS+=-g -Wall
-inc=-I$(igl_lib)/include
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 3
examples/glslversion/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -11,8 +10,8 @@ all: example
 igl_lib=../../
 
 CFLAGS+=-g
-inc=-I$(igl_lib)/include
-lib=$(OPENGL_LIB) $(GLUT_LIB) -L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC)
+lib=$(OPENGL_LIB) $(GLUT_LIB) $(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 5 - 5
examples/glut_speed_test/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 all: example
@@ -11,14 +10,15 @@ include ../../build/Makefile.conf
 igl_lib=../../
 
 CFLAGS+=-g -Wall 
-inc=-I$(igl_lib)/include
-lib=$(OPENGL_LIB) $(GLUT_LIB) -L$(igl_lib)/lib -ligl
+INC=$(LIBIGL_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(LIBIGL_LIB)
 
 example: example.o
-	g++ $(CFLAGS) -o example example.o $(lib)
+	g++ $(CFLAGS) -o example example.o $(LIB)
 
 example.o: example.cpp
-	g++ $(CFLAGS) $(deps) -c example.cpp -o example.o $(inc)
+	g++ $(CFLAGS) $(deps) -c example.cpp -o example.o $(INC)
+
 clean:
 	rm -f example.o
 	rm -f example

+ 4 - 8
examples/harwell_boeing/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,18 +7,15 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include $(eigen)
-lib=-L$(igl_lib)/lib -ligl
+INC=$(LIBIGL_INC) $(EIGEN3_INC)
+LIB=$(LIBIGL_LIB)
 
 example: example.o
-	g++ $(CFLAGS) -o example example.o $(lib)
+	g++ $(CFLAGS) -o example example.o $(LIB)
 
 example.o: example.cpp
-	g++ $(CFLAGS) -c example.cpp -o example.o $(inc)
+	g++ $(CFLAGS) -c example.cpp -o example.o $(INC)
 clean:
 	rm -f example.o
 	rm -f example

+ 1 - 16
examples/intersections/Makefile

@@ -1,34 +1,19 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB=+liglcgal
 
 all: example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree -liglcgal
-
 CGAL=/opt/local/
 CGAL_LIB=-L$(CGAL)/lib -lCGAL -lCGAL_Core -lgmp -lmpfr -lboost_thread-mt -lboost_system-mt
 CGAL_INC=-I$(CGAL)/include -I/usr/include/
 # This is absolutely necessary for Exact Construction
 CGAL_FLAGS=-frounding-math -fsignaling-nans 
 
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-#EMBREE=$(LIBIGL)/external/embree
-#EMBREE_INC=-I$(EMBREE)/rtcore -I$(EMBREE)/common
-#EMBREE_LIB=-L$(EMBREE)/build -lrtcore -lsys
-EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
-EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(EMBREE_INC) $(CGAL_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(EMBREE_LIB) $(CGAL_LIB)
 CFLAGS+=$(CGAL_FLAGS)

+ 2 - 5
examples/is_dir/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,11 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 6
examples/marching_cubes/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 all: example
@@ -8,12 +7,9 @@ all: example
 # Shared flags etc.
 include ../../build/Makefile.conf
 
-igl_lib=../../
-eigen=-I$(DEFAULT_PREFIX)/include/eigen3
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include $(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 6
examples/meshio/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,12 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=-I$(DEFAULT_PREFIX)/include/eigen3
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include $(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 6
examples/mode/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,12 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=$(DEFAULT_PREFIX)/include/eigen3/
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include -I$(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 1 - 8
examples/multi-viewport/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -7,16 +6,10 @@ all: example
 
 .PHONY:  example
 
-LIBIGL=/usr/local/igl/libigl/
-include $(LIBIGL)/build/Makefile.conf
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree
+include ../..//build/Makefile.conf
 
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
 CFLAGS+=-std=c++11 -g -Wno-deprecated-declarations
 
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 

+ 3 - 23
examples/patches/Makefile

@@ -1,8 +1,8 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB+=-liglembree -liglboost
 
 all: obj example
 
@@ -10,28 +10,8 @@ all: obj example
 
 CFLAGS+=-g -std=c++11
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglmatlab -liglembree -liglboost
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
-EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-# Use free glut for mouse scrolling
-GLUT_LIB=-framework GLUT
-GLUT_INC=-framework GLUT
-
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC) $(EMBREE_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(EMBREE_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC) $(EMBREE_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(EMBREE_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 2 - 5
examples/path_tests/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,11 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-
 CFLAGS+=-g -Wall
-inc=-I$(igl_lib)/include
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 5
examples/pathinfo/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 all: example
@@ -8,11 +7,9 @@ include ../../build/Makefile.conf
 
 .PHONY: example
 
-igl_lib=../../
-
 CFLAGS+=-g -Wall 
-inc=-I$(igl_lib)/include
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib) 

+ 2 - 6
examples/quicklook-mesh/Makefile

@@ -10,13 +10,9 @@ C=clang
 #C=clang-mp-3.4
 CXXFLAGS += -stdlib=libc++ -std=c++11
 
-EIGEN=/opt/local/include/eigen3/
-EIGEN3_INC=-I$(EIGEN) -I$(EIGEN)/unsupported
-
+#Be sure that libs aren't used
 LIBIGL=../../
-#LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
-LIBIGL_LIB=
-LIBIGL_INC=-DIGL_HEADER_ONLY -I $(LIBIGL)/include
+LIBIGL_INC=-I$(LIBIGL)/include
 
 # Do not use the GLU that comes with the macports Mesa:
 # http://www.alecjacobson.com/weblog/?p=2827

+ 1 - 1
examples/quicklook-mesh/README

@@ -32,7 +32,7 @@ After installing you can test previews with:
 
 and thumbnails with:
 
-    /usr/bin/qlmanage -t ../shared/cheburashka.obj
+    /usr/bin/qlmanage -t ../shared/cheburashka.off
 
 = Note about Mesa =
 

+ 2 - 24
examples/randomly-sample-mesh/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,29 +7,8 @@ all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglmatlab -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-CARBON_LIB=-framework Carbon
-
-# Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-GLUT_LIB=-framework GLUT
-GLUT_INC=
-
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(CARBON_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 3 - 10
examples/render_to_png/Makefile

@@ -1,17 +1,10 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB+=-liglpng
 
 # YIMG dependency
-YIMG=../../external/yimg
-YIMG_LIB=-L$(YIMG) -lyimg -lz -L/usr/X11/lib -lpng -bind_at_load
-YIMG_INC=-I/usr/X11/include -I$(YIMG) 
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-# LIBPNG dependency
 
 all: example
 
@@ -19,8 +12,8 @@ all: example
 
 IGL=../../
 
-inc=-DIGL_HEADER_ONLY -I$(IGL)/include -I$(DEFAULT_PREFIX)/include $(YIMG_INC) $(EIGEN3_INC)
-lib=-L$(IGL)/lib -ligl -liglpng -L$(DEFAULT_PREFIX)/lib $(OPENGL_LIB) $(GLUT_LIB) $(YIMG_LIB) $(LIBPNG_LIB)
+inc=$(LIBIGL_INC) $(YIMG_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB) $(OPENGL_LIB) $(GLUT_LIB) $(YIMG_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 23
examples/rotate-widget/Makefile

@@ -8,29 +8,8 @@ all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglmatlab -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-CARBON_LIB=-framework Carbon
-
-# Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-GLUT_LIB=-framework GLUT
-GLUT_INC=
-
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(CARBON_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 2 - 23
examples/scene-rotation/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,29 +7,9 @@ all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include -DIGL_HEADER_ONLY
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglmatlab -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-CARBON_LIB=-framework Carbon
-
-# Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-GLUT_LIB=-framework GLUT
-GLUT_INC=
 
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(CARBON_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC)  $(GLUT_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 2 - 26
examples/shadow-mapping/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,31 +7,8 @@ all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-CARBON_LIB=-framework Carbon
-
-## Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-#GLUT_LIB=$(FREE_GLUT_LIB)
-#GLUT_INC=$(FREE_GLUT_INC)
-GLUT_LIB=-framework GLUT
-GLUT_INC=
-
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(CARBON_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 3 - 46
examples/skeleton-builder/Makefile

@@ -1,58 +1,15 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB+=-liglembree
 
 all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-TETGEN=$(LIBIGL)/external/tetgen
-TETGEN_LIB=-L$(TETGEN) -ltet 
-TETGEN_INC=-I$(TETGEN)
-
-EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
-EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
-
-CARBON_LIB=-framework Carbon
-
-# Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-GLUT_LIB=-framework GLUT
-GLUT_INC=
-
-ifdef IGL_NO_MOSEK
-CFLAGS+=-DIGL_NO_MOSEK
-else
-# Adjust your mosek paths etc. accordingly
-ifndef MOSEKPLATFORM
-  MOSEKPLATFORM=osx64x86
-endif
-ifndef MOSEKVERSION
-  MOSEKVERSION=6
-endif
-IGLMOSEK=
-IGLMOSEK_INC=
-MOSEK=/usr/local/mosek
-MOSEK_INC=
-MOSEK_LIB=
-endif
-
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC) ${TETGEN_INC} $(MOSEK_INC) $(EMBREE_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(CARBON_LIB) $(TETGEN_LIB) $(MOSEK_LIB) $(EMBREE_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC) ${TETGEN_INC} $(MOSEK_INC) $(EMBREE_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(TETGEN_LIB) $(MOSEK_LIB) $(EMBREE_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 4 - 31
examples/skeleton-posing/Makefile

@@ -1,39 +1,13 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB+=-liglbbw -liglcgal
 
 all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree -liglcgal -ligltetgen -liglbbw -liglmosek
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-TETGEN=$(LIBIGL)/external/tetgen
-TETGEN_LIB=-L$(TETGEN) -ltet 
-TETGEN_INC=-I$(TETGEN)
-
-EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
-EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
-
-CARBON_LIB=-framework Carbon
-
-# Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-GLUT_LIB=-framework GLUT
-GLUT_INC=
-
 ifdef IGL_NO_MOSEK
 CFLAGS+=-DIGL_NO_MOSEK
 else
@@ -44,11 +18,10 @@ endif
 ifndef MOSEKVERSION
   MOSEKVERSION=7
 endif
-IGLMOSEK=../mosek/
-IGLMOSEK_INC=-I$(IGLMOSEK)/
 MOSEK=/usr/local/mosek
 MOSEK_INC=-I$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/h
 MOSEK_LIB=-L$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/bin -lmosek64
+LIBIGL_LIB+=-liglmosek 
 endif
 
 CGAL=/opt/local/
@@ -58,8 +31,8 @@ CGAL_INC=-I$(CGAL)/include -I/usr/include/
 CGAL_FLAGS=-frounding-math -fsignaling-nans 
 CFLAGS+=$(CGAL_FLAGS)
 
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC) ${CGAL_INC} ${TETGEN_INC} $(MOSEK_INC) $(EMBREE_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) ${CGAL_LIB} $(CARBON_LIB) $(TETGEN_LIB) $(MOSEK_LIB) $(EMBREE_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC) ${CGAL_INC} ${TETGEN_INC} $(MOSEK_INC) $(EMBREE_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) ${CGAL_LIB} $(TETGEN_LIB) $(MOSEK_LIB) $(EMBREE_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 3 - 25
examples/skeleton/Makefile

@@ -1,35 +1,13 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB+=-liglbbw -liglmosek
 
 all: obj example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -ligltetgen -liglbbw -liglmosek
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-TETGEN=$(LIBIGL)/external/tetgen
-TETGEN_LIB=-L$(TETGEN) -ltet 
-TETGEN_INC=-I$(TETGEN)
-
-CARBON_LIB=-framework Carbon
-
-# Use free glut for mouse scrolling
-#FREE_GLUT=/opt/local/
-#FREE_GLUT_INC=-I$(FREE_GLUT)/include
-#FREE_GLUT_LIB=-L$(FREE_GLUT)/lib -lglut
-GLUT_LIB=-framework GLUT
-GLUT_INC=
-
 ifdef IGL_NO_MOSEK
 CFLAGS+=-DIGL_NO_MOSEK
 else
@@ -47,8 +25,8 @@ MOSEK_INC=-I$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/h
 MOSEK_LIB=-L$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/bin -lmosek64
 endif
 
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC) $(GLUT_INC) ${TETGEN_INC} $(MOSEK_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB) $(CARBON_LIB) $(TETGEN_LIB) $(MOSEK_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC) ${TETGEN_INC} $(MOSEK_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(TETGEN_LIB) $(MOSEK_LIB)
 
 CPP_FILES=$(wildcard ./*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o))) 

+ 0 - 1
examples/skeleton/example.cpp

@@ -36,7 +36,6 @@
 
 #ifdef __APPLE__
 #include <GLUT/glut.h>
-#include <Carbon/Carbon.h>
 #else
 #include <GL/glut.h>
 #endif

+ 2 - 6
examples/slice/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,13 +7,10 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
-
 #CFLAGS+=-g
 CFLAGS+=-Os -DNDEBUG
-inc=-I$(igl_lib)/include $(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 5
examples/sort/Makefile

@@ -8,12 +8,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=$(DEFAULT_PREFIX)/include/eigen3/
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include -I$(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 6
examples/sortrows/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,12 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=$(DEFAULT_PREFIX)/include/eigen3/
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include -I$(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 3
examples/stdin_to_temp/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -11,8 +10,8 @@ all: example
 igl_lib=../../
 
 CFLAGS+=-g
-inc=-I$(igl_lib)/include
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 3
examples/svd/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -11,8 +10,8 @@ all: example
 igl_lib=../../
 
 CFLAGS+=-g
-inc=-I$(igl_lib)/include
-lib=-L$(igl_lib)/lib -ligl -framework Accelerate
+inc=$(LIBIGL_INC) 
+lib=$(LIBIGL_LIB) -framework Accelerate
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 1 - 21
examples/textured-mesh/Makefile

@@ -1,33 +1,13 @@
-
 .PHONY: all
 
 # Shared flags etc.
 include ../../build/Makefile.conf
+LIBIGL_LIB+=-liglpng
 
 all: example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglpng
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-#EMBREE=$(LIBIGL)/external/embree
-#EMBREE_INC=-I$(EMBREE)/rtcore -I$(EMBREE)/common
-#EMBREE_LIB=-L$(EMBREE)/build -lrtcore -lsys
-EMBREE=$(LIBIGL)/external/embree
-EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
-EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
-
-# YIMAGE Library
-YIMG=$(LIBIGL)/external/yimg/
-YIMG_LIB=-L$(YIMG) -lyimg -lz -L/opt/local/lib -lpng -bind_at_load
-YIMG_INC=-I/usr/X11/include -I$(YIMG) 
-
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(YIMG_INC)
 LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(YIMG_LIB)
 

+ 2 - 4
examples/trackball/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 all: example
@@ -12,9 +11,8 @@ igl_lib=../../
 
 CFLAGS+=-g -Wall 
 #deps=-MMD -MF depends.txt
-EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
-inc=-I$(igl_lib)/include $(EIGEN3_INC)
-lib=$(OPENGL_LIB) $(GLUT_LIB) -L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB) $(OPENGL_LIB) $(GLUT_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 14
examples/transparency/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,21 +7,10 @@ all: example
 
 .PHONY: example
 
-LIBIGL=../../
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglmatlab -liglembree
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
 CFLAGS+=-O3 -fopenmp
 
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
-
-MATLAB_INC=-I$(MATLAB)/extern/include/
-MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat -lmex -lstdc++
-
-INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(MATLAB_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(MATLAB_LIB)
+INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 
 example: example.o
 	g++ $(OPENMP) $(AFLAGS) $(CFLAGS) -o example example.o $(LIB)

+ 2 - 6
examples/transpose_blocks/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -8,12 +7,9 @@ all: example
 
 .PHONY: example
 
-igl_lib=../../
-eigen=$(DEFAULT_PREFIX)/include/eigen3
-
 CFLAGS+=-g
-inc=-I$(igl_lib)/include -I$(eigen)
-lib=-L$(igl_lib)/lib -ligl
+inc=$(LIBIGL_INC) $(EIGEN3_INC)
+lib=$(LIBIGL_LIB)
 
 example: example.o
 	g++ $(CFLAGS) -o example example.o $(lib)

+ 2 - 12
examples/upright/Makefile

@@ -1,4 +1,3 @@
-
 .PHONY: all
 
 # Shared flags etc.
@@ -7,19 +6,10 @@ all: upright
 
 .PHONY: upright
 
-LIBIGL=/usr/local/igl/libigl/
-include $(LIBIGL)/build/Makefile.conf
-LIBIGL_INC=-I$(LIBIGL)/include
-LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
-
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
-
-CARBON_LIB=-framework Carbon
+include ../..//build/Makefile.conf
 
-ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
-ANTTWEAKBAR_LIB=-L$(LIBIGL)/external/AntTweakBar/lib -lAntTweakBar -framework AppKit
 INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC)
-LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(CARBON_LIB)
+LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB)
 
 CFLAGS+=-g
 

+ 2 - 2
google-soc/index.html

@@ -18,7 +18,7 @@
 
 <figure>
 <img src="./libigl-logo-python-matlab.jpg" alt="" />
-</figure>
+<figcaption></figcaption></figure>
 
 <p>Libigl is a C++ library, but its functional interface make it very friendly to
 wrapping individual functions for popular scripting languages like Python or
@@ -39,7 +39,7 @@ variety of functions in the library.</p>
 
 <figure>
 <img src="./collapse-split-flip.jpg" alt="" />
-</figure>
+<figcaption></figcaption></figure>
 
 <p>Libigl avoids complicated mesh data-structures to ensure that its interface is
 clean and easy to port into users&#8217; existing projects. Our mesh format is a

+ 1 - 0
include/igl/HalfEdgeIterator.h

@@ -12,6 +12,7 @@
 #include <Eigen/Core>
 
 #include <vector>
+#include <igl/igl_inline.h>
 
 namespace igl
 {

+ 45 - 47
include/igl/RotateWidget.h

@@ -379,11 +379,8 @@ inline void igl::RotateWidget::draw() const
   using namespace Eigen;
   using namespace std;
   using namespace igl;
-  int l,dt;
-  glGetIntegerv(GL_LIGHTING,&l);
-  glGetIntegerv(GL_DEPTH_TEST,&dt);
-  double lw;
-  glGetDoublev(GL_LINE_WIDTH,&lw);
+  glPushAttrib(GL_ENABLE_BIT | GL_LIGHTING_BIT | GL_DEPTH_BUFFER_BIT | GL_LINE_BIT);
+  glDisable(GL_CLIP_PLANE0);
 
   glDisable(GL_LIGHTING);
   glDisable(GL_DEPTH_TEST);
@@ -470,9 +467,7 @@ inline void igl::RotateWidget::draw() const
   draw_guide();
   glPopMatrix();
 
-  glLineWidth(lw);
-  (l ? glEnable(GL_LIGHTING):glDisable(GL_LIGHTING));
-  (dt ? glEnable(GL_DEPTH_TEST):glDisable(GL_DEPTH_TEST));
+  glPopAttrib();
 };
 
 inline void igl::RotateWidget::draw_guide() const
@@ -480,12 +475,15 @@ inline void igl::RotateWidget::draw_guide() const
   using namespace Eigen;
   using namespace std;
   using namespace igl;
-  int posm,post,cf;
-  glGetIntegerv(GL_CULL_FACE,&cf);
-  glGetIntegerv(GL_POINT_SMOOTH,&posm);
-  glGetIntegerv(GL_POLYGON_STIPPLE,&post);
-  double posi;
-  glGetDoublev(GL_POINT_SIZE,&posi);
+  glPushAttrib(
+    GL_DEPTH_BUFFER_BIT | 
+    GL_ENABLE_BIT | 
+    GL_POLYGON_BIT | 
+    GL_POINT_BIT | 
+    GL_TRANSFORM_BIT |
+    GL_STENCIL_BUFFER_BIT |
+    GL_LIGHTING_BIT);
+
   // http://www.codeproject.com/Articles/23444/A-Simple-OpenGL-Stipple-Polygon-Example-EP_OpenGL_
   const GLubyte halftone[] = {
     0xAA, 0xAA, 0xAA, 0xAA, 0x55, 0x55, 0x55, 0x55,
@@ -510,47 +508,47 @@ inline void igl::RotateWidget::draw_guide() const
   {
     case DOWN_TYPE_NONE:
     case DOWN_TYPE_TRACKBALL:
-      return;
+      goto finish;
     case DOWN_TYPE_OUTLINE:
       glScaled(outer_over_inner,outer_over_inner,outer_over_inner);
       break;
     default:
       break;
   }
-  const Vector3d nudown(udown.normalized()), 
-    nudrag(udrag.normalized());
-  glPushMatrix();
-  glDisable(GL_CULL_FACE);
-  glDisable(GL_POINT_SMOOTH);
-  glPointSize(5.);
-  glBegin(GL_POINTS);
-  glVertex3dv(nudown.data());
-  glVertex3d(0,0,0);
-  glVertex3dv(nudrag.data());
-  glEnd();
-  glBegin(GL_LINE_STRIP);
-  glVertex3dv(nudown.data());
-  glVertex3d(0,0,0);
-  glVertex3dv(nudrag.data());
-  glEnd();
-  glEnable(GL_POLYGON_STIPPLE);
-  glPolygonStipple(halftone);
-  glBegin(GL_TRIANGLE_FAN);
-  glVertex3d(0,0,0);
-  Quaterniond dq = rot * down_rot.conjugate();
-  //dq.setFromTwoVectors(nudown,nudrag);
-  for(double t = 0;t<1;t+=0.1)
   {
-    const Vector3d p = Quaterniond::Identity().slerp(t,dq) * nudown;
-    glVertex3dv(p.data());
+    const Vector3d nudown(udown.normalized()), 
+      nudrag(udrag.normalized());
+    glPushMatrix();
+    glDisable(GL_CULL_FACE);
+    glDisable(GL_POINT_SMOOTH);
+    glPointSize(5.);
+    glBegin(GL_POINTS);
+    glVertex3dv(nudown.data());
+    glVertex3d(0,0,0);
+    glVertex3dv(nudrag.data());
+    glEnd();
+    glBegin(GL_LINE_STRIP);
+    glVertex3dv(nudown.data());
+    glVertex3d(0,0,0);
+    glVertex3dv(nudrag.data());
+    glEnd();
+    glEnable(GL_POLYGON_STIPPLE);
+    glPolygonStipple(halftone);
+    glBegin(GL_TRIANGLE_FAN);
+    glVertex3d(0,0,0);
+    Quaterniond dq = rot * down_rot.conjugate();
+    //dq.setFromTwoVectors(nudown,nudrag);
+    for(double t = 0;t<1;t+=0.1)
+    {
+      const Vector3d p = Quaterniond::Identity().slerp(t,dq) * nudown;
+      glVertex3dv(p.data());
+    }
+    glVertex3dv(nudrag.data());
+    glEnd();
+    glPopMatrix();
   }
-  glVertex3dv(nudrag.data());
-  glEnd();
-  glPopMatrix();
-  glPointSize(posi);
-  (cf?glEnable(GL_CULL_FACE):glDisable(GL_CULL_FACE));
-  (posm?glEnable(GL_POINT_SMOOTH):glDisable(GL_POINT_SMOOTH));
-  (post?glEnable(GL_POLYGON_STIPPLE):glDisable(GL_POLYGON_STIPPLE));
+finish:
+  glPopAttrib();
 }
 
 #endif

+ 1 - 0
include/igl/all_edges.cpp

@@ -49,4 +49,5 @@ template void igl::all_edges<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matri
 template void igl::all_edges<Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, 2, 0, -1, 2> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> >&);
 template void igl::all_edges<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 2, 0, -1, 2> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 2, 0, -1, 2> >&);
 template void igl::all_edges<Eigen::Matrix<int, -1, 3, 0, -1, 3>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
+template void igl::all_edges<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 2, 0, -1, 2> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 2, 0, -1, 2> >&);
 #endif

+ 9 - 9
include/igl/angle_bound_frame_fields.cpp

@@ -383,14 +383,14 @@ localStep()
       typename DerivedV::Scalar diff = thetaMin*M_PI/180 - current_angle + 1e-6;
       rotateAroundBisector(u, v, diff, u1, v1);
 
-      if (computeAngle(u1, v1)<thetaMin*M_PI/180)
-      {
-        std::cerr<<"u = ["<<real(u)<<","<<imag(u)<< "]; v= ["<<real(v)<<","<<imag(v)<<"];"<<std::endl;
-        std::cerr<<"u1 = ["<<real(u1)<<","<<imag(u1)<< "]; v1= ["<<real(v1)<<","<<imag(v1)<<"];"<<std::endl;
-        std::cerr<<"current_angle = "<<current_angle<<std::endl;
-        std::cerr<<"aout = "<<computeAngle(u1, v1)<< "; theta= "<<thetaMin*M_PI/180<<";"<<std::endl;
-      }
-      assert(computeAngle(u1, v1)>=thetaMin*M_PI/180);
+//      if (computeAngle(u1, v1)<thetaMin*M_PI/180)
+//      {
+//        std::cerr<<"u = ["<<real(u)<<","<<imag(u)<< "]; v= ["<<real(v)<<","<<imag(v)<<"];"<<std::endl;
+//        std::cerr<<"u1 = ["<<real(u1)<<","<<imag(u1)<< "]; v1= ["<<real(v1)<<","<<imag(v1)<<"];"<<std::endl;
+//        std::cerr<<"current_angle = "<<current_angle<<std::endl;
+//        std::cerr<<"aout = "<<computeAngle(u1, v1)<< "; theta= "<<thetaMin*M_PI/180<<";"<<std::endl;
+//      }
+//      assert(computeAngle(u1, v1)>=thetaMin*M_PI/180);
 
 
       pvU.row(j) << real(u1),imag(u1);
@@ -699,7 +699,7 @@ solve(const Eigen::VectorXi &isConstrained,
     if (stoppingCriterion)
       break;
     lambda = lambda*lambdaMultFactor;
-    printf(" %d %.5g %d\n",iter, smoothnessValue, oob);
+//    printf(" %d %.5g %d\n",iter, smoothnessValue, oob);
 
   }
 

+ 2 - 0
include/igl/angles.cpp

@@ -6,6 +6,7 @@
 // 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 "angles.h"
+#include <Eigen/Geometry>
 #include <cassert>
 
 template <
@@ -46,4 +47,5 @@ void igl::angles(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
+template void igl::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> >&);
 #endif

+ 1 - 0
include/igl/avg_edge_length.cpp

@@ -33,5 +33,6 @@ IGL_INLINE double igl::avg_edge_length(
 // Explicit template specialization
 // generated by autoexplicit.sh
 template double igl::avg_edge_length<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&);
+template double igl::avg_edge_length<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&);
 // generated by autoexplicit.sh
 #endif

+ 5 - 4
include/igl/barycenter.cpp

@@ -1,9 +1,9 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
-// 
-// 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 
+//
+// 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 "barycenter.h"
 
@@ -38,4 +38,5 @@ template void igl::barycenter<Eigen::Matrix<double, -1, 4, 0, -1, 4>, Eigen::Mat
 template void igl::barycenter<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 3, 0, -1, 3> >(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, 3, 0, -1, 3> >&);
 template void igl::barycenter<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::barycenter<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> >&);
+template void igl::barycenter<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> >&);
 #endif

+ 48 - 9
include/igl/boolean/mesh_boolean.cpp

@@ -169,7 +169,7 @@ IGL_INLINE void igl::mesh_boolean(
     return;
   }
   MatrixX3S N,CN;
-  per_face_normals(V,F,N);
+  per_face_normals_stable(V,F,N);
   CN.resize(CF.rows(),3);
   for(size_t f = 0;f<(size_t)CN.rows();f++)
   {
@@ -233,16 +233,55 @@ IGL_INLINE void igl::mesh_boolean(
 #ifdef IGL_MESH_BOOLEAN_DEBUG
   cout<<"clean..."<<endl;
 #endif
-  // remove duplicates: cancel out in all cases? assertion in others?
+  // Deal with duplicate faces
   {
-    MatrixXi oldG = G;
-    VectorXi IA,_1;
-    unique_simplices(oldG,G,IA,_1);
-    assert(IA.rows() == G.rows());
-    J.resize(IA.rows(),1);
-    for(size_t j = 0;j<(size_t)J.size();j++)
+    VectorXi IA,IC;
+    MatrixX3I uG;
+    unique_simplices(G,uG,IA,IC);
+    assert(IA.rows() == uG.rows());
+    // faces ontop of each unique face
+    vector<vector<Index> > uG2G(uG.rows());
+    // signed counts
+    VectorXi counts = VectorXi::Zero(uG.rows());
+    // loop over all faces
+    for(Index g = 0;g<gm;g++)
     {
-      J(j) = GJ(IA(j));
+      const int ug = IC(g);
+      assert(ug < uG2G.size());
+      uG2G[ug].push_back(g);
+      // is uG(g,:) just a rotated version of G(g,:) ?
+      const bool consistent = 
+        (G(g,0) == uG(ug,0) && G(g,1) == uG(ug,1) && G(g,2) == uG(ug,2)) ||
+        (G(g,0) == uG(ug,1) && G(g,1) == uG(ug,2) && G(g,2) == uG(ug,0)) ||
+        (G(g,0) == uG(ug,2) && G(g,1) == uG(ug,0) && G(g,2) == uG(ug,1));
+      counts(ug) += consistent ? 1 : -1;
+    }
+    MatrixX3I oldG = G;
+    // Faces of output vG[i] = j means ith face of output should be jth face in
+    // oldG
+    vG.clear();
+    for(size_t ug = 0;ug < uG2G.size();ug++)
+    {
+      // if signed occurrences is zero or ±two then keep none
+      // else if signed occurrences is ±one then keep just one facet
+      if(abs(counts(ug)) == 1)
+      {
+        assert(uG2G.size() > 0);
+        vG.push_back(uG2G[ug][0]);
+      }
+#ifdef IGL_MESH_BOOLEAN_DEBUG
+      else
+      {
+        cout<<"Skipping "<<uG2G.size()<<" facets..."<<endl;
+      }
+#endif
+    }
+    G.resize(vG.size(),3);
+    J.resize(vG.size());
+    for(size_t g = 0;g<vG.size();g++)
+    {
+      G.row(g) = oldG.row(vG[g]);
+      J(g) = GJ(vG[g]);
     }
   }
   // remove unreferenced vertices

+ 2 - 2
include/igl/boundary_facets.cpp

@@ -6,7 +6,7 @@
 // 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 "boundary_facets.h"
-#include "face_occurences.h"
+#include "face_occurrences.h"
 
 // IGL includes
 #include "sort.h"
@@ -72,7 +72,7 @@ IGL_INLINE void igl::boundary_facets(
 
   // Counts
   vector<int> C;
-  face_occurences(allF,C);
+  face_occurrences(allF,C);
 
   // Q: Why not just count the number of ones?
   // A: because we are including non-manifold edges as boundary edges

+ 13 - 6
include/igl/boundary_loop.cpp

@@ -32,7 +32,7 @@ IGL_INLINE void igl::boundary_loop(
 
   vector<bool> unvisited = is_border_vertex(Vdummy,F);
   set<int> unseen;
-  for (int i = 0; i < unvisited.size(); ++i)
+  for (size_t i = 0; i < unvisited.size(); ++i)
   {
     if (unvisited[i])
       unseen.insert(unseen.end(),i);
@@ -61,7 +61,7 @@ IGL_INLINE void igl::boundary_loop(
 
         if (TT.row(fid).minCoeff() < 0.) // Face contains boundary edge
         {
-          int vLoc;
+          int vLoc = -1;
           if (F(fid,0) == v) vLoc = 0;
           if (F(fid,1) == v) vLoc = 1;
           if (F(fid,2) == v) vLoc = 2;
@@ -105,8 +105,8 @@ IGL_INLINE void igl::boundary_loop(
   boundary_loop(F,Lall);
 
   int idxMax = -1;
-  int maxLen = 0;
-  for (int i = 0; i < Lall.size(); ++i)
+  size_t maxLen = 0;
+  for (size_t i = 0; i < Lall.size(); ++i)
   {
     if (Lall[i].size() > maxLen)
     {
@@ -116,8 +116,10 @@ IGL_INLINE void igl::boundary_loop(
   }
 
   L.resize(Lall[idxMax].size());
-  for (int i = 0; i < Lall[idxMax].size(); ++i)
+  for (size_t i = 0; i < Lall[idxMax].size(); ++i)
+  {
     L[i] = Lall[idxMax][i];
+  }
 }
 
 template <typename DerivedF, typename DerivedL>
@@ -135,6 +137,11 @@ IGL_INLINE void igl::boundary_loop(
   boundary_loop(F,Lvec);
 
   L.resize(Lvec.size());
-  for (int i = 0; i < Lvec.size(); ++i)
+  for (size_t i = 0; i < Lvec.size(); ++i)
     L(i) = Lvec[i];
 }
+
+#ifdef IGL_STATIC_LIBRARY
+// Explicit template specialization
+template void igl::boundary_loop<Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> >&);
+#endif

+ 5 - 4
include/igl/bounding_box.cpp

@@ -1,9 +1,9 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2014 Alec Jacobson <alecjacobson@gmail.com>
-// 
-// 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 
+//
+// 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 "bounding_box.h"
 #include <iostream>
@@ -82,4 +82,5 @@ IGL_INLINE void igl::bounding_box(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
+template void igl::bounding_box<Eigen::Matrix<double, -1, 3, 0, -1, 3>, 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<double, -1, 3, 0, -1, 3> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 3, 0, -1, 3> >&);
 #endif

+ 4 - 4
include/igl/cgal/SelfIntersectMesh.h

@@ -1026,14 +1026,14 @@ inline void igl::SelfIntersectMesh<
   const Index total_shared_vertices = comb_shared_vertices + geo_shared_vertices;
   if(comb_shared_vertices== 3)
   {
-    // Combinatorially duplicate face, these should be removed by preprocessing
-    cerr<<REDRUM("Facets "<<fa<<" and "<<fb<<" are combinatorial duplicates")<<endl;
+    //// Combinatorially duplicate face, these should be removed by preprocessing
+    //cerr<<REDRUM("Facets "<<fa<<" and "<<fb<<" are combinatorial duplicates")<<endl;
     goto done;
   }
   if(total_shared_vertices== 3)
   {
-    // Geometrically duplicate face, these should be removed by preprocessing
-    cerr<<REDRUM("Facets "<<fa<<" and "<<fb<<" are geometrical duplicates")<<endl;
+    //// Geometrically duplicate face, these should be removed by preprocessing
+    //cerr<<REDRUM("Facets "<<fa<<" and "<<fb<<" are geometrical duplicates")<<endl;
     goto done;
   }
   //// SPECIAL CASES ARE BROKEN FOR COPLANAR TRIANGLES

+ 1 - 0
include/igl/cgal/complex_to_mesh.cpp

@@ -148,4 +148,5 @@ IGL_INLINE bool igl::complex_to_mesh(
 
 #ifdef IGL_STATIC_LIBRARY
 template bool igl::complex_to_mesh<CGAL::Delaunay_triangulation_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_data_structure_3<CGAL::Surface_mesh_vertex_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_vertex_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Triangulation_cell_base_with_circumcenter_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Surface_mesh_cell_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_cell_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_cell_base_3<void> > > > >, CGAL::Default>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(CGAL::Complex_2_in_triangulation_3<CGAL::Delaunay_triangulation_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_data_structure_3<CGAL::Surface_mesh_vertex_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_vertex_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Triangulation_cell_base_with_circumcenter_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Surface_mesh_cell_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_cell_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_cell_base_3<void> > > > >, CGAL::Default>, void> const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
+template bool igl::complex_to_mesh<CGAL::Delaunay_triangulation_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_data_structure_3<CGAL::Surface_mesh_vertex_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_vertex_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Surface_mesh_cell_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_cell_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_cell_base_3<void> > > >, CGAL::Sequential_tag>, CGAL::Default, CGAL::Default>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(CGAL::Complex_2_in_triangulation_3<CGAL::Delaunay_triangulation_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_data_structure_3<CGAL::Surface_mesh_vertex_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_vertex_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_vertex_base_3<void> > >, CGAL::Delaunay_triangulation_cell_base_with_circumcenter_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Surface_mesh_cell_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_cell_base_3<CGAL::Robust_circumcenter_traits_3<CGAL::Epick>, CGAL::Triangulation_ds_cell_base_3<void> > > >, CGAL::Sequential_tag>, CGAL::Default, CGAL::Default>, void> const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 #endif

+ 1 - 0
include/igl/cgal/mesh_to_cgal_triangle_list.cpp

@@ -37,4 +37,5 @@ IGL_INLINE void igl::mesh_to_cgal_triangle_list(
 // Explicit template specialization
 template void igl::mesh_to_cgal_triangle_list<CGAL::Epeck>(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, std::vector<CGAL::Triangle_3<CGAL::Epeck>, std::allocator<CGAL::Triangle_3<CGAL::Epeck> > >&);
 template void igl::mesh_to_cgal_triangle_list<CGAL::Epick>(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, std::vector<CGAL::Triangle_3<CGAL::Epick>, std::allocator<CGAL::Triangle_3<CGAL::Epick> > >&);
+template void igl::mesh_to_cgal_triangle_list<CGAL::Simple_cartesian<double> >(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, std::vector<CGAL::Triangle_3<CGAL::Simple_cartesian<double> >, std::allocator<CGAL::Triangle_3<CGAL::Simple_cartesian<double> > > >&);
 #endif

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