Эх сурвалжийг харах

triangle_wrapper -> triangulate

Former-commit-id: 5f6715204baba7b9fe2069c5b6f4c7c6ebdece5c
Daniele Panozzo 11 жил өмнө
parent
commit
78edcb4470

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

@@ -3,7 +3,7 @@
 #include <igl/matlab/mexStream.h>
 #include <igl/embree/ambient_occlusion.h>
 
-#include <igl/read.h>
+#include <igl/read_triangle_mesh.h>
 #include <igl/per_vertex_normals.h>
 
 #include <mex.h>

+ 3 - 3
examples/basic_topology/example1.cpp

@@ -8,9 +8,9 @@
 
 #include <iostream>
 #include <string>
-#include <igl/read.h>
-#include <igl/write.h>
-#include <igl/tt.h>
+#include <igl/read_triangle_mesh.h>
+#include <igl/write_triangle_mesh.h>
+#include <igl/triangle_triangle_adjacency.h>
 #include <igl/edgetopology.h>
 
 using namespace std;

+ 1 - 1
examples/embree/example.cpp

@@ -1,7 +1,7 @@
 #include <igl/embree/EmbreeIntersector.h>
 #include <igl/OpenGL_convenience.h>
 #include <igl/per_face_normals.h>
-#include <igl/read.h>
+#include <igl/read_triangle_mesh.h>
 #include <igl/normalize_row_lengths.h>
 #include <igl/draw_mesh.h>
 #include <igl/draw_floor.h>

+ 1 - 1
examples/multi-viewport/example.cpp

@@ -1,6 +1,6 @@
 #include <igl/OpenGL_convenience.h>
 #include <igl/per_face_normals.h>
-#include <igl/read.h>
+#include <igl/read_triangle_mesh.h>
 #include <igl/normalize_row_lengths.h>
 #include <igl/draw_mesh.h>
 #include <igl/unproject.h>

+ 1 - 1
examples/patches/example.cpp

@@ -28,7 +28,7 @@
 #include <igl/embree/orient_outward_ao.h>
 #include <igl/unique_simplices.h>
 #include <igl/C_STR.h>
-#include <igl/write.h>
+#include <igl/write_triangle_mesh.h>
 #include <igl/two_axis_valuator_fixed_up.h>
 #include <igl/snap_to_fixed_up.h>
 

+ 1 - 1
examples/principal_curvature/curvature.cpp

@@ -1,7 +1,7 @@
 
 #define IGL_HEADER_ONLY
 #include <igl/principal_curvature.h>
-#include <igl/read.h>
+#include <igl/read_triangle_mesh.h>
 #include <iostream>
 #include <Eigen/Dense>
 #include <Eigen/Sparse>

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

@@ -15,7 +15,7 @@ extern "C" {
 #include <igl/readOBJ.h>
 #include <igl/readSTL.h>
 #include <igl/readWRL.h>
-#include <igl/triangulate.h>
+#include <igl/polygon_mesh_to_triangle_mesh.h>
 #include <igl/readOFF.h>
 #include <igl/readMESH.h>
 #include <igl/boundary_faces.h>
@@ -405,7 +405,7 @@ bool render_to_buffer(
       red(width,height,buffer);
       return false;
     }
-    triangulate(vF,F);
+    polygon_mesh_to_triangle_mesh(vF,F);
   }
   cout<<"IO: "<<(get_seconds()-ts)<<"s"<<endl;
   ts = get_seconds();
@@ -455,7 +455,7 @@ bool render_to_buffer(
     red(width,height,buffer);
     return false;
   }
-    
+
   // Render
   init_viewports();
   reshape(width,height);
@@ -465,6 +465,6 @@ bool render_to_buffer(
 
   /* destroy the context */
   OSMesaDestroyContext( ctx );
-  
+
   return true;
 }

+ 1 - 1
examples/shadow-mapping/example.cpp

@@ -31,7 +31,7 @@
 //#include <igl/embree/orient_outward_ao.h>
 #include <igl/unique_simplices.h>
 #include <igl/C_STR.h>
-#include <igl/write.h>
+#include <igl/write_triangle_mesh.h>
 
 #include <Eigen/Core>
 #include <Eigen/Geometry>

+ 1 - 1
examples/transparency/example.cpp

@@ -1,6 +1,6 @@
 #include <igl/OpenGL_convenience.h>
 #include <igl/per_face_normals.h>
-#include <igl/read.h>
+#include <igl/read_triangle_mesh.h>
 #include <igl/normalize_row_lengths.h>
 #include <igl/draw_mesh.h>
 #include <igl/jet.h>

+ 6 - 6
include/igl/IO

@@ -1,14 +1,14 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_IO
 #define IGL_IO
 // Input and output functions
-#include "read.h"
+#include "read_triangle_mesh.h"
 #include "readDMAT.h"
 #include "readMESH.h"
 #include "readNODE.h"
@@ -18,7 +18,7 @@
 #include "readWRL.h"
 #include "readCSV.h"
 #include "file_contents_as_string.h"
-#include "write.h"
+#include "write_triangle_mesh.h"
 #include "writeDMAT.h"
 #include "writeMESH.h"
 #include "writeOBJ.h"

+ 2 - 2
include/igl/triangle/triangle_wrapper.cpp → include/igl/triangle/triangulate.cpp

@@ -5,7 +5,7 @@
 // This Source Code Form is subject to the terms of the Mozilla Public License
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
-#include "triangle_wrapper.h"
+#include "triangulate.h"
 #define REAL double
 #define VOID int
 
@@ -14,7 +14,7 @@ extern "C"
 #include <triangle.h>
 }
 
-IGL_INLINE void igl::triangle_wrapper(
+IGL_INLINE void igl::triangulate(
   const Eigen::MatrixXd& V,
   const Eigen::MatrixXi& E,
   const Eigen::MatrixXd& H,

+ 4 - 4
include/igl/triangle/triangle_wrapper.h → include/igl/triangle/triangulate.h

@@ -5,8 +5,8 @@
 // This Source Code Form is subject to the terms of the Mozilla Public License
 // v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
-#ifndef IGL_TRIANGLE_WRAPPER_H
-#define IGL_TRIANGLE_WRAPPER_H
+#ifndef IGL_TRIANGULATE_H
+#define IGL_TRIANGULATE_H
 #include <igl/igl_inline.h>
 #include <string>
 #include <Eigen/Core>
@@ -25,7 +25,7 @@ namespace igl
   //
   // TODO: expose the option to prevent Steiner points on the boundary
   //
-  IGL_INLINE void triangle_wrapper(
+  IGL_INLINE void triangulate(
     const Eigen::MatrixXd& V,
     const Eigen::MatrixXi& E,
     const Eigen::MatrixXd& H,
@@ -36,7 +36,7 @@ namespace igl
 }
 
 #ifdef IGL_HEADER_ONLY
-#  include "triangle_wrapper.cpp"
+#  include "triangulate.cpp"
 #endif
 
 #endif

+ 0 - 1
todos.txt

@@ -19,7 +19,6 @@
 - clean up orth.h
 - clean up and rename pos.h
 - fix bugs in examples/Core/example2.cpp
-- replace generic names read.h/write.h with something like read_poly_mesh.h
 - replace DynamicSparseMatrix: coeffRef += ---> setFromTriplets()
 - create libigltga extra...why? license?
 - rename moveFV.h