Browse Source

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

Former-commit-id: 35cc355e6af66a44678b893a76bcfbd1208a3e0a
Daniele Panozzo 11 years ago
parent
commit
92e422b0c0
100 changed files with 357 additions and 293 deletions
  1. 1 0
      .gitignore
  2. 63 9
      README.md
  3. 27 39
      build/Makefile
  4. 1 0
      build/Makefile.conf
  5. 8 9
      build/Makefile_bbw
  6. 9 8
      build/Makefile_boost
  7. 8 7
      build/Makefile_cgal
  8. 11 10
      build/Makefile_embree
  9. 8 7
      build/Makefile_matlab
  10. 9 8
      build/Makefile_mosek
  11. 9 8
      build/Makefile_png
  12. 10 9
      build/Makefile_svd3x3
  13. 9 8
      build/Makefile_tetgen
  14. 10 9
      build/Makefile_viewer
  15. 12 11
      build/Makefile_xml
  16. 1 1
      examples/MatlabWorkspace/Makefile
  17. 2 2
      examples/MatlabWorkspace/example.cpp
  18. 1 1
      examples/ReAntTweakBar/Makefile
  19. 2 2
      examples/affine/Makefile
  20. 2 2
      examples/ambient-occlusion-mex/mexFunction.cpp
  21. 1 1
      examples/ambient-occlusion/Makefile
  22. 1 1
      examples/ambient-occlusion/example.cpp
  23. 1 1
      examples/arap/Makefile
  24. 2 2
      examples/arap/example.cpp
  25. 2 2
      examples/basic_topology/Makefile
  26. 2 2
      examples/basic_topology/example1.cpp
  27. 1 1
      examples/bbw/Makefile
  28. 2 2
      examples/beach-balls/Makefile
  29. 1 1
      examples/camera/Makefile
  30. 2 2
      examples/cat/Makefile
  31. 1 1
      examples/colored-mesh/Makefile
  32. 1 1
      examples/colored-mesh/example.cpp
  33. 2 2
      examples/dmat/Makefile
  34. 2 2
      examples/eigen-gotchas/Makefile
  35. 1 1
      examples/embree/Makefile
  36. 2 2
      examples/example_fun/Makefile
  37. 1 1
      examples/example_fun/example.cpp
  38. 2 2
      examples/file_contents_as_string/Makefile
  39. 1 1
      examples/flare-eyes/Makefile
  40. 1 1
      examples/flare-eyes/example.cpp
  41. 2 2
      examples/get_seconds/Makefile
  42. 2 2
      examples/glslversion/Makefile
  43. 2 2
      examples/glut_speed_test/Makefile
  44. 2 2
      examples/harwell_boeing/Makefile
  45. 1 1
      examples/intersections/Makefile
  46. 7 6
      examples/intersections/example.cpp
  47. 2 2
      examples/is_dir/Makefile
  48. 2 2
      examples/marching_cubes/Makefile
  49. 2 2
      examples/meshio/Makefile
  50. 2 2
      examples/mode/Makefile
  51. 1 1
      examples/multi-viewport/Makefile
  52. 2 2
      examples/patches/Makefile
  53. 5 3
      examples/patches/example.cpp
  54. 3 3
      examples/patches/temp.rbr
  55. 2 2
      examples/path_tests/Makefile
  56. 2 2
      examples/pathinfo/Makefile
  57. 3 4
      examples/principal_curvature/Makefile
  58. 2 2
      examples/principal_curvature/curvature.cpp
  59. 2 2
      examples/quicklook-mesh/src/render_to_buffer.cpp
  60. 1 1
      examples/randomly-sample-mesh/Makefile
  61. 1 1
      examples/randomly-sample-mesh/example.cpp
  62. 1 1
      examples/render_to_png/Makefile
  63. 1 1
      examples/rotate-widget/Makefile
  64. 1 1
      examples/rotate-widget/example.cpp
  65. 1 1
      examples/scene-rotation/Makefile
  66. 1 1
      examples/scene-rotation/example.cpp
  67. 1 1
      examples/scene-rotation/trackball.h
  68. 1 1
      examples/shadow-mapping/Makefile
  69. 20 14
      examples/shadow-mapping/example.cpp
  70. 1 1
      examples/skeleton/Makefile
  71. 1 1
      examples/skeleton/example.cpp
  72. 3 3
      examples/slice/Makefile
  73. 2 2
      examples/sort/Makefile
  74. 2 2
      examples/sortrows/Makefile
  75. 2 2
      examples/stdin_to_temp/Makefile
  76. 2 2
      examples/svd/Makefile
  77. 2 2
      examples/textured-mesh/Makefile
  78. 2 2
      examples/trackball/Makefile
  79. 1 1
      examples/transparency/Makefile
  80. 2 2
      examples/transpose_blocks/Makefile
  81. 1 1
      examples/upright/Makefile
  82. 2 2
      examples/upright/example.cpp
  83. 1 1
      include/igl/EPS.cpp
  84. 1 1
      include/igl/EPS.h
  85. 1 1
      include/igl/ReAntTweakBar.h
  86. 1 1
      include/igl/WindingNumberTree.h
  87. 2 2
      include/igl/active_set.cpp
  88. 5 2
      include/igl/active_set.h
  89. 1 1
      include/igl/adjacency_list.cpp
  90. 1 1
      include/igl/adjacency_list.h
  91. 1 1
      include/igl/adjacency_matrix.cpp
  92. 1 1
      include/igl/adjacency_matrix.h
  93. 1 1
      include/igl/all_edges.h
  94. 1 1
      include/igl/all_pairs_distances.cpp
  95. 1 1
      include/igl/all_pairs_distances.h
  96. 1 1
      include/igl/angular_distance.h
  97. 1 1
      include/igl/any_of.cpp
  98. 1 1
      include/igl/any_of.h
  99. 5 5
      include/igl/arap_linear_block.cpp
  100. 1 1
      include/igl/arap_linear_block.h

+ 1 - 0
.gitignore

@@ -1,4 +1,5 @@
 # use glob syntax.
 # use glob syntax.
+scripts/change_name.sh
 syntax: glob
 syntax: glob
 *.o
 *.o
 *.a
 *.a

+ 63 - 9
README.md

@@ -35,7 +35,7 @@ listed below.
 - TetGen  libigltetgen extra only
 - TetGen  libigltetgen extra only
 - Embree  libiglembree extra only
 - Embree  libiglembree extra only
 - tinyxml2  libiglxml extra only
 - tinyxml2  libiglxml extra only
- 
+
 ## Header only ##
 ## Header only ##
 libigl is designed to work "out-of-the-box" as a headers only library. To
 libigl is designed to work "out-of-the-box" as a headers only library. To
 include libigl in your project. You need only include the libigl/include/
 include libigl in your project. You need only include the libigl/include/
@@ -72,31 +72,34 @@ Then run this example with:
 libigl is developed most often on Mac OS X, though has current users in Linux and Windows.
 libigl is developed most often on Mac OS X, though has current users in Linux and Windows.
 
 
 ### Linux/Mac OS X/Cygwin ###
 ### Linux/Mac OS X/Cygwin ###
-  
+
 libigl may also be compiled to a static library. This is advantageous when
 libigl may also be compiled to a static library. This is advantageous when
 building a project with libigl, since the header only directive can slow down
 building a project with libigl, since the header only directive can slow down
 compile times.
 compile times.
 
 
 To build the entire libigl library producing lib/libigl.a, issue:
 To build the entire libigl library producing lib/libigl.a, issue:
-  
+
+    cd build
     make lib
     make lib
-  
+
 You may need to edit Makefile.conf accordingly. Best to give yourself an
 You may need to edit Makefile.conf accordingly. Best to give yourself an
 `IGL_USERNAME` and add a custom install suite for yourself. Then you can enable
 `IGL_USERNAME` and add a custom install suite for yourself. Then you can enable
 appropriate extras.
 appropriate extras.
-  
+
 #### Extras ####
 #### Extras ####
 Once you've set up an `IGL_USERNAME` and enabled extras within Makefile.conf.
 Once you've set up an `IGL_USERNAME` and enabled extras within Makefile.conf.
 You can build the extra libraries (into lib/ligiglpng.a, lib/libiglmatlab.a,
 You can build the extra libraries (into lib/ligiglpng.a, lib/libiglmatlab.a,
 lib/libigltetgen.a, lib/libiglmosek.a, etc.) by issuing:
 lib/libigltetgen.a, lib/libiglmosek.a, etc.) by issuing:
-  
+
+    cd build
     make extras
     make extras
-  
+
 #### Examples ####
 #### Examples ####
 You can make a slew of examples by issuing:
 You can make a slew of examples by issuing:
-  
+
+    cd build
     make examples
     make examples
-  
+
 #### External ####
 #### External ####
 Finally there are a number of external libraries that we include in
 Finally there are a number of external libraries that we include in
 ./external/ because they are either difficult to obtain or they have been
 ./external/ because they are either difficult to obtain or they have been
@@ -190,6 +193,57 @@ To get started, we advise that you take a look at a few examples:
 
 
     ./examples/ReAntTweakBar/
     ./examples/ReAntTweakBar/
 
 
