浏览代码

cotangent --> cotmatrix_entries

Former-commit-id: f4e090f3d81cce23ee984a276d47c812f2d3074b
Alec Jacobson 11 年之前
父节点
当前提交
e7af0097b7

+ 4 - 4
include/igl/arap_linear_block.cpp

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

+ 2 - 2
include/igl/cotmatrix.cpp

@@ -10,7 +10,7 @@
 
 // For error printing
 #include <cstdio>
-#include "cotangent.h"
+#include "cotmatrix_entries.h"
 
 // Bug in unsupported/Eigen/SparseExtra needs iostream first
 #include <iostream>
@@ -59,7 +59,7 @@ IGL_INLINE void igl::cotmatrix(
   }
   // Gather cotangents
   Matrix<Scalar,Dynamic,Dynamic> C;
-  cotangent(V,F,C);
+  cotmatrix_entries(V,F,C);
   
   vector<Triplet<Scalar> > IJV;
   IJV.reserve(F.rows()*edges.rows()*4);

+ 1 - 1
include/igl/cotmatrix.h

@@ -39,7 +39,7 @@ namespace igl
   // See also: adjacency_matrix
   //
   // Known bugs: off by 1e-16 on regular grid. I think its a problem of
-  // arithmetic order in cotangent.h: C(i,e) = (arithmetic)/dblA/4
+  // arithmetic order in cotmatrix_entries.h: C(i,e) = (arithmetic)/dblA/4
   template <typename DerivedV, typename DerivedF, typename Scalar>
   IGL_INLINE void cotmatrix(
     const Eigen::PlainObjectBase<DerivedV> & V, 

+ 4 - 4
include/igl/cotangent.cpp → include/igl/cotmatrix_entries.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 "cotangent.h"
+#include "cotmatrix_entries.h"
 #include "doublearea.h"
 #include "edge_lengths.h"
 #include "face_areas.h"
@@ -16,7 +16,7 @@
 
 
 template <typename DerivedV, typename DerivedF, typename DerivedC>
-IGL_INLINE void igl::cotangent(
+IGL_INLINE void igl::cotmatrix_entries(
   const Eigen::PlainObjectBase<DerivedV>& V,
   const Eigen::PlainObjectBase<DerivedF>& F,
   Eigen::PlainObjectBase<DerivedC>& C)
@@ -89,7 +89,7 @@ IGL_INLINE void igl::cotangent(
     default:
     {
       fprintf(stderr,
-          "cotangent.h: Error: Simplex size (%d) not supported\n", simplex_size);
+          "cotmatrix_entries.h: Error: Simplex size (%d) not supported\n", simplex_size);
       assert(false);
     }
   }
@@ -97,5 +97,5 @@ IGL_INLINE void igl::cotangent(
 
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template specialization
-template void igl::cotangent<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
+template void igl::cotmatrix_entries<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 #endif

+ 5 - 5
include/igl/cotangent.h → include/igl/cotmatrix_entries.h

@@ -5,13 +5,13 @@
 // 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_COTANGENT_H
-#define IGL_COTANGENT_H
+#ifndef IGL_COTMATRIX_ENTRIES_H
+#define IGL_COTMATRIX_ENTRIES_H
 #include "igl_inline.h"
 #include <Eigen/Core>
 namespace igl
 {
-  // COTANGENT compute the cotangents of each angle in mesh (V,F)
+  // COTMATRIX_ENTRIES compute the cotangents of each angle in mesh (V,F)
   // 
   // Inputs:
   //   V  #V by dim list of rest domain positions
@@ -24,14 +24,14 @@ namespace igl
   //       for tets, columns along edges [1,2],[2,0],[0,1],[3,0],[3,1],[3,2] 
   //
   template <typename DerivedV, typename DerivedF, typename DerivedC>
-  IGL_INLINE void cotangent(
+  IGL_INLINE void cotmatrix_entries(
     const Eigen::PlainObjectBase<DerivedV>& V,
     const Eigen::PlainObjectBase<DerivedF>& F,
     Eigen::PlainObjectBase<DerivedC>& C);
 }
 
 #ifndef IGL_STATIC_LIBRARY
-#  include "cotangent.cpp"
+#  include "cotmatrix_entries.cpp"
 #endif
 
 #endif

+ 2 - 2
include/igl/frame_field_deformer.cpp

@@ -11,7 +11,7 @@
 #include <Eigen/Sparse>
 #include <vector>
 
-#include <igl/cotangent.h>
+#include <igl/cotmatrix_entries.h>
 #include <igl/cotmatrix.h>
 #include <igl/vertex_triangle_adjacency.h>
 
@@ -164,7 +164,7 @@ IGL_INLINE void Frame_field_deformer::precompute_opt()
   nconst = V.rows()-nfree;						// #constrained vertices
   igl::vertex_triangle_adjacency(V,F,VT,VTi);                // compute vertex to face relationship
 
-  igl::cotangent(V,F,C);							     // cotangent matrix for opt. rotations - global
+  igl::cotmatrix_entries(V,F,C);							     // cotangent matrix for opt. rotations - global
 
   igl::cotmatrix(V,F,L);