Browse Source

replaced static tutorial_shared_path string with #define

Former-commit-id: bd37fbf7c1b58caa283243cf0c691af9e529f588
Daniel Crispell 9 years ago
parent
commit
6eae3ca6b0
51 changed files with 70 additions and 79 deletions
  1. 1 1
      tutorial/101_FileIO/main.cpp
  2. 1 1
      tutorial/102_DrawMesh/main.cpp
  3. 2 2
      tutorial/103_Events/main.cpp
  4. 1 1
      tutorial/104_Colors/main.cpp
  5. 1 1
      tutorial/105_Overlays/main.cpp
  6. 1 1
      tutorial/106_ViewerMenu/main.cpp
  7. 1 1
      tutorial/201_Normals/main.cpp
  8. 1 1
      tutorial/202_GaussianCurvature/main.cpp
  9. 1 1
      tutorial/203_CurvatureDirections/main.cpp
  10. 2 2
      tutorial/204_Gradient/main.cpp
  11. 1 1
      tutorial/205_Laplacian/main.cpp
  12. 1 1
      tutorial/301_Slice/main.cpp
  13. 1 1
      tutorial/302_Sort/main.cpp
  14. 1 1
      tutorial/303_LaplaceEquation/main.cpp
  15. 1 1
      tutorial/304_LinearEqualityConstraints/main.cpp
  16. 1 1
      tutorial/305_QuadraticProgramming/main.cpp
  17. 1 1
      tutorial/306_EigenDecomposition/main.cpp
  18. 2 2
      tutorial/401_BiharmonicDeformation/main.cpp
  19. 1 1
      tutorial/402_PolyharmonicDeformation/main.cpp
  20. 3 3
      tutorial/403_BoundedBiharmonicWeights/main.cpp
  21. 3 3
      tutorial/404_DualQuaternionSkinning/main.cpp
  22. 2 2
      tutorial/405_AsRigidAsPossible/main.cpp
  23. 2 2
      tutorial/406_FastAutomaticSkinningTransformations/main.cpp
  24. 2 2
      tutorial/407_BiharmonicCoordinates/main.cpp
  25. 1 1
      tutorial/501_HarmonicParam/main.cpp
  26. 1 1
      tutorial/502_LSCMParam/main.cpp
  27. 1 1
      tutorial/503_ARAPParam/main.cpp
  28. 1 1
      tutorial/504_NRosyDesign/main.cpp
  29. 1 1
      tutorial/505_MIQ/main.cpp
  30. 2 2
      tutorial/506_FrameField/main.cpp
  31. 2 2
      tutorial/507_PolyVectorField/main.cpp
  32. 3 3
      tutorial/508_ConjugateField/main.cpp
  33. 1 1
      tutorial/509_Planarization/main.cpp
  34. 1 1
      tutorial/510_Integrable/main.cpp
  35. 1 1
      tutorial/601_Serialization/main.cpp
  36. 1 1
      tutorial/602_Matlab/main.cpp
  37. 1 1
      tutorial/605_Tetgen/main.cpp
  38. 1 1
      tutorial/606_AmbientOcclusion/main.cpp
  39. 1 1
      tutorial/607_Picking/main.cpp
  40. 1 1
      tutorial/608_LIM/main.cpp
  41. 2 2
      tutorial/609_Boolean/main.cpp
  42. 5 5
      tutorial/610_CSGTree/main.cpp
  43. 1 1
      tutorial/701_Statistics/main.cpp
  44. 1 1
      tutorial/702_WindingNumber/main.cpp
  45. 1 1
      tutorial/703_Decimation/main.cpp
  46. 1 1
      tutorial/704_SignedDistance/main.cpp
  47. 1 1
      tutorial/705_MarchingCubes/main.cpp
  48. 1 1
      tutorial/CMakeLists.txt
  49. 1 1
      tutorial/tutorial.html.REMOVED.git-id
  50. 1 1
      tutorial/tutorial.md.REMOVED.git-id
  51. 1 10
      tutorial/tutorial_shared_path.h

+ 1 - 1
tutorial/101_FileIO/main.cpp