+## Extras ##
+Libigl compartmentalizes dependences via its organization into a _main_ libigl
+library and "extras." 
+
+
+### bbw ###
+This library extra contains functions for computing Bounded Biharmonic Weights, can
+be used with and without the [mosek](#mosek) extra via the `IGL_NO_MOSEK`
+macro.
+
+### boost ###
+This library extra utilizes the graph functions in the boost library for find
+connected components and performing breadth-first traversals.
+
+### cgal ###
+This library extra utilizes CGAL's efficient and exact intersection and
+proximity queries.
+
+### embree ###
+This library extra utilizes embree's efficient ray tracing queries.
+
+### matlab ###
+This library extra provides support for reading and writing `.mat` workspace
+files, interfacing with Matlab at run time and compiling mex functions.
+
+### mosek ###
+This library extra utilizes mosek's efficient interior-point solver for
+quadratic programs.
+
+### png ###
+This library extra uses `libpng` and `YImage` to read and write `.png` files.
+
+### svd3x3 ###
+This library extra implements "as-rigid-as-possible" (ARAP) deformation
+techniques using the fast singular value decomposition routines
+written specifically for 3x3 matrices to use `SSE` intrinsics. This extra can
+still be compiled without sse support and support should be determined
+automatically at compile time via the `__SSE__` macro.
+
+### tetgen ###
+This library extra provides a simplified wrapper to the tetgen 3d tetrahedral meshing
+library.
+
+### viewer ###
+This library extra utilizes glfw and glew to open an opengl context and launch
+a simple mesh viewer.
+
+### xml ###
+This library extra utilizes tinyxml2 to read and write serialized classes
+containing Eigen matrices and other standard simple data-structures.
+
 ## Development ##
 ## Development ##
 Further documentation for developers is listed in tutorial.html,
 Further documentation for developers is listed in tutorial.html,
 style_guidelines.html
 style_guidelines.html

+ 27 - 39
Makefile → build/Makefile

@@ -16,76 +16,64 @@ CFLAGS += $(OPTFLAGS)
 #CFLAGS += -DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR
 #CFLAGS += -DIGL_NO_OPENGL -DIGL_NO_ANTTWEAKBAR
 # We use well-supported features of c++11
 # We use well-supported features of c++11
 
 
-EXTRA_DIRS=
+EXTRAS=
 ifeq ($(IGL_WITH_BBW),1)
 ifeq ($(IGL_WITH_BBW),1)
-	EXTRA_DIRS+=include/igl/bbw
 	EXTRAS += bbw
 	EXTRAS += bbw
 endif
 endif
 ifeq ($(IGL_WITH_BOOST),1)
 ifeq ($(IGL_WITH_BOOST),1)
-	EXTRA_DIRS+=include/igl/boost
 	EXTRAS += boost
 	EXTRAS += boost
 endif
 endif
 ifeq ($(IGL_WITH_CGAL),1)
 ifeq ($(IGL_WITH_CGAL),1)
-	EXTRA_DIRS+=include/igl/cgal
 	EXTRAS += cgal
 	EXTRAS += cgal
 endif
 endif
 ifeq ($(IGL_WITH_EMBREE),1)
 ifeq ($(IGL_WITH_EMBREE),1)
-	EXTRA_DIRS+=include/igl/embree
 	EXTRAS += embree
 	EXTRAS += embree
 endif
 endif
 ifeq ($(IGL_WITH_MATLAB),1)
 ifeq ($(IGL_WITH_MATLAB),1)
-	EXTRA_DIRS+=include/igl/matlab
 	EXTRAS += matlab
 	EXTRAS += matlab
 endif
 endif
 ifeq ($(IGL_WITH_MOSEK),1)
 ifeq ($(IGL_WITH_MOSEK),1)
-	EXTRA_DIRS+=include/igl/mosek
 	EXTRAS += mosek
 	EXTRAS += mosek
 endif
 endif
 ifeq ($(IGL_WITH_PNG),1)
 ifeq ($(IGL_WITH_PNG),1)
-	EXTRA_DIRS+=include/igl/png
 	EXTRAS += png
 	EXTRAS += png
 endif
 endif
 ifeq ($(IGL_WITH_SVD3X3),1)
 ifeq ($(IGL_WITH_SVD3X3),1)
-	EXTRA_DIRS+=include/igl/svd3x3
 	EXTRAS += svd3x3
 	EXTRAS += svd3x3
 endif
 endif
 ifeq ($(IGL_WITH_TETGEN),1)
 ifeq ($(IGL_WITH_TETGEN),1)
 	# append tetgen extra dir
 	# append tetgen extra dir
-	EXTRA_DIRS+=include/igl/tetgen
 	EXTRAS += tetgen
 	EXTRAS += tetgen
 endif
 endif
 ifeq ($(IGL_WITH_VIEWER),1)
 ifeq ($(IGL_WITH_VIEWER),1)
-	EXTRA_DIRS+=include/igl/viewer
 	EXTRAS += viewer
 	EXTRAS += viewer
 endif
 endif
 ifeq ($(IGL_WITH_XML),1)
 ifeq ($(IGL_WITH_XML),1)
-	EXTRA_DIRS+=include/igl/xml
 	EXTRAS += xml
 	EXTRAS += xml
 endif
 endif
 
 
 .PHONY: examples
 .PHONY: examples
 .PHONY: extras
 .PHONY: extras
 debug: lib extras
 debug: lib extras
-lib: lib/libigl.a
+lib: ../lib/libigl.a
 examples: lib extras
 examples: lib extras
-	make -C examples
+	make -C ../examples
 extras:
 extras:
-	for p in  $(EXTRA_DIRS); \
+	for p in  $(EXTRAS); \
 	do \
 	do \
-	echo "cd $$p" ; \
-	$(MAKE) -C $$p $(DEBUG); \
+	$(MAKE) -f Makefile_$$p $(DEBUG); \
 	done
 	done
 
 
 
 
 #############################################################################
 #############################################################################
 # SOURCE 
 # SOURCE 
 #############################################################################
 #############################################################################
-CPP_FILES=$(wildcard include/igl/*.cpp)
-H_FILES=$(wildcard include/igl/*.h)
+CPP_FILES=$(wildcard ../include/igl/*.cpp)
+H_FILES=$(wildcard ../include/igl/*.h)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-Iinclude/
+INC+=-I../include/
 
 
 #############################################################################
 #############################################################################
 # DEPENDENCIES
 # DEPENDENCIES
@@ -100,7 +88,7 @@ INC+=$(EIGEN3_INC)
 
 
 # AntTweakBar dependency
 # AntTweakBar dependency
 #ANTTWEAKBAR_INC=-I$(DEFAULT_PREFIX)/include
 #ANTTWEAKBAR_INC=-I$(DEFAULT_PREFIX)/include
-ANTTWEAKBAR_INC=-Iexternal/AntTweakBar/include
+ANTTWEAKBAR_INC=-I../external/AntTweakBar/include
 INC+=$(ANTTWEAKBAR_INC)
 INC+=$(ANTTWEAKBAR_INC)
 
 
 ## OpenGL dependency
 ## OpenGL dependency
@@ -112,34 +100,34 @@ INC+=$(ANTTWEAKBAR_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-lib/libigl.a: obj $(OBJ_FILES)
+../lib/libigl.a: obj $(OBJ_FILES)
 	mkdir -p lib
 	mkdir -p lib
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: include/igl/%.cpp include/igl/%.h
+obj/%.o: ../include/igl/%.cpp ../include/igl/%.h
 	$(GG) $(CFLAGS) $(AFLAGS) -c -o $@ $< $(INC)
 	$(GG) $(CFLAGS) $(AFLAGS) -c -o $@ $< $(INC)
 
 
-lib/igl.framework/:
-	mkdir -p $@
-	cp lib/*.a $@
-	mv $@/libigl.a $@/igl
-	mkdir -p $@/Libraries
-	mv $@/*.a $@/Libraries
-	mkdir -p $@/Headers
-	cp $(H_FILES) $@/Headers
-	for p in $(EXTRAS); \
-	do \
-	mkdir $@/Headers/$$p; \
-	cp include/igl/$$p/*.h $@/Headers/$$p; \
-	done
+#lib/igl.framework/:
+#	mkdir -p $@
+#	cp lib/*.a $@
+#	mv $@/libigl.a $@/igl
+#	mkdir -p $@/Libraries
+#	mv $@/*.a $@/Libraries
+#	mkdir -p $@/Headers
+#	cp $(H_FILES) $@/Headers
+#	for p in $(EXTRAS); \
+#	do \
+#	mkdir $@/Headers/$$p; \
+#	cp include/igl/$$p/*.h $@/Headers/$$p; \
+#	done
 
 
 
 
 clean:
 clean:
-	rm -rf lib/igl.framework/
+	rm -rf ../lib/igl.framework/
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f lib/libigl.a
-	make -C examples clean
+	rm -f ../lib/libigl.a
+	make -C ../examples clean
 	for p in  $(EXTRA_DIRS); \
 	for p in  $(EXTRA_DIRS); \
 	do \
 	do \
 	echo "cd $$p" ; \
 	echo "cd $$p" ; \

+ 1 - 0
Makefile.conf → build/Makefile.conf

@@ -10,6 +10,7 @@ GG=g++
 #GG=g++-mp-4.3       15.5s
 #GG=g++-mp-4.3       15.5s
 #GG=g++-mp-4.7       19.9s
 #GG=g++-mp-4.7       19.9s
 
 
+CFLAGS += -DIGL_STATIC_LIBRARY
 CFLAGS += -Wall
 CFLAGS += -Wall
 CFLAGS += -std=c++11
 CFLAGS += -std=c++11
 
 

+ 8 - 9
include/igl/bbw/Makefile → build/Makefile_bbw

@@ -1,22 +1,21 @@
-include ../../../Makefile.conf
-
 .PHONY: all
 .PHONY: all
 all: libiglbbw
 all: libiglbbw
 debug: libiglbbw
 debug: libiglbbw
 
 
-include ../../../Makefile.conf
+include Makefile.conf
 all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
 all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
 debug: OPTFLAGS += -g -Wall
 debug: OPTFLAGS += -g -Wall
 CFLAGS += $(OPTFLAGS)
 CFLAGS += $(OPTFLAGS)
 
 
 .PHONY: libiglbbw
 .PHONY: libiglbbw
-libiglbbw: obj ../../../lib/libiglbbw.a
+libiglbbw: obj ../lib/libiglbbw.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/bbw/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -47,13 +46,13 @@ endif
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglbbw.a: $(OBJ_FILES)
+../lib/libiglbbw.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	$(GG) $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	$(GG) $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglbbw.a
+	rm -f ../lib/libiglbbw.a

+ 9 - 8
include/igl/boost/Makefile → build/Makefile_boost

@@ -1,21 +1,22 @@
-include ../../../Makefile.conf
+include Makefile.conf
 
 
 .PHONY: all
 .PHONY: all
 all: libiglboost
 all: libiglboost
 debug: libiglboost
 debug: libiglboost
 
 
-include ../../../Makefile.conf
+include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG
 all: CFLAGS += -O3 -DNDEBUG
 debug: CFLAGS += -g -Wall 
 debug: CFLAGS += -g -Wall 
 
 
 .PHONY: libiglboost
 .PHONY: libiglboost
-libiglboost: obj ../../../lib/libiglboost.a
+libiglboost: obj ../lib/libiglboost.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/boost/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -31,13 +32,13 @@ INC+=$(BOOST_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglboost.a: $(OBJ_FILES)
+../lib/libiglboost.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(OPENMP) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(OPENMP) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglboost.a
+	rm -f ../lib/libiglboost.a

+ 8 - 7
include/igl/cgal/Makefile → build/Makefile_cgal

@@ -3,18 +3,19 @@
 all: libiglcgal
 all: libiglcgal
 debug: libiglcgal
 debug: libiglcgal
 
 
-include ../../../Makefile.conf
+include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG 
 all: CFLAGS += -O3 -DNDEBUG 
 debug: CFLAGS += -g -Wall -Werror
 debug: CFLAGS += -g -Wall -Werror
 
 
 .PHONY: libcgal
 .PHONY: libcgal
-libiglcgal: obj ../../../lib/libiglcgal.a
+libiglcgal: obj ../lib/libiglcgal.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/cgal/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -32,13 +33,13 @@ INC+=$(CGAL_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglcgal.a: $(OBJ_FILES)
+../lib/libiglcgal.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglcgal.a
+	rm -f ../lib/libiglcgal.a

+ 11 - 10
include/igl/embree/Makefile → build/Makefile_embree

@@ -1,21 +1,22 @@
-include ../../../Makefile.conf
+include Makefile.conf
 
 
 .PHONY: all
 .PHONY: all
 all: libiglembree
 all: libiglembree
 debug: libiglembree
 debug: libiglembree
 
 
-include ../../../Makefile.conf
+include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG -std=c++11
 all: CFLAGS += -O3 -DNDEBUG -std=c++11
 debug: CFLAGS += -g -Wall -std=c++11
 debug: CFLAGS += -g -Wall -std=c++11
 
 
 .PHONY: libiglembree
 .PHONY: libiglembree
-libiglembree: obj ../../../lib/libiglembree.a
+libiglembree: obj ../lib/libiglembree.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/embree/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -24,9 +25,9 @@ EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3
 INC+=$(EIGEN3_INC)
 INC+=$(EIGEN3_INC)
 
 
 # embree dependency
 # embree dependency
-#EMBREE=../../../external/embree
+#EMBREE=../external/embree
 #EMBREE_INC=-I$(EMBREE)/common -I$(EMBREE)/rtcore/
 #EMBREE_INC=-I$(EMBREE)/common -I$(EMBREE)/rtcore/
-EMBREE=../../../external/embree/
+EMBREE=../external/embree/
 EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
 EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
 #EMBREE_LIB=-L$(EMBREE)/bin -lrtcore -lsys
 #EMBREE_LIB=-L$(EMBREE)/bin -lrtcore -lsys
 INC+=$(EMBREE_INC)
 INC+=$(EMBREE_INC)
@@ -34,13 +35,13 @@ INC+=$(EMBREE_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglembree.a: $(OBJ_FILES)
+../lib/libiglembree.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(OPENMP) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(OPENMP) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglembree.a
+	rm -f ../lib/libiglembree.a

+ 8 - 7
include/igl/matlab/Makefile → build/Makefile_matlab

@@ -1,4 +1,4 @@
-include ../../../Makefile.conf
+include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG
 all: CFLAGS += -O3 -DNDEBUG
 debug: CFLAGS += -g -Wall -Werror
 debug: CFLAGS += -g -Wall -Werror
 
 
@@ -7,13 +7,14 @@ all: libiglmatlab
 debug: libiglmatlab
 debug: libiglmatlab
 
 
 .PHONY: libmatlab
 .PHONY: libmatlab
-libiglmatlab: obj ../../../lib/libiglmatlab.a
+libiglmatlab: obj ../lib/libiglmatlab.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/matlab/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -33,13 +34,13 @@ INC+=$(MATLAB_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglmatlab.a: $(OBJ_FILES)
+../lib/libiglmatlab.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglmatlab.a
+	rm -f ../lib/libiglmatlab.a

+ 9 - 8
include/igl/mosek/Makefile → build/Makefile_mosek

@@ -1,22 +1,23 @@
-include ../../../Makefile.conf
+include Makefile.conf
 
 
 .PHONY: all
 .PHONY: all
 all: libiglmosek
 all: libiglmosek
 debug: libiglmosek
 debug: libiglmosek
 
 
-include ../../../Makefile.conf
+include Makefile.conf
 all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
 all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
 debug: OPTFLAGS += -g -Wall
 debug: OPTFLAGS += -g -Wall
 CFLAGS += $(OPTFLAGS)
 CFLAGS += $(OPTFLAGS)
 
 
 .PHONY: libiglmosek
 .PHONY: libiglmosek
-libiglmosek: obj ../../../lib/libiglmosek.a
+libiglmosek: obj ../lib/libiglmosek.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/mosek/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -40,13 +41,13 @@ INC+=$(MOSEK_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglmosek.a: $(OBJ_FILES)
+../lib/libiglmosek.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglmosek.a
+	rm -f ../lib/libiglmosek.a

+ 9 - 8
include/igl/png/Makefile → build/Makefile_png

@@ -1,4 +1,4 @@
-include ../../../Makefile.conf
+include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG 
 all: CFLAGS += -O3 -DNDEBUG 
 debug: CFLAGS += -g -Wall -Werror
 debug: CFLAGS += -g -Wall -Werror
 
 
@@ -7,18 +7,19 @@ all: libiglpng
 debug: libiglpng
 debug: libiglpng
 
 
 .PHONY: libpng
 .PHONY: libpng
-libiglpng: obj ../../../lib/libiglpng.a
+libiglpng: obj ../lib/libiglpng.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/png/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
 # YIMG dependency
 # YIMG dependency
-YIMG=../../../external/yimg
+YIMG=../external/yimg
 YIMG_INC=-I$(YIMG)
 YIMG_INC=-I$(YIMG)
 INC+=$(YIMG_INC)
 INC+=$(YIMG_INC)
 YIMG_STATIC_LIB=$(YIMG)/libyimg.a
 YIMG_STATIC_LIB=$(YIMG)/libyimg.a
@@ -29,13 +30,13 @@ INC+=-I/opt/local/include/
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglpng.a: $(OBJ_FILES)
+../lib/libiglpng.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglpng.a
+	rm -f ../lib/libiglpng.a

+ 10 - 9
include/igl/svd3x3/Makefile → build/Makefile_svd3x3

@@ -1,28 +1,29 @@
-include ../../../Makefile.conf
+include Makefile.conf
 
 
 .PHONY: all
 .PHONY: all
 all: libiglsvd3x3
 all: libiglsvd3x3
 debug: libiglsvd3x3
 debug: libiglsvd3x3
 
 
-include ../../../Makefile.conf
+include Makefile.conf
 all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
 all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
 debug: OPTFLAGS += -g -Wall
 debug: OPTFLAGS += -g -Wall
 CFLAGS += $(OPTFLAGS) -std=c++11
 CFLAGS += $(OPTFLAGS) -std=c++11
 
 
 .PHONY: libiglsvd3x3
 .PHONY: libiglsvd3x3
-libiglsvd3x3: obj ../../../lib/libiglsvd3x3.a
+libiglsvd3x3: obj ../lib/libiglsvd3x3.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/svd3x3/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
 # SVD 
 # SVD 
 SINGULAR_VALUE_DECOMPOSITION_INC=\
 SINGULAR_VALUE_DECOMPOSITION_INC=\
-	-I../../../external/Singular_Value_Decomposition/
+	-I../external/Singular_Value_Decomposition/
 # Eigen dependency
 # Eigen dependency
 EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 INC+=$(EIGEN3_INC) $(SINGULAR_VALUE_DECOMPOSITION_INC)
 INC+=$(EIGEN3_INC) $(SINGULAR_VALUE_DECOMPOSITION_INC)
@@ -39,13 +40,13 @@ INC+=$(MATLAB_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglsvd3x3.a: $(OBJ_FILES)
+../lib/libiglsvd3x3.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	$(GG) $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	$(GG) $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglsvd3x3.a
+	rm -f ../lib/libiglsvd3x3.a

+ 9 - 8
include/igl/tetgen/Makefile → build/Makefile_tetgen

@@ -3,18 +3,19 @@
 all: libigltetgen
 all: libigltetgen
 debug: libigltetgen
 debug: libigltetgen
 
 
-include ../../../Makefile.conf
+include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG 
 all: CFLAGS += -O3 -DNDEBUG 
 debug: CFLAGS += -g -Wall -Werror
 debug: CFLAGS += -g -Wall -Werror
 
 
 .PHONY: libtetgen
 .PHONY: libtetgen
-libigltetgen: obj ../../../lib/libigltetgen.a
+libigltetgen: obj ../lib/libigltetgen.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/tetgen/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -23,7 +24,7 @@ EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3
 INC+=$(EIGEN3_INC)
 INC+=$(EIGEN3_INC)
 
 
 # Tetgen dependency
 # Tetgen dependency
-TETGEN=../../../external/tetgen
+TETGEN=../external/tetgen
 TETGEN_INC=-I$(TETGEN)
 TETGEN_INC=-I$(TETGEN)
 INC+=$(TETGEN_INC)
 INC+=$(TETGEN_INC)
 TETGEN_STATIC_LIB=$(TETGEN)/libtet.a
 TETGEN_STATIC_LIB=$(TETGEN)/libtet.a
@@ -31,13 +32,13 @@ TETGEN_STATIC_LIB=$(TETGEN)/libtet.a
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libigltetgen.a: $(OBJ_FILES)
+../lib/libigltetgen.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libigltetgen.a
+	rm -f ../lib/libigltetgen.a

+ 10 - 9
include/igl/viewer/Makefile → build/Makefile_viewer

@@ -1,4 +1,4 @@
-include ../../../Makefile.conf
+include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG -fopenmp
 all: CFLAGS += -O3 -DNDEBUG -fopenmp
 debug: CFLAGS += -g -Wall -Werror -fopenmp
 debug: CFLAGS += -g -Wall -Werror -fopenmp
 
 
@@ -7,13 +7,14 @@ all: libiglviewer
 debug: libiglviewer
 debug: libiglviewer
 
 
 .PHONY: libviewer
 .PHONY: libviewer
-libiglviewer: obj ../../../lib/libiglviewer.a
+libiglviewer: obj ../lib/libiglviewer.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/viewer/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -23,12 +24,12 @@ INC+=$(EIGEN3_INC)
 
 
 # GLFW dependency
 # GLFW dependency
 ifndef GLFW
 ifndef GLFW
-	GLFW=../../../external/glfw/
+	GLFW=../external/glfw/
 endif
 endif
 GLFW_INC=-I$(GLFW)/include
 GLFW_INC=-I$(GLFW)/include
 INC+=$(GLFW_INC)
 INC+=$(GLFW_INC)
 ifndef ANTTWEAKBAR
 ifndef ANTTWEAKBAR
-	ANTTWEAKBAR=../../../external/AntTweakBar/
+	ANTTWEAKBAR=../external/AntTweakBar/
 endif
 endif
 # Viewer also uses source files from AntTweakBar for font rendering
 # Viewer also uses source files from AntTweakBar for font rendering
 ANTTWEAKBAR_INC=-I$(ANTTWEAKBAR)/include -I$(ANTTWEAKBAR)/src
 ANTTWEAKBAR_INC=-I$(ANTTWEAKBAR)/include -I$(ANTTWEAKBAR)/src
@@ -37,13 +38,13 @@ INC+=$(ANTTWEAKBAR_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglviewer.a: $(OBJ_FILES)
+../lib/libiglviewer.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglmatlab.a
+	rm -f ../lib/libiglmatlab.a

+ 12 - 11
include/igl/xml/Makefile → build/Makefile_xml

@@ -1,4 +1,4 @@
-include ../../../Makefile.conf
+include Makefile.conf
 
 
 .PHONY: all
 .PHONY: all
 all: 
 all: 
@@ -6,18 +6,19 @@ debug:
 #all: libiglxml
 #all: libiglxml
 #debug: libiglxml
 #debug: libiglxml
 
 
-include ../../../Makefile.conf
+include Makefile.conf
 all: CFLAGS += -O3 -DNDEBUG
 all: CFLAGS += -O3 -DNDEBUG
 debug: CFLAGS += -g -Wall
 debug: CFLAGS += -g -Wall
 
 
 .PHONY: libiglxml
 .PHONY: libiglxml
-libiglxml: obj ../../../lib/libiglxml.a
+libiglxml: obj ../lib/libiglxml.a
 
 
-CPP_FILES=$(wildcard *.cpp)
+SRC_DIR=../include/igl/xml/
+CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
 
 
 # include igl headers
 # include igl headers
-INC+=-I../../../include/
+INC+=-I../include/
 
 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 
@@ -26,17 +27,17 @@ EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3
 INC+=$(EIGEN3_INC)
 INC+=$(EIGEN3_INC)
 
 
 #AntTweakbar dependency
 #AntTweakbar dependency
-ANTTWEAKBAR_INC=-I../../../external/AntTweakBar/include
+ANTTWEAKBAR_INC=-I../external/AntTweakBar/include
 
 
 # xml dependency
 # xml dependency
 # TODO: linux, 32 bit etc
 # TODO: linux, 32 bit etc
-TINYXML2=../../../external/tinyxml2
+TINYXML2=../external/tinyxml2
 TINYXML2_INC=-I$(TINYXML2)
 TINYXML2_INC=-I$(TINYXML2)
 #TINYXML2_LIB=-L$(TINYXML2) -ltinyxml2
 #TINYXML2_LIB=-L$(TINYXML2) -ltinyxml2
 INC+=$(TINYXML2_INC) $(ANTTWEAKBAR_INC)
 INC+=$(TINYXML2_INC) $(ANTTWEAKBAR_INC)
 
 
 # AntTweakBar dependency
 # AntTweakBar dependency
-ANTTWEAKBAR_INC=-I../../../external/AntTweakBar/include
+ANTTWEAKBAR_INC=-I../external/AntTweakBar/include
 INC+=$(ANTTWEAKBAR_INC)
 INC+=$(ANTTWEAKBAR_INC)
 
 
 #CFLAGS+=-std=c++11
 #CFLAGS+=-std=c++11
@@ -44,13 +45,13 @@ INC+=$(ANTTWEAKBAR_INC)
 obj: 
 obj: 
 	mkdir -p obj
 	mkdir -p obj
 
 
-../../../lib/libiglxml.a: $(OBJ_FILES)
+../lib/libiglxml.a: $(OBJ_FILES)
 	rm -f $@
 	rm -f $@
 	ar cqs $@ $(OBJ_FILES)
 	ar cqs $@ $(OBJ_FILES)
 
 
-obj/%.o: %.cpp %.h
+obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 	g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
 
 
 clean:
 clean:
 	rm -f obj/*.o
 	rm -f obj/*.o
-	rm -f ../../../lib/libiglxml.a
+	rm -f ../lib/libiglxml.a

+ 1 - 1
examples/MatlabWorkspace/Makefile

@@ -1,7 +1,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 IGL=../../
 IGL=../../
 IGL_LIB=-L$(IGL)/lib -ligl
 IGL_LIB=-L$(IGL)/lib -ligl

+ 2 - 2
examples/MatlabWorkspace/example.cpp

@@ -3,13 +3,13 @@
 #include <igl/readDMAT.h>
 #include <igl/readDMAT.h>
 #include <cstdio>
 #include <cstdio>
 
 
-#ifndef IGL_HEADER_ONLY
+#ifdef IGL_STATIC_LIBRARY
 #  define IGL_HEADER_ONLY
 #  define IGL_HEADER_ONLY
 #  define IGL_HEADER_ONLY_WAS_NOT_DEFINED
 #  define IGL_HEADER_ONLY_WAS_NOT_DEFINED
 #endif
 #endif
 #include <igl/matlab/MatlabWorkspace.h>
 #include <igl/matlab/MatlabWorkspace.h>
 #include <igl/on_boundary.h>
 #include <igl/on_boundary.h>
-#ifdef IGL_HEADER_ONLY_WAS_NOT_DEFINED
+#ifndef IGL_STATIC_LIBRARY_WAS_NOT_DEFINED
 #  undef IGL_HEADER_ONLY
 #  undef IGL_HEADER_ONLY
 #endif
 #endif
 
 

+ 1 - 1
examples/ReAntTweakBar/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 

+ 2 - 2
examples/affine/Makefile

@@ -4,14 +4,14 @@
 all: example
 all: example
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 .PHONY: example
 .PHONY: example
 
 
 igl_lib=../../
 igl_lib=../../
 eigen=$(DEFAULT_PREFIX)/include/eigen3
 eigen=$(DEFAULT_PREFIX)/include/eigen3
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include -I$(eigen)
 inc=-I$(igl_lib)/include -I$(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/ambient-occlusion-mex/mexFunction.cpp

@@ -1,6 +1,6 @@
 #include "parse_rhs.h"
 #include "parse_rhs.h"
 
 
-#include <igl/matlab/mexStream.h>
+#include <igl/matlab/MexStream.h>
 #include <igl/embree/ambient_occlusion.h>
 #include <igl/embree/ambient_occlusion.h>
 
 
 #include <igl/read_triangle_mesh.h>
 #include <igl/read_triangle_mesh.h>
@@ -16,7 +16,7 @@ void mexFunction(int nlhs, mxArray *plhs[],
 {
 {
   // This is useful for debugging whether Matlab is caching the mex binary
   // This is useful for debugging whether Matlab is caching the mex binary
   //mexPrintf("%s %s\n",__TIME__,__DATE__);
   //mexPrintf("%s %s\n",__TIME__,__DATE__);
-  igl::mexStream mout;
+  igl::MexStream mout;
   std::streambuf *outbuf = std::cout.rdbuf(&mout);
   std::streambuf *outbuf = std::cout.rdbuf(&mout);
 
 
   using namespace std;
   using namespace std;

+ 1 - 1
examples/ambient-occlusion/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 

+ 1 - 1
examples/ambient-occlusion/example.cpp

@@ -357,7 +357,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 1 - 1
examples/arap/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 

+ 2 - 2
examples/arap/example.cpp

@@ -432,8 +432,8 @@ void display()
   const double floor_offset =
   const double floor_offset =
     -2./bbd*(V.col(1).maxCoeff()-mid(1));
     -2./bbd*(V.col(1).maxCoeff()-mid(1));
   glTranslated(0,floor_offset,0);
   glTranslated(0,floor_offset,0);
-  const float GREY[4] = {0.5,0.5,0.6,1.0};
-  const float DARK_GREY[4] = {0.2,0.2,0.3,1.0};
+  //const float GREY[4] = {0.5,0.5,0.6,1.0};
+  //const float DARK_GREY[4] = {0.2,0.2,0.3,1.0};
 
 
   //draw_floor(GREY,DARK_GREY);
   //draw_floor(GREY,DARK_GREY);
   draw_floor();
   draw_floor();

+ 2 - 2
examples/basic_topology/Makefile

@@ -2,12 +2,12 @@
 all: example1
 all: example1
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 igl_lib=../../
 igl_lib=../../
 eigen_lib=$(DEFAULT_PREFIX)/include/eigen3/
 eigen_lib=$(DEFAULT_PREFIX)/include/eigen3/
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include -I$(eigen_lib)
 inc=-I$(igl_lib)/include -I$(eigen_lib)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/basic_topology/example1.cpp

@@ -11,7 +11,7 @@
 #include <igl/read_triangle_mesh.h>
 #include <igl/read_triangle_mesh.h>
 #include <igl/write_triangle_mesh.h>
 #include <igl/write_triangle_mesh.h>
 #include <igl/triangle_triangle_adjacency.h>
 #include <igl/triangle_triangle_adjacency.h>
-#include <igl/edgetopology.h>
+#include <igl/edge_topology.h>
 
 
 using namespace std;
 using namespace std;
 
 
@@ -44,7 +44,7 @@ int main (int argc, const char * argv[])
     Eigen::MatrixXi FE;
     Eigen::MatrixXi FE;
     Eigen::MatrixXi EF;
     Eigen::MatrixXi EF;
 
 
-    igl::edgetopology(V,F,EV,FE, EF);
+    igl::edge_topology(V,F,EV,FE, EF);
     cout << EV << endl << FE << endl << EF << endl;
     cout << EV << endl << FE << endl << EF << endl;
     cout << "-------------" << endl;
     cout << "-------------" << endl;
 
 

+ 1 - 1
examples/bbw/Makefile

@@ -1,4 +1,4 @@
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 CXX=g++
 CXX=g++
 
 

+ 2 - 2
examples/beach-balls/Makefile

@@ -2,13 +2,13 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 
 .PHONY: example
 .PHONY: example
 
 
-CFLAGS=-g -std=c++11
+CFLAGS+=-g -std=c++11
 
 
 LIBIGL=../../
 LIBIGL=../../
 LIBIGL_INC=-I$(LIBIGL)/include
 LIBIGL_INC=-I$(LIBIGL)/include

+ 1 - 1
examples/camera/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 

+ 2 - 2
examples/cat/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=$(DEFAULT_PREFIX)/include/eigen3/
 eigen=$(DEFAULT_PREFIX)/include/eigen3/
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include -I$(eigen)
 inc=-I$(igl_lib)/include -I$(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 1 - 1
examples/colored-mesh/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 

+ 1 - 1
examples/colored-mesh/example.cpp

@@ -530,7 +530,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 2 - 2
examples/dmat/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=$(DEFAULT_PREFIX)/include/eigen3
 eigen=$(DEFAULT_PREFIX)/include/eigen3
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include -I$(eigen)
 inc=-I$(igl_lib)/include -I$(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/eigen-gotchas/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include $(eigen)
 inc=-I$(igl_lib)/include $(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 1 - 1
examples/embree/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 

+ 2 - 2
examples/example_fun/Makefile

@@ -3,11 +3,11 @@
 all: example_static example_header_only
 all: example_static example_header_only
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 
 
 STATIC_LIB=-ligl -L../../lib
 STATIC_LIB=-ligl -L../../lib

+ 1 - 1
examples/example_fun/example.cpp

@@ -8,7 +8,7 @@ int main(int argc, char * argv[])
   example_fun(d);
   example_fun(d);
   int i = 4;
   int i = 4;
   example_fun(i);
   example_fun(i);
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
   const char * s = "string";
   const char * s = "string";
   example_fun(s);
   example_fun(s);
 #endif
 #endif

+ 2 - 2
examples/file_contents_as_string/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -10,7 +10,7 @@ all: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 1 - 1
examples/flare-eyes/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 

+ 1 - 1
examples/flare-eyes/example.cpp

@@ -662,7 +662,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 2 - 2
examples/get_seconds/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -10,7 +10,7 @@ all: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g -Wall
+CFLAGS+=-g -Wall
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/glslversion/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -10,7 +10,7 @@ all: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=$(OPENGL_LIB) $(GLUT_LIB) -L$(igl_lib)/lib -ligl
 lib=$(OPENGL_LIB) $(GLUT_LIB) -L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/glut_speed_test/Makefile

@@ -4,13 +4,13 @@
 all: example
 all: example
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 .PHONY: example
 .PHONY: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g -Wall 
+CFLAGS+=-g -Wall 
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=$(OPENGL_LIB) $(GLUT_LIB) -L$(igl_lib)/lib -ligl
 lib=$(OPENGL_LIB) $(GLUT_LIB) -L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/harwell_boeing/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include $(eigen)
 inc=-I$(igl_lib)/include $(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 1 - 1
examples/intersections/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 

+ 7 - 6
examples/intersections/example.cpp

@@ -24,7 +24,7 @@
 #include <igl/pathinfo.h>
 #include <igl/pathinfo.h>
 #include <igl/Camera.h>
 #include <igl/Camera.h>
 #include <igl/get_seconds.h>
 #include <igl/get_seconds.h>
-#include <igl/cgal/selfintersect.h>
+#include <igl/cgal/remesh_self_intersections.h>
 #include <igl/cgal/intersect_other.h>
 #include <igl/cgal/intersect_other.h>
 
 
 #ifdef __APPLE__
 #ifdef __APPLE__
@@ -477,9 +477,10 @@ void color_selfintersections(
   using namespace Eigen;
   using namespace Eigen;
   MatrixXd SV;
   MatrixXd SV;
   MatrixXi SF,IF;
   MatrixXi SF,IF;
-  SelfintersectParam params;
+  VectorXi J,IM;
+  RemeshSelfIntersectionsParam params;
   params.detect_only = true;
   params.detect_only = true;
-  selfintersect(V,F,params,SV,SF,IF);
+  remesh_self_intersections(V,F,params,SV,SF,IF,J,IM);
   C.resize(F.rows(),3);
   C.resize(F.rows(),3);
   C.col(0).setConstant(0.4);
   C.col(0).setConstant(0.4);
   C.col(1).setConstant(0.8);
   C.col(1).setConstant(0.8);
@@ -606,7 +607,7 @@ int main(int argc, char * argv[])
     //  }
     //  }
     //  //if(F.size() > T.size() || F.size() == 0)
     //  //if(F.size() > T.size() || F.size() == 0)
     //  {
     //  {
-    //    boundary_faces(T,F);
+    //    boundary_facets(T,F);
     //  }
     //  }
     }
     }
     if(vV.size() > 0)
     if(vV.size() > 0)
@@ -622,13 +623,13 @@ int main(int argc, char * argv[])
     return true;
     return true;
   };
   };
 
 
-  if(!read_triangle_mesh(filename,V,F,N))
+  if(!read(filename,V,F,N))
   {
   {
     return 1;
     return 1;
   }
   }
   if(has_other)
   if(has_other)
   {
   {
-    if(!read_triangle_mesh(argv[2],U,G,W))
+    if(!read(argv[2],U,G,W))
     {
     {
       return 1;
       return 1;
     }
     }

+ 2 - 2
examples/is_dir/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -10,7 +10,7 @@ all: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/marching_cubes/Makefile

@@ -6,12 +6,12 @@ all: example
 .PHONY: example
 .PHONY: example
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 igl_lib=../../
 igl_lib=../../
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include $(eigen)
 inc=-I$(igl_lib)/include $(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/meshio/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include $(eigen)
 inc=-I$(igl_lib)/include $(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/mode/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=$(DEFAULT_PREFIX)/include/eigen3/
 eigen=$(DEFAULT_PREFIX)/include/eigen3/
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include -I$(eigen)
 inc=-I$(igl_lib)/include -I$(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 1 - 1
examples/multi-viewport/Makefile

@@ -8,7 +8,7 @@ all: example
 .PHONY:  example
 .PHONY:  example
 
 
 LIBIGL=/usr/local/igl/libigl/
 LIBIGL=/usr/local/igl/libigl/
-include $(LIBIGL)/Makefile.conf
+include $(LIBIGL)/build/Makefile.conf
 LIBIGL_INC=-I$(LIBIGL)/include
 LIBIGL_INC=-I$(LIBIGL)/include
 LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree
 LIBIGL_LIB=-L$(LIBIGL)/lib -ligl -liglembree
 
 

+ 2 - 2
examples/patches/Makefile

@@ -2,13 +2,13 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 
 .PHONY: example
 .PHONY: example
 
 
-CFLAGS=-g -std=c++11
+CFLAGS+=-g -std=c++11
 
 
 LIBIGL=../../
 LIBIGL=../../
 LIBIGL_INC=-I$(LIBIGL)/include
 LIBIGL_INC=-I$(LIBIGL)/include

+ 5 - 3
examples/patches/example.cpp

@@ -25,7 +25,7 @@
 #include <igl/boost/components.h>
 #include <igl/boost/components.h>
 #include <igl/boost/bfs_orient.h>
 #include <igl/boost/bfs_orient.h>
 #include <igl/orient_outward.h>
 #include <igl/orient_outward.h>
-#include <igl/embree/orient_outward_ao.h>
+#include <igl/embree/reorient_facets_raycast.h>
 #include <igl/unique_simplices.h>
 #include <igl/unique_simplices.h>
 #include <igl/C_STR.h>
 #include <igl/C_STR.h>
 #include <igl/write_triangle_mesh.h>
 #include <igl/write_triangle_mesh.h>
@@ -567,9 +567,11 @@ void init_patches()
   switch(orient_method)
   switch(orient_method)
   {
   {
     case ORIENT_METHOD_AO:
     case ORIENT_METHOD_AO:
+    {
       cout<<"orient_outward_ao()"<<endl;
       cout<<"orient_outward_ao()"<<endl;
-      orient_outward_ao(V,F,CC,100, F.rows() * 100,F,I);
+      reorient_facets_raycast(V,F,F,I);
       break;
       break;
+    }
     case ORIENT_METHOD_OUTWARD:
     case ORIENT_METHOD_OUTWARD:
     default:
     default:
       cout<<"orient_outward()"<<endl;
       cout<<"orient_outward()"<<endl;
@@ -757,7 +759,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 3 - 3
examples/patches/temp.rbr

@@ -1,7 +1,7 @@
-camera_rotation: TW_TYPE_QUAT4D 0.221720768269005 -0.655276665457443 -0.211493904735977 0.690451099560792
+camera_rotation: TW_TYPE_QUAT4D 0.152085375459856 -0.590495112202136 -0.114509193857288 0.784266029838584
 center_type: CenterType orbit
 center_type: CenterType orbit
-wireframe_visible: TW_TYPE_BOOLCPP 0
+wireframe_visible: TW_TYPE_BOOLCPP 1
 fill_visible: TW_TYPE_BOOLCPP 1
 fill_visible: TW_TYPE_BOOLCPP 1
-rotation_type: RotationType igl_trackball
+rotation_type: RotationType two-axis-valuator-fixed-up
 orient_method: OrientMethod ambient-occlusion
 orient_method: OrientMethod ambient-occlusion
 
 

+ 2 - 2
examples/path_tests/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -10,7 +10,7 @@ all: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g -Wall
+CFLAGS+=-g -Wall
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/pathinfo/Makefile

@@ -4,13 +4,13 @@
 all: example
 all: example
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 .PHONY: example
 .PHONY: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g -Wall 
+CFLAGS+=-g -Wall 
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 3 - 4
examples/principal_curvature/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: curvature
 all: curvature
 
 
@@ -11,14 +11,13 @@ all: curvature
 igl_lib=../../
 igl_lib=../../
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3
 
 
-CFLAGS=-g -O3
 inc=-I$(igl_lib)/include $(eigen)
 inc=-I$(igl_lib)/include $(eigen)
 
 
 curvature: curvature.o
 curvature: curvature.o
-	g++ $(CFLAGS) -o curvature curvature.o $(lib)
+	g++ $(CFLAGS) $(OPENMP) -o curvature curvature.o $(lib)
 
 
 curvature.o: curvature.cpp
 curvature.o: curvature.cpp
-	g++ $(CFLAGS) -c curvature.cpp -o curvature.o $(inc)
+	g++ $(CFLAGS) $(OPENMP) -c curvature.cpp -o curvature.o $(inc)
 clean:
 clean:
 	rm -f curvature.o
 	rm -f curvature.o
 	rm -f curvature
 	rm -f curvature

+ 2 - 2
examples/principal_curvature/curvature.cpp

@@ -1,5 +1,5 @@
 
 
-#define IGL_HEADER_ONLY
+#undef IGL_STATIC_LIBRARY
 #include <igl/principal_curvature.h>
 #include <igl/principal_curvature.h>
 #include <igl/read_triangle_mesh.h>
 #include <igl/read_triangle_mesh.h>
 #include <iostream>
 #include <iostream>
@@ -44,7 +44,7 @@ void app_init(int argc, char* argv[], CurvatureCalculator& c, Eigen::MatrixXd& V
     }
     }
     char* tmp;
     char* tmp;
     const char* meshName;
     const char* meshName;
-    char * scaleFile;
+    //char * scaleFile;
     for (argc--, argv++; argc--; argv++)
     for (argc--, argv++; argc--; argv++)
     {
     {
         if( (*argv)[0] == '-')
         if( (*argv)[0] == '-')

+ 2 - 2
examples/quicklook-mesh/src/render_to_buffer.cpp

@@ -18,7 +18,7 @@ extern "C" {
 #include <igl/polygon_mesh_to_triangle_mesh.h>
 #include <igl/polygon_mesh_to_triangle_mesh.h>
 #include <igl/readOFF.h>
 #include <igl/readOFF.h>
 #include <igl/readMESH.h>
 #include <igl/readMESH.h>
-#include <igl/boundary_faces.h>
+#include <igl/boundary_facets.h>
 #include <igl/barycenter.h>
 #include <igl/barycenter.h>
 #include <igl/doublearea.h>
 #include <igl/doublearea.h>
 #include <igl/EPS.h>
 #include <igl/EPS.h>
@@ -395,7 +395,7 @@ bool render_to_buffer(
     }
     }
     //if(F.size() > T.size() || F.size() == 0)
     //if(F.size() > T.size() || F.size() == 0)
     {
     {
-      boundary_faces(T,F);
+      boundary_facets(T,F);
     }
     }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 1 - 1
examples/randomly-sample-mesh/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 

+ 1 - 1
examples/randomly-sample-mesh/example.cpp

@@ -546,7 +546,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 1 - 1
examples/render_to_png/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 # YIMG dependency
 # YIMG dependency
 YIMG=../../external/yimg
 YIMG=../../external/yimg

+ 1 - 1
examples/rotate-widget/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 

+ 1 - 1
examples/rotate-widget/example.cpp

@@ -574,7 +574,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 1 - 1
examples/scene-rotation/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 

+ 1 - 1
examples/scene-rotation/example.cpp

@@ -629,7 +629,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 1 - 1
examples/scene-rotation/trackball.h

@@ -83,4 +83,4 @@ axis_to_quat(float a[3], float phi, float q[4]);
 void quat_to_axis(float q[4], float axis[3], float &phi);
 void quat_to_axis(float q[4], float axis[3], float &phi);
 void add_quats_no_renorm(float q1[4], float q2[4], float dest[4]);
 void add_quats_no_renorm(float q1[4], float q2[4], float dest[4]);
 void quat_rotate_point(float q[4], const float p1[3], float p2[3]);
 void quat_rotate_point(float q[4], const float p1[3], float p2[3]);
-////Olga////
+////Olga////

+ 1 - 1
examples/shadow-mapping/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 

+ 20 - 14
examples/shadow-mapping/example.cpp

@@ -19,7 +19,6 @@
 #include <igl/trackball.h>
 #include <igl/trackball.h>
 #include <igl/snap_to_canonical_view_quat.h>
 #include <igl/snap_to_canonical_view_quat.h>
 #include <igl/REDRUM.h>
 #include <igl/REDRUM.h>
-#include <igl/Camera.h>
 #include <igl/ReAntTweakBar.h>
 #include <igl/ReAntTweakBar.h>
 #include <igl/get_seconds.h>
 #include <igl/get_seconds.h>
 #include <igl/jet.h>
 #include <igl/jet.h>
@@ -57,6 +56,14 @@
 #include <iostream>
 #include <iostream>
 
 
 
 
+struct Camera
+{
+  Eigen::Vector3d pan;
+  Eigen::Quaterniond rotation;
+  double zoom;
+  double angle;
+  Camera():pan(0,0,0),rotation(1,0,0,0),zoom(1),angle(25){}
+};
 
 
 // Initialize shadow textures. Should be called on reshape()
 // Initialize shadow textures. Should be called on reshape()
 //
 //
@@ -154,7 +161,7 @@ std::vector<Mesh> meshes;
 
 
 struct State
 struct State
 {
 {
-  igl::Camera camera;
+  ::Camera camera;
   State():
   State():
     camera()
     camera()
   {
   {
@@ -175,7 +182,7 @@ std::stack<State> redo_stack;
 
 
 bool is_rotating = false;
 bool is_rotating = false;
 int down_x,down_y;
 int down_x,down_y;
-igl::Camera down_camera;
+::Camera down_camera;
 
 
 bool is_animating = false;
 bool is_animating = false;
 double animation_start_time = 0;
 double animation_start_time = 0;
@@ -276,7 +283,7 @@ void push_lightview_camera(const Eigen::Vector4f & light_pos)
     0,1,0);
     0,1,0);
 }
 }
 
 
-void push_camera(const igl::Camera & camera)
+void push_camera(const ::Camera & camera)
 {
 {
   using namespace igl;
   using namespace igl;
   glMatrixMode(GL_MODELVIEW);
   glMatrixMode(GL_MODELVIEW);
@@ -284,7 +291,7 @@ void push_camera(const igl::Camera & camera)
   // scale, pan
   // scale, pan
   glScaled(camera.zoom, camera.zoom, camera.zoom);
   glScaled(camera.zoom, camera.zoom, camera.zoom);
   double mat[4*4];
   double mat[4*4];
-  quat_to_mat(camera.rotation,mat);
+  quat_to_mat(camera.rotation.coeffs().data(),mat);
   glMultMatrixd(mat);
   glMultMatrixd(mat);
 }
 }
 
 
@@ -454,7 +461,7 @@ void display()
     q.coeffs() =
     q.coeffs() =
       animation_to_quat.coeffs()*t + animation_from_quat.coeffs()*(1.-t);
       animation_to_quat.coeffs()*t + animation_from_quat.coeffs()*(1.-t);
     q.normalize();
     q.normalize();
-    copy(q.coeffs().data(),q.coeffs().data()+4,s.camera.rotation);
+    s.camera.rotation = q;
   }
   }
   update_meshes();
   update_meshes();
 
 
@@ -577,7 +584,7 @@ void mouse_drag(int mouse_x, int mouse_y)
       case ROTATION_TYPE_IGL_TRACKBALL:
       case ROTATION_TYPE_IGL_TRACKBALL:
       {
       {
         // Rotate according to trackball
         // Rotate according to trackball
-        igl::trackball<double>(
+        igl::trackball(
           width,
           width,
           height,
           height,
           2.0,
           2.0,
@@ -591,8 +598,7 @@ void mouse_drag(int mouse_x, int mouse_y)
       }
       }
       case ROTATION_TYPE_TWO_AXIS_VALUATOR_FIXED_UP:
       case ROTATION_TYPE_TWO_AXIS_VALUATOR_FIXED_UP:
       {
       {
-        Quaterniond down_q;
-        copy(down_camera.rotation,down_camera.rotation+4,down_q.coeffs().data());
+        Quaterniond down_q = down_camera.rotation;
         Vector3d axis(0,1,0);
         Vector3d axis(0,1,0);
         const double speed = 2.0;
         const double speed = 2.0;
         Quaterniond q;
         Quaterniond q;
@@ -615,7 +621,7 @@ void mouse_drag(int mouse_x, int mouse_y)
             q.normalize();
             q.normalize();
           }
           }
         }
         }
-        copy(q.coeffs().data(),q.coeffs().data()+4,s.camera.rotation);
+        s.camera.rotation = q;
         break;
         break;
       }
       }
       default:
       default:
@@ -688,7 +694,7 @@ void key(unsigned char key, int mouse_x, int mouse_y)
       }else
       }else
       {
       {
         push_undo();
         push_undo();
-        igl::snap_to_canonical_view_quat<double>(
+        igl::snap_to_canonical_view_quat(
           s.camera.rotation,
           s.camera.rotation,
           1.0,
           1.0,
           s.camera.rotation);
           s.camera.rotation);
@@ -712,7 +718,7 @@ void TW_CALL set_rotation_type(const void * value, void * clientData)
     old_rotation_type != ROTATION_TYPE_TWO_AXIS_VALUATOR_FIXED_UP)
     old_rotation_type != ROTATION_TYPE_TWO_AXIS_VALUATOR_FIXED_UP)
   {
   {
     push_undo();
     push_undo();
-    copy(s.camera.rotation,s.camera.rotation+4,animation_from_quat.coeffs().data());
+    animation_from_quat = s.camera.rotation;
     const Vector3d up = animation_from_quat.matrix() * Vector3d(0,1,0);
     const Vector3d up = animation_from_quat.matrix() * Vector3d(0,1,0);
     Vector3d proj_up(0,up(1),up(2));
     Vector3d proj_up(0,up(1),up(2));
     if(proj_up.norm() == 0)
     if(proj_up.norm() == 0)
@@ -825,7 +831,7 @@ int main(int argc, char * argv[])
   rebar.TwNewBar("bar");
   rebar.TwNewBar("bar");
   TwDefine("bar label='Shadow Mapping' size='200 550' text=light alpha='200' color='68 68 68'");
   TwDefine("bar label='Shadow Mapping' size='200 550' text=light alpha='200' color='68 68 68'");
   rebar.TwAddVarRW("camera_zoom", TW_TYPE_DOUBLE,&s.camera.zoom,"");
   rebar.TwAddVarRW("camera_zoom", TW_TYPE_DOUBLE,&s.camera.zoom,"");
-  rebar.TwAddVarRW("camera_rotation", TW_TYPE_QUAT4D,s.camera.rotation,"");
+  rebar.TwAddVarRW("camera_rotation", TW_TYPE_QUAT4D,s.camera.rotation.coeffs().data(),"");
   TwType RotationTypeTW = ReTwDefineEnumFromString("RotationType","igl_trackball,two_axis_fixed_up");
   TwType RotationTypeTW = ReTwDefineEnumFromString("RotationType","igl_trackball,two_axis_fixed_up");
   rebar.TwAddVarCB( "rotation_type", RotationTypeTW,
   rebar.TwAddVarCB( "rotation_type", RotationTypeTW,
     set_rotation_type,get_rotation_type,NULL,"keyIncr=] keyDecr=[");
     set_rotation_type,get_rotation_type,NULL,"keyIncr=] keyDecr=[");
@@ -834,7 +840,7 @@ int main(int argc, char * argv[])
   rebar.load(REBAR_NAME);
   rebar.load(REBAR_NAME);
 
 
   animation_from_quat = Quaterniond(1,0,0,0);
   animation_from_quat = Quaterniond(1,0,0,0);
-  copy(s.camera.rotation,s.camera.rotation+4,animation_to_quat.coeffs().data());
+  animation_from_quat = s.camera.rotation;
   animation_start_time = get_seconds();
   animation_start_time = get_seconds();
 
 
   // Init antweakbar
   // Init antweakbar

+ 1 - 1
examples/skeleton/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: obj example
 all: obj example
 
 

+ 1 - 1
examples/skeleton/example.cpp

@@ -632,7 +632,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 3 - 3
examples/slice/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,8 +11,8 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 eigen=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 
 
-#CFLAGS=-g
-CFLAGS=-Os -DNDEBUG
+#CFLAGS+=-g
+CFLAGS+=-Os -DNDEBUG
 inc=-I$(igl_lib)/include $(eigen)
 inc=-I$(igl_lib)/include $(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/sort/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=$(DEFAULT_PREFIX)/include/eigen3/
 eigen=$(DEFAULT_PREFIX)/include/eigen3/
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include -I$(eigen)
 inc=-I$(igl_lib)/include -I$(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/sortrows/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=$(DEFAULT_PREFIX)/include/eigen3/
 eigen=$(DEFAULT_PREFIX)/include/eigen3/
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include -I$(eigen)
 inc=-I$(igl_lib)/include -I$(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/stdin_to_temp/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -10,7 +10,7 @@ all: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 2 - 2
examples/svd/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -10,7 +10,7 @@ all: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include
 inc=-I$(igl_lib)/include
 lib=-L$(igl_lib)/lib -ligl -framework Accelerate
 lib=-L$(igl_lib)/lib -ligl -framework Accelerate
 
 

+ 2 - 2
examples/textured-mesh/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -23,7 +23,7 @@ EMBREE_LIB=-L$(EMBREE)/build -lembree -lsys
 
 
 # YIMAGE Library
 # YIMAGE Library
 YIMG=$(LIBIGL)/external/yimg/
 YIMG=$(LIBIGL)/external/yimg/
-YIMG_LIB=-L$(YIMG) -lyimg -lz -L/usr/X11/lib -lpng -bind_at_load
+YIMG_LIB=-L$(YIMG) -lyimg -lz -L/opt/local/lib -lpng -bind_at_load
 YIMG_INC=-I/usr/X11/include -I$(YIMG) 
 YIMG_INC=-I/usr/X11/include -I$(YIMG) 
 
 
 ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include
 ANTTWEAKBAR_INC=-I$(LIBIGL)/external/AntTweakBar/include

+ 2 - 2
examples/trackball/Makefile

@@ -4,13 +4,13 @@
 all: example
 all: example
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 .PHONY: example
 .PHONY: example
 
 
 igl_lib=../../
 igl_lib=../../
 
 
-CFLAGS=-g -Wall 
+CFLAGS+=-g -Wall 
 #deps=-MMD -MF depends.txt
 #deps=-MMD -MF depends.txt
 EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
 inc=-I$(igl_lib)/include $(EIGEN3_INC)
 inc=-I$(igl_lib)/include $(EIGEN3_INC)

+ 1 - 1
examples/transparency/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 

+ 2 - 2
examples/transpose_blocks/Makefile

@@ -2,7 +2,7 @@
 .PHONY: all
 .PHONY: all
 
 
 # Shared flags etc.
 # Shared flags etc.
-include ../../Makefile.conf
+include ../../build/Makefile.conf
 
 
 all: example
 all: example
 
 
@@ -11,7 +11,7 @@ all: example
 igl_lib=../../
 igl_lib=../../
 eigen=$(DEFAULT_PREFIX)/include/eigen3
 eigen=$(DEFAULT_PREFIX)/include/eigen3
 
 
-CFLAGS=-g
+CFLAGS+=-g
 inc=-I$(igl_lib)/include -I$(eigen)
 inc=-I$(igl_lib)/include -I$(eigen)
 lib=-L$(igl_lib)/lib -ligl
 lib=-L$(igl_lib)/lib -ligl
 
 

+ 1 - 1
examples/upright/Makefile

@@ -8,7 +8,7 @@ all: upright
 .PHONY: upright
 .PHONY: upright
 
 
 LIBIGL=/usr/local/igl/libigl/
 LIBIGL=/usr/local/igl/libigl/
-include $(LIBIGL)/Makefile.conf
+include $(LIBIGL)/build/Makefile.conf
 LIBIGL_INC=-I$(LIBIGL)/include
 LIBIGL_INC=-I$(LIBIGL)/include
 LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
 LIBIGL_LIB=-L$(LIBIGL)/lib -ligl
 
 

+ 2 - 2
examples/upright/example.cpp

@@ -339,7 +339,7 @@ bool save()
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   cout<<GREENGIN("Current baked model written to "+out_filename+".")<<endl;
   cout<<GREENGIN("Current baked model written to "+out_filename+".")<<endl;
@@ -502,7 +502,7 @@ int main(int argc, char * argv[])
   //  }
   //  }
   //  //if(F.size() > T.size() || F.size() == 0)
   //  //if(F.size() > T.size() || F.size() == 0)
   //  {
   //  {
-  //    boundary_faces(T,F);
+  //    boundary_facets(T,F);
   //  }
   //  }
   }
   }
   if(vV.size() > 0)
   if(vV.size() > 0)

+ 1 - 1
include/igl/EPS.cpp

@@ -25,6 +25,6 @@ template <> IGL_INLINE double igl::EPS_SQ()
   return igl::DOUBLE_EPS_SQ;
   return igl::DOUBLE_EPS_SQ;
 }
 }
 
 
-#ifndef IGL_HEADER_ONLY
+#ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
 #endif
 #endif

+ 1 - 1
include/igl/EPS.h

@@ -25,7 +25,7 @@ namespace igl
   template <> IGL_INLINE double EPS_SQ<double>();
   template <> IGL_INLINE double EPS_SQ<double>();
 }
 }
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "EPS.cpp"
 #  include "EPS.cpp"
 #endif
 #endif
 
 

+ 1 - 1
include/igl/ReAntTweakBar.h

@@ -275,7 +275,7 @@ namespace igl
 //TW_API int      TW_CALL TwRemoveVar(TwBar *bar, const char *name);
 //TW_API int      TW_CALL TwRemoveVar(TwBar *bar, const char *name);
 //TW_API int      TW_CALL TwRemoveAllVars(TwBar *bar);
 //TW_API int      TW_CALL TwRemoveAllVars(TwBar *bar);
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "ReAntTweakBar.cpp"
 #  include "ReAntTweakBar.cpp"
 #endif
 #endif
 
 

+ 1 - 1
include/igl/WindingNumberTree.h

@@ -140,7 +140,7 @@ inline igl::WindingNumberTree<Point>::WindingNumberTree(
   V(dummyV),
   V(dummyV),
   SV(),
   SV(),
   F(),
   F(),
-  //boundary(igl::boundary_faces<Eigen::MatrixXi,Eigen::MatrixXi>(F))
+  //boundary(igl::boundary_facets<Eigen::MatrixXi,Eigen::MatrixXi>(F))
   cap(),
   cap(),
   radius(std::numeric_limits<double>::infinity()),
   radius(std::numeric_limits<double>::infinity()),
   center(0,0,0)
   center(0,0,0)

+ 2 - 2
include/igl/active_set.cpp

@@ -297,7 +297,7 @@ IGL_INLINE igl::SolverStatus igl::active_set(
     slice(A,known_i,1,Ak);
     slice(A,known_i,1,Ak);
     Eigen::PlainObjectBase<DerivedB> Bk;
     Eigen::PlainObjectBase<DerivedB> Bk;
     slice(B,known_i,Bk);
     slice(B,known_i,Bk);
-    MatrixXd Lambda_known_i = -(Ak*Z + 0.5*Bk);
+    MatrixXd Lambda_known_i = -(0.5*Ak*Z + 0.5*Bk);
     // reverse the lambda values for lx
     // reverse the lambda values for lx
     Lambda_known_i.block(nk,0,as_lx_count,1) = 
     Lambda_known_i.block(nk,0,as_lx_count,1) = 
       (-1*Lambda_known_i.block(nk,0,as_lx_count,1)).eval();
       (-1*Lambda_known_i.block(nk,0,as_lx_count,1)).eval();
@@ -347,7 +347,7 @@ IGL_INLINE igl::SolverStatus igl::active_set(
 }
 }
 
 
 
 
-#ifndef IGL_HEADER_ONLY
+#ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
 template igl::SolverStatus igl::active_set<double, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, double, Eigen::Matrix<double, -1, 1, 0, -1, 1>, double, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::SparseMatrix<double, 0, int> const&, 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> > const&, Eigen::SparseMatrix<double, 0, int> const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::SparseMatrix<double, 0, int> const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, igl::active_set_params const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 template igl::SolverStatus igl::active_set<double, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, double, Eigen::Matrix<double, -1, 1, 0, -1, 1>, double, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::SparseMatrix<double, 0, int> const&, 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> > const&, Eigen::SparseMatrix<double, 0, int> const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::SparseMatrix<double, 0, int> const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> > const&, igl::active_set_params const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
 #endif
 #endif

+ 5 - 2
include/igl/active_set.h

@@ -20,7 +20,10 @@ namespace igl
   // using QR decomposition otherwise:
   // using QR decomposition otherwise:
   //   http://www.okstate.edu/sas/v8/sashtml/ormp/chap5/sect32.htm
   //   http://www.okstate.edu/sas/v8/sashtml/ormp/chap5/sect32.htm
   //
   //
-  // ACTIVE_SET Minimize quadratic energy Z'*A*Z + Z'*B + C with constraints
+  // ACTIVE_SET Minimize quadratic energy 
+  //
+  // 0.5*Z'*A*Z + Z'*B + C with constraints
+  //
   // that Z(known) = Y, optionally also subject to the constraints Aeq*Z = Beq,
   // that Z(known) = Y, optionally also subject to the constraints Aeq*Z = Beq,
   // and further optionally subject to the linear inequality constraints that
   // and further optionally subject to the linear inequality constraints that
   // Aieq*Z <= Bieq and constant inequality constraints lx <= x <= ux
   // Aieq*Z <= Bieq and constant inequality constraints lx <= x <= ux
@@ -103,7 +106,7 @@ struct igl::active_set_params
     {};
     {};
 };
 };
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "active_set.cpp"
 #  include "active_set.cpp"
 #endif
 #endif
 
 

+ 1 - 1
include/igl/adjacency_list.cpp

@@ -158,7 +158,7 @@ IGL_INLINE void igl::adjacency_list(
   
   
 }
 }
 
 
-#ifndef IGL_HEADER_ONLY
+#ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
 // generated by autoexplicit.sh
 // generated by autoexplicit.sh
 template void igl::adjacency_list<Eigen::Matrix<int, -1, -1, 0, -1, -1>, int>(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, bool);
 template void igl::adjacency_list<Eigen::Matrix<int, -1, -1, 0, -1, -1>, int>(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >&, bool);

+ 1 - 1
include/igl/adjacency_list.h

@@ -44,7 +44,7 @@ namespace igl
 
 
 }
 }
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "adjacency_list.cpp"
 #  include "adjacency_list.cpp"
 #endif
 #endif
 
 

+ 1 - 1
include/igl/adjacency_matrix.cpp

@@ -63,7 +63,7 @@ IGL_INLINE void igl::adjacency_matrix(
   }
   }
 }
 }
 
 
-#ifndef IGL_HEADER_ONLY
+#ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
 template void igl::adjacency_matrix<int>(Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::SparseMatrix<int, 0, int>&);
 template void igl::adjacency_matrix<int>(Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::SparseMatrix<int, 0, int>&);
 template void igl::adjacency_matrix<double>(Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::SparseMatrix<double, 0, int>&);
 template void igl::adjacency_matrix<double>(Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, Eigen::SparseMatrix<double, 0, int>&);

+ 1 - 1
include/igl/adjacency_matrix.h

@@ -44,7 +44,7 @@ namespace igl
     Eigen::SparseMatrix<T>& A);
     Eigen::SparseMatrix<T>& A);
 }
 }
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "adjacency_matrix.cpp"
 #  include "adjacency_matrix.cpp"
 #endif
 #endif
 
 

+ 1 - 1
include/igl/all_edges.h

@@ -27,7 +27,7 @@ namespace igl
     Eigen::MatrixXi & E);
     Eigen::MatrixXi & E);
 }
 }
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "all_edges.cpp"
 #  include "all_edges.cpp"
 #endif
 #endif
 
 

+ 1 - 1
include/igl/all_pairs_distances.cpp

@@ -32,7 +32,7 @@ IGL_INLINE void igl::all_pairs_distances(
   }
   }
 }
 }
 
 
-#ifndef IGL_HEADER_ONLY
+#ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
 // generated by autoexplicit.sh
 // generated by autoexplicit.sh
 template void igl::all_pairs_distances<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, bool, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);
 template void igl::all_pairs_distances<Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, bool, Eigen::Matrix<double, -1, -1, 0, -1, -1>&);

+ 1 - 1
include/igl/all_pairs_distances.h

@@ -34,7 +34,7 @@ namespace igl
     Mat & D);
     Mat & D);
 }
 }
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "all_pairs_distances.cpp"
 #  include "all_pairs_distances.cpp"
 #endif
 #endif
 
 

+ 1 - 1
include/igl/angular_distance.h

@@ -23,7 +23,7 @@ namespace igl
     const Eigen::Quaterniond & B);
     const Eigen::Quaterniond & B);
 }
 }
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #include "angular_distance.cpp"
 #include "angular_distance.cpp"
 #endif
 #endif
 
 

+ 1 - 1
include/igl/any_of.cpp

@@ -13,7 +13,7 @@ IGL_INLINE bool igl::any_of(const Mat & S)
   return std::any_of(S.data(),S.data()+S.size(),[](bool s){return s;});
   return std::any_of(S.data(),S.data()+S.size(),[](bool s){return s;});
 }
 }
 
 
-#ifndef IGL_HEADER_ONLY
+#ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
 template bool igl::any_of<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::Matrix<int, -1, 1, 0, -1, 1> const&);
 template bool igl::any_of<Eigen::Matrix<int, -1, 1, 0, -1, 1> >(Eigen::Matrix<int, -1, 1, 0, -1, 1> const&);
 #endif
 #endif

+ 1 - 1
include/igl/any_of.h

@@ -18,7 +18,7 @@ namespace igl
   template <typename Mat>
   template <typename Mat>
   IGL_INLINE bool any_of(const Mat & S);
   IGL_INLINE bool any_of(const Mat & S);
 }
 }
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "any_of.cpp"
 #  include "any_of.cpp"
 #endif
 #endif
 #endif
 #endif

+ 5 - 5
include/igl/arap_linear_block.cpp

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "arap_linear_block.h"
 #include "arap_linear_block.h"
 #include "verbose.h"
 #include "verbose.h"
-#include "cotangent.h"
+#include "cotmatrix_entries.h"
 #include <Eigen/Dense>
 #include <Eigen/Dense>
 
 
 template <typename MatV, typename MatF, typename Scalar>
 template <typename MatV, typename MatF, typename Scalar>
@@ -81,7 +81,7 @@ IGL_INLINE void igl::arap_linear_block_spokes(
   }
   }
   // gather cotangent weights
   // gather cotangent weights
   Matrix<Scalar,Dynamic,Dynamic> C;
   Matrix<Scalar,Dynamic,Dynamic> C;
-  cotangent(V,F,C);
+  cotmatrix_entries(V,F,C);
   // should have weights for each edge
   // should have weights for each edge
   assert(C.cols() == edges.rows());
   assert(C.cols() == edges.rows());
   // loop over elements
   // loop over elements
@@ -149,7 +149,7 @@ IGL_INLINE void igl::arap_linear_block_spokes_and_rims(
   }
   }
   // gather cotangent weights
   // gather cotangent weights
   Matrix<Scalar,Dynamic,Dynamic> C;
   Matrix<Scalar,Dynamic,Dynamic> C;
-  cotangent(V,F,C);
+  cotmatrix_entries(V,F,C);
   // should have weights for each edge
   // should have weights for each edge
   assert(C.cols() == edges.rows());
   assert(C.cols() == edges.rows());
   // loop over elements
   // loop over elements
@@ -230,7 +230,7 @@ IGL_INLINE void igl::arap_linear_block_elements(
   }
   }
   // gather cotangent weights
   // gather cotangent weights
   Matrix<Scalar,Dynamic,Dynamic> C;
   Matrix<Scalar,Dynamic,Dynamic> C;
-  cotangent(V,F,C);
+  cotmatrix_entries(V,F,C);
   // should have weights for each edge
   // should have weights for each edge
   assert(C.cols() == edges.rows());
   assert(C.cols() == edges.rows());
   // loop over elements
   // loop over elements
@@ -251,7 +251,7 @@ IGL_INLINE void igl::arap_linear_block_elements(
 }
 }
 
 
 
 
-#ifndef IGL_HEADER_ONLY
+#ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
 // Explicit template specialization
 template IGL_INLINE void igl::arap_linear_block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double>(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, int, igl::ARAPEnergyType, Eigen::SparseMatrix<double, 0, int>&);
 template IGL_INLINE void igl::arap_linear_block<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, double>(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<int, -1, -1, 0, -1, -1> const&, int, igl::ARAPEnergyType, Eigen::SparseMatrix<double, 0, int>&);
 #endif
 #endif

+ 1 - 1
include/igl/arap_linear_block.h

@@ -71,7 +71,7 @@ namespace igl
     Eigen::SparseMatrix<Scalar> & Kd);
     Eigen::SparseMatrix<Scalar> & Kd);
 }
 }
 
 
-#ifdef IGL_HEADER_ONLY
+#ifndef IGL_STATIC_LIBRARY
 #  include "arap_linear_block.cpp"
 #  include "arap_linear_block.cpp"
 #endif
 #endif
 
 

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