@@ -9,7 +9,7 @@ Eigen::MatrixXi F;
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/cube.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH  "/cube.off", V, F);
 
   // Print the vertices and faces matrices
   std::cout << "Vertices: " << std::endl << V << std::endl;

+ 1 - 1
tutorial/102_DrawMesh/main.cpp

@@ -8,7 +8,7 @@ Eigen::MatrixXi F;
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/bunny.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/bunny.off", V, F);
 
   // Plot the mesh
   igl::viewer::Viewer viewer;

+ 2 - 2
tutorial/103_Events/main.cpp

@@ -34,8 +34,8 @@ bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier)
 int main(int argc, char *argv[])
 {
   // Load two meshes
-  igl::readOFF(tutorial_shared_path + "/bumpy.off", V1, F1);
-  igl::readOFF(tutorial_shared_path + "/fertility.off", V2, F2);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/bumpy.off", V1, F1);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/fertility.off", V2, F2);
   std::cout<<R"(
 1 Switch to bump mesh
 2 Switch to fertility mesh

+ 1 - 1
tutorial/104_Colors/main.cpp

@@ -10,7 +10,7 @@ Eigen::MatrixXd C;
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/screwdriver.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/screwdriver.off", V, F);
 
   // Plot the mesh
   igl::viewer::Viewer viewer;

+ 1 - 1
tutorial/105_Overlays/main.cpp

@@ -9,7 +9,7 @@ Eigen::MatrixXi F;
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/bunny.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/bunny.off", V, F);
 
   // Find the bounding box
   Eigen::Vector3d m = V.colwise().minCoeff();

+ 1 - 1
tutorial/106_ViewerMenu/main.cpp

@@ -14,7 +14,7 @@ float floatVariable = 0.1f;
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/bunny.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/bunny.off", V, F);
 
   // Init the viewer
   igl::viewer::Viewer viewer;

+ 1 - 1
tutorial/201_Normals/main.cpp

@@ -36,7 +36,7 @@ bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier)
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/fandisk.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/fandisk.off", V, F);
 
   // Compute per-face normals
   igl::per_face_normals(V,F,N_faces);

+ 1 - 1
tutorial/202_GaussianCurvature/main.cpp

@@ -10,7 +10,7 @@ int main(int argc, char *argv[])
   using namespace std;
   MatrixXd V;
   MatrixXi F;
-  igl::readOFF(tutorial_shared_path + "/bumpy.off",V,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/bumpy.off",V,F);
 
   VectorXd K;
   igl::gaussian_curvature(V,F,K);

+ 1 - 1
tutorial/203_CurvatureDirections/main.cpp

@@ -17,7 +17,7 @@ Eigen::MatrixXi F;
 int main(int argc, char *argv[])
 {
   using namespace Eigen;
-  std::string filename = tutorial_shared_path + "/fertility.off";
+  std::string filename = TUTORIAL_SHARED_PATH "/fertility.off";
   if(argc>1)
   {
     filename = argv[1];

+ 2 - 2
tutorial/204_Gradient/main.cpp

@@ -17,11 +17,11 @@ int main(int argc, char *argv[])
   MatrixXi F;
 
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/cheburashka.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/cheburashka.off", V, F);
 
   // Read scalar function values from a file, U: #V by 1
   VectorXd U;
-  igl::readDMAT(tutorial_shared_path + "/cheburashka-scalar.dmat",U);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/cheburashka-scalar.dmat",U);
 
   // Compute gradient operator: #F*3 by #V
   SparseMatrix<double> G;

+ 1 - 1
tutorial/205_Laplacian/main.cpp

@@ -24,7 +24,7 @@ int main(int argc, char *argv[])
   using namespace std;
 
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/cow.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/cow.off", V, F);
 
   // Compute Laplace-Beltrami operator: #V by #V
   igl::cotmatrix(V,F,L);

+ 1 - 1
tutorial/301_Slice/main.cpp

@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
   using namespace std;
   MatrixXd V;
   MatrixXi F;
-  igl::readOFF(tutorial_shared_path + "/decimated-knight.off",V,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/decimated-knight.off",V,F);
 
   // 100 random indicies into rows of F
   VectorXi I;

+ 1 - 1
tutorial/302_Sort/main.cpp

@@ -14,7 +14,7 @@ int main(int argc, char *argv[])
   using namespace std;
   MatrixXd V;
   MatrixXi F;
-  igl::readOFF(tutorial_shared_path + "/decimated-knight.off",V,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/decimated-knight.off",V,F);
 
   // Sort barycenters lexicographically
   MatrixXd BC,sorted_BC;

+ 1 - 1
tutorial/303_LaplaceEquation/main.cpp

@@ -19,7 +19,7 @@ int main(int argc, char *argv[])
   using namespace std;
   MatrixXd V;
   MatrixXi F;
-  igl::readOFF(tutorial_shared_path + "/camelhead.off",V,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/camelhead.off",V,F);
   // Find boundary edges
   MatrixXi E;
   igl::boundary_facets(F,E);

+ 1 - 1
tutorial/304_LinearEqualityConstraints/main.cpp

@@ -16,7 +16,7 @@ int main(int argc, char *argv[])
   using namespace std;
   MatrixXd V;
   MatrixXi F;
-  igl::readOFF(tutorial_shared_path + "/cheburashka.off",V,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/cheburashka.off",V,F);
 
   // Two fixed points
   VectorXi b(2,1);

+ 1 - 1
tutorial/305_QuadraticProgramming/main.cpp

@@ -53,7 +53,7 @@ int main(int argc, char *argv[])
   using namespace std;
   MatrixXd V;
   MatrixXi F;
-  igl::readOFF(tutorial_shared_path + "/cheburashka.off",V,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/cheburashka.off",V,F);
 
   // Plot the mesh
   igl::viewer::Viewer viewer;

+ 1 - 1
tutorial/306_EigenDecomposition/main.cpp

@@ -20,7 +20,7 @@ int main(int argc, char * argv[])
   using namespace std;
   using namespace igl;
   VectorXd D;
-  if(!read_triangle_mesh(tutorial_shared_path + "/beetle.off",V,F))
+  if(!read_triangle_mesh(TUTORIAL_SHARED_PATH "/beetle.off",V,F))
   {
     cout<<"failed to load mesh"<<endl;
   }

+ 2 - 2
tutorial/401_BiharmonicDeformation/main.cpp

@@ -60,11 +60,11 @@ int main(int argc, char *argv[])
 {
   using namespace Eigen;
   using namespace std;
-  igl::readOBJ(tutorial_shared_path + "/decimated-max.obj",V,F);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/decimated-max.obj",V,F);
   U=V;
   // S(i) = j: j<0 (vertex i not in handle), j >= 0 (vertex i in handle j)
   VectorXi S;
-  igl::readDMAT(tutorial_shared_path + "/decimated-max-selection.dmat",S);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/decimated-max-selection.dmat",S);
   igl::colon<int>(0,V.rows()-1,b);
   b.conservativeResize(stable_partition( b.data(), b.data()+b.size(), 
    [&S](int i)->bool{return S(i)>=0;})-b.data());

+ 1 - 1
tutorial/402_PolyharmonicDeformation/main.cpp

@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
 {
   using namespace Eigen;
   using namespace std;
-  igl::readOBJ(tutorial_shared_path + "/bump-domain.obj",V,F);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/bump-domain.obj",V,F);
   U=V;
   // Find boundary vertices outside annulus
   typedef Matrix<bool,Dynamic,1> VectorXb;

+ 3 - 3
tutorial/403_BoundedBiharmonicWeights/main.cpp

@@ -120,15 +120,15 @@ int main(int argc, char *argv[])
 {
   using namespace Eigen;
   using namespace std;
-  igl::readMESH(tutorial_shared_path + "/hand.mesh",V,T,F);
+  igl::readMESH(TUTORIAL_SHARED_PATH "/hand.mesh",V,T,F);
   U=V;
-  igl::readTGF(tutorial_shared_path + "/hand.tgf",C,BE);
+  igl::readTGF(TUTORIAL_SHARED_PATH "/hand.tgf",C,BE);
   // retrieve parents for forward kinematics
   igl::directed_edge_parents(BE,P);
 
   // Read pose as matrix of quaternions per row
   MatrixXd Q;
-  igl::readDMAT(tutorial_shared_path + "/hand-pose.dmat",Q);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/hand-pose.dmat",Q);
   igl::column_to_quats(Q,pose);
   assert(pose.size() == BE.rows());
 

+ 3 - 3
tutorial/404_DualQuaternionSkinning/main.cpp

@@ -112,9 +112,9 @@ int main(int argc, char *argv[])
 {
   using namespace Eigen;
   using namespace std;
-  igl::readOBJ(tutorial_shared_path + "/arm.obj",V,F);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/arm.obj",V,F);
   U=V;
-  igl::readTGF(tutorial_shared_path + "/arm.tgf",C,BE);
+  igl::readTGF(TUTORIAL_SHARED_PATH "/arm.tgf",C,BE);
   // retrieve parents for forward kinematics
   igl::directed_edge_parents(BE,P);
   RotationList rest_pose;
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
   const Quaterniond bend(AngleAxisd(-igl::PI*0.7,Vector3d(0,0,1)));
   poses[3][2] = rest_pose[2]*bend*rest_pose[2].conjugate();
 
-  igl::readDMAT(tutorial_shared_path + "/arm-weights.dmat",W);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/arm-weights.dmat",W);
   igl::lbs_matrix(V,W,M);
 
   // Plot the mesh with pseudocolors

+ 2 - 2
tutorial/405_AsRigidAsPossible/main.cpp

@@ -92,9 +92,9 @@ int main(int argc, char *argv[])
 {
   using namespace Eigen;
   using namespace std;
-  igl::readOFF(tutorial_shared_path + "/decimated-knight.off",V,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/decimated-knight.off",V,F);
   U=V;
-  igl::readDMAT(tutorial_shared_path + "/decimated-knight-selection.dmat",S);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/decimated-knight-selection.dmat",S);
 
   // vertices in selection
   igl::colon<int>(0,V.rows()-1,b);

+ 2 - 2
tutorial/406_FastAutomaticSkinningTransformations/main.cpp

@@ -144,10 +144,10 @@ int main(int argc, char *argv[])
 {
   using namespace Eigen;
   using namespace std;
-  igl::readOBJ(tutorial_shared_path + "/armadillo.obj",V,F);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/armadillo.obj",V,F);
   U=V;
   MatrixXd W;
-  igl::readDMAT(tutorial_shared_path + "/armadillo-weights.dmat",W);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/armadillo-weights.dmat",W);
   igl::lbs_matrix_column(V,W,M);
 
   // Cluster according to weights

+ 2 - 2
tutorial/407_BiharmonicCoordinates/main.cpp

@@ -32,11 +32,11 @@ int main(int argc, char * argv[])
   using namespace Eigen;
   using namespace std;
   using namespace igl;
-  if(!readMESH(tutorial_shared_path + "/octopus-low.mesh",low.V,low.T,low.F))
+  if(!readMESH(TUTORIAL_SHARED_PATH "/octopus-low.mesh",low.V,low.T,low.F))
   {
     cout<<"failed to load mesh"<<endl;
   }
-  if(!readMESH(tutorial_shared_path + "/octopus-high.mesh",high.V,high.T,high.F))
+  if(!readMESH(TUTORIAL_SHARED_PATH "/octopus-high.mesh",high.V,high.T,high.F))
   {
     cout<<"failed to load mesh"<<endl;
   }

+ 1 - 1
tutorial/501_HarmonicParam/main.cpp

@@ -33,7 +33,7 @@ bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier)
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/camelhead.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/camelhead.off", V, F);
 
   // Find the open boundary
   Eigen::VectorXi bnd;

+ 1 - 1
tutorial/502_LSCMParam/main.cpp

@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
   using namespace std;
 
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/camelhead.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/camelhead.off", V, F);
 
   // Fix two points on the boundary
   VectorXi bnd,b(2,1);

+ 1 - 1
tutorial/503_ARAPParam/main.cpp

@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
 {
   using namespace std;
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/camelhead.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/camelhead.off", V, F);
 
   // Compute the initial solution for ARAP (harmonic parametrization)
   Eigen::VectorXi bnd;

+ 1 - 1
tutorial/504_NRosyDesign/main.cpp

@@ -123,7 +123,7 @@ int main(int argc, char *argv[])
   using namespace Eigen;
 
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/bumpy.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/bumpy.off", V, F);
 
   // Threshold faces with high anisotropy
   b.resize(1);

+ 1 - 1
tutorial/505_MIQ/main.cpp

@@ -232,7 +232,7 @@ int main(int argc, char *argv[])
   using namespace Eigen;
 
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/3holes.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/3holes.off", V, F);
 
   // Compute face barycenters
   igl::barycenter(V, F, B);

+ 2 - 2
tutorial/506_FrameField/main.cpp

@@ -179,7 +179,7 @@ int main(int argc, char *argv[])
   using namespace Eigen;
 
   // Load a mesh in OBJ format
-  igl::readOBJ(tutorial_shared_path + "/bumpy-cube.obj", V, F);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/bumpy-cube.obj", V, F);
 
   // Compute face barycenters
   igl::barycenter(V, F, B);
@@ -189,7 +189,7 @@ int main(int argc, char *argv[])
 
   // Load constraints
   MatrixXd temp;
-  igl::readDMAT(tutorial_shared_path + "/bumpy-cube.dmat",temp);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/bumpy-cube.dmat",temp);
 
   b   = temp.block(0,0,temp.rows(),1).cast<int>();
   bc1 = temp.block(0,1,temp.rows(),3);

+ 2 - 2
tutorial/507_PolyVectorField/main.cpp

@@ -129,8 +129,8 @@ int main(int argc, char *argv[])
   using namespace Eigen;
   using namespace std;
   // Load a mesh in OBJ format
-  igl::readOBJ(tutorial_shared_path + "/lilium.obj", V, F);
-  readSamples(tutorial_shared_path + "/lilium.samples.0.2", samples);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/lilium.obj", V, F);
+  readSamples(TUTORIAL_SHARED_PATH "/lilium.samples.0.2", samples);
 
   // Compute local basis for faces
   igl::local_basis(V,F,B1,B2,B3);

+ 3 - 3
tutorial/508_ConjugateField/main.cpp

@@ -124,7 +124,7 @@ int main(int argc, char *argv[])
   using namespace std;
 
   // Load a mesh in OBJ format
-  igl::readOBJ(tutorial_shared_path + "/inspired_mesh.obj", V, F);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/inspired_mesh.obj", V, F);
   // Compute face barycenters
   igl::barycenter(V, F, B);
 
@@ -136,8 +136,8 @@ int main(int argc, char *argv[])
   global_scale =  .4*igl::avg_edge_length(V, F);
 
   // Load constraints
-  igl::readDMAT(tutorial_shared_path + "/inspired_mesh_b.dmat",b);
-  igl::readDMAT(tutorial_shared_path + "/inspired_mesh_bc.dmat",bc);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/inspired_mesh_b.dmat",b);
+  igl::readDMAT(TUTORIAL_SHARED_PATH "/inspired_mesh_bc.dmat",bc);
 
   // Interpolate to get a smooth field
   igl::n_polyvector(V, F, b, bc, smooth_pvf);

+ 1 - 1
tutorial/509_Planarization/main.cpp

@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
   using namespace std;
 
   // Load a quad mesh generated by a conjugate field
-  igl::readOFF(tutorial_shared_path + "/inspired_mesh_quads_Conjugate.off", VQC, FQC);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/inspired_mesh_quads_Conjugate.off", VQC, FQC);
 
   // Convert it in a triangle mesh
   FQCtri.resize(2*FQC.rows(), 3);

+ 1 - 1
tutorial/510_Integrable/main.cpp

@@ -627,7 +627,7 @@ int main(int argc, char *argv[])
 {
 
   // Load a mesh
-  igl::readOBJ(tutorial_shared_path + "/inspired_mesh.obj", V, F);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/inspired_mesh.obj", V, F);
 
   printf("--Initialization--\n");
   V_border = igl::is_border_vertex(V,F);

+ 1 - 1
tutorial/601_Serialization/main.cpp

@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
   State stateIn, stateOut;
 
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/2triangles.off",stateIn.V,stateIn.F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/2triangles.off",stateIn.V,stateIn.F);
 
   // Save some integers in a vector
   stateIn.ids.push_back(6);

+ 1 - 1
tutorial/602_Matlab/main.cpp

@@ -47,7 +47,7 @@ bool key_down(igl::viewer::Viewer& viewer, unsigned char key, int modifier)
 int main(int argc, char *argv[])
 {
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/3holes.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/3holes.off", V, F);
 
   // Launch MATLAB
   igl::matlab::mlinit(&engine);

+ 1 - 1
tutorial/605_Tetgen/main.cpp

@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
   using namespace std;
 
   // Load a surface mesh
-  igl::readOFF(tutorial_shared_path + "/fertility.off",V,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/fertility.off",V,F);
 
   // Tetrahedralize the interior
   igl::tetgen::tetrahedralize(V,F,"pq1.414Y", TV,TT,TF);

+ 1 - 1
tutorial/606_AmbientOcclusion/main.cpp

@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
     "Press , to turn down lighting"<<endl;
 
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/fertility.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/fertility.off", V, F);
 
   MatrixXd N;
   igl::per_vertex_normals(V,F,N);

+ 1 - 1
tutorial/607_Picking/main.cpp

@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
   using namespace Eigen;
   using namespace std;
   // Load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/fertility.off", V, F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/fertility.off", V, F);
 
   // Create a BVH for raycasting
   ei = new igl::embree::EmbreeIntersector();

+ 1 - 1
tutorial/608_LIM/main.cpp

@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
   barriersEnabled = true;
 
   // load a mesh in OFF format
-  igl::readOFF(tutorial_shared_path + "/grid.off",V0,F);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/grid.off",V0,F);
   V1 = V0;
 
   // find bottom and left boundary vertices

+ 2 - 2
tutorial/609_Boolean/main.cpp

@@ -77,8 +77,8 @@ int main(int argc, char *argv[])
 {
   using namespace Eigen;
   using namespace std;
-  igl::readOFF(tutorial_shared_path + "/cheburashka.off",VA,FA);
-  igl::readOFF(tutorial_shared_path + "/decimated-knight.off",VB,FB);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/cheburashka.off",VA,FA);
+  igl::readOFF(TUTORIAL_SHARED_PATH "/decimated-knight.off",VB,FB);
   // Plot the mesh with pseudocolors
   igl::viewer::Viewer viewer;
 

+ 5 - 5
tutorial/610_CSGTree/main.cpp

@@ -15,11 +15,11 @@ int main(int argc, char * argv[])
   MatrixXi FA,FB,FC,FD,FE;
   MatrixXd VA,VB,VC,VD,VE;
   // Read in inputs as double precision floating point meshes
-  read_triangle_mesh(tutorial_shared_path + "/cube.obj"     ,VA,FA);
-  read_triangle_mesh(tutorial_shared_path + "/sphere.obj"   ,VB,FB);
-  read_triangle_mesh(tutorial_shared_path + "/xcylinder.obj",VC,FC);
-  read_triangle_mesh(tutorial_shared_path + "/ycylinder.obj",VD,FD);
-  read_triangle_mesh(tutorial_shared_path + "/zcylinder.obj",VE,FE);
+  read_triangle_mesh(TUTORIAL_SHARED_PATH "/cube.obj"     ,VA,FA);
+  read_triangle_mesh(TUTORIAL_SHARED_PATH "/sphere.obj"   ,VB,FB);
+  read_triangle_mesh(TUTORIAL_SHARED_PATH "/xcylinder.obj",VC,FC);
+  read_triangle_mesh(TUTORIAL_SHARED_PATH "/ycylinder.obj",VD,FD);
+  read_triangle_mesh(TUTORIAL_SHARED_PATH "/zcylinder.obj",VE,FE);
   igl::viewer::Viewer viewer;
 
   int num_views = 5+4;

+ 1 - 1
tutorial/701_Statistics/main.cpp

@@ -15,7 +15,7 @@ int main(int argc, char *argv[])
   MatrixXd V;
   MatrixXi F;
 
-  igl::readOBJ(tutorial_shared_path + "/horse_quad.obj",V,F);
+  igl::readOBJ(TUTORIAL_SHARED_PATH "/horse_quad.obj",V,F);
 
   // Count the number of irregular vertices, the border is ignored
   vector<bool> irregular = igl::is_irregular_vertex(V,F);

+ 1 - 1
tutorial/702_WindingNumber/main.cpp

@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
 
   // Load mesh: (V,T) tet-mesh of convex hull, F contains facets of input
   // surface mesh _after_ self-intersection resolution
-  igl::readMESH(tutorial_shared_path + "/big-sigcat.mesh",V,T,F);
+  igl::readMESH(TUTORIAL_SHARED_PATH "/big-sigcat.mesh",V,T,F);
 
   // Compute barycenters of all tets
   igl::barycenter(V,T,BC);

+ 1 - 1
tutorial/703_Decimation/main.cpp

@@ -18,7 +18,7 @@ int main(int argc, char * argv[])
   cout<<"  [space]  toggle animation."<<endl;
   cout<<"  'r'  reset."<<endl;
   // Load a closed manifold mesh
-  string filename(tutorial_shared_path + "/fertility.off");
+  string filename(TUTORIAL_SHARED_PATH "/fertility.off");
   if(argc>=2)
   {
     filename = argv[1];

+ 1 - 1
tutorial/704_SignedDistance/main.cpp

@@ -129,7 +129,7 @@ int main(int argc, char *argv[])
 
   // Load mesh: (V,T) tet-mesh of convex hull, F contains original surface
   // triangles
-  igl::readMESH(tutorial_shared_path + "/bunny.mesh",V,T,F);
+  igl::readMESH(TUTORIAL_SHARED_PATH "/bunny.mesh",V,T,F);
 
 
   // Encapsulated call to point_mesh_squared_distance to determine bounds

+ 1 - 1
tutorial/705_MarchingCubes/main.cpp

@@ -16,7 +16,7 @@ int main(int argc, char * argv[])
   MatrixXd V;
   // Read in inputs as double precision floating point meshes
   read_triangle_mesh(
-      tutorial_shared_path + "/armadillo.obj",V,F);
+      TUTORIAL_SHARED_PATH "/armadillo.obj",V,F);
   // number of vertices on the largest side
   const int s = 50;
   const RowVector3d Vmin = V.colwise().minCoeff();

+ 1 - 1
tutorial/CMakeLists.txt

@@ -136,7 +136,7 @@ endif(UNIX AND NOT APPLE)
 
 # Store location of tutorial/shared directory 
 set(TUTORIAL_SHARED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/shared CACHE PATH "location of shared tutorial resources")
-add_definitions("-DTUTORIAL_SHARED_PATH=${TUTORIAL_SHARED_PATH}")
+add_definitions("-DTUTORIAL_SHARED_PATH=\"${TUTORIAL_SHARED_PATH}\"")
 
 # Chapter 1
 add_subdirectory("101_FileIO")

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

@@ -1 +1 @@
-c858c1ee55464a76a0ef503f2b5ad2f9b56a6ae0
+5d18dcc0e2feb40028d7020f495e49d98bc1c2ad

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

@@ -1 +1 @@
-eca42bfd1c4e3c4113cb4cb5757d2a23983afd3d
+c0ffc6e9eb789fa6a16600e75558bb32c021af94

+ 1 - 10
tutorial/tutorial_shared_path.h

@@ -1,17 +1,8 @@
 #ifndef tutorial_shared_path_h_included
 #define tutorial_shared_path_h_included
 
-// convert the argument to a string constant
-#define STRINGIZE2(s) #s
-// need an extra level of macro indirection for preprocessor token stringification to work
-#define STRINGIZE(s) STRINGIZE2(s)
-
-#include <string>
-
 #ifndef TUTORIAL_SHARED_PATH
-const std::string tutorial_shared_path("../shared");
-#else
-const std::string tutorial_shared_path( STRINGIZE(TUTORIAL_SHARED_PATH) );
+#define TUTORIAL_SHARED_PATH "../shared"
 #endif
 
 #endif