Browse Source

better parameter name

Alec Jacobson 6 years ago
parent
commit
c29460666a
2 changed files with 16 additions and 14 deletions
  1. 9 9
      include/igl/edge_flaps.cpp
  2. 7 5
      include/igl/edge_flaps.h

+ 9 - 9
include/igl/edge_flaps.cpp

@@ -12,14 +12,14 @@
 
 
 IGL_INLINE void igl::edge_flaps(
 IGL_INLINE void igl::edge_flaps(
   const Eigen::MatrixXi & F,
   const Eigen::MatrixXi & F,
-  const Eigen::MatrixXi & E,
+  const Eigen::MatrixXi & uE,
   const Eigen::VectorXi & EMAP,
   const Eigen::VectorXi & EMAP,
   Eigen::MatrixXi & EF,
   Eigen::MatrixXi & EF,
   Eigen::MatrixXi & EI)
   Eigen::MatrixXi & EI)
 {
 {
   // Initialize to boundary value
   // Initialize to boundary value
-  EF.setConstant(E.rows(),2,-1);
-  EI.setConstant(E.rows(),2,-1);
+  EF.setConstant(uE.rows(),2,-1);
+  EI.setConstant(uE.rows(),2,-1);
   // loop over all faces
   // loop over all faces
   for(int f = 0;f<F.rows();f++)
   for(int f = 0;f<F.rows();f++)
   {
   {
@@ -29,13 +29,13 @@ IGL_INLINE void igl::edge_flaps(
       // get edge id
       // get edge id
       const int e = EMAP(v*F.rows()+f);
       const int e = EMAP(v*F.rows()+f);
       // See if this is left or right flap w.r.t. edge orientation
       // See if this is left or right flap w.r.t. edge orientation
-      if( F(f,(v+1)%3) == E(e,0) && F(f,(v+2)%3) == E(e,1))
+      if( F(f,(v+1)%3) == uE(e,0) && F(f,(v+2)%3) == uE(e,1))
       {
       {
         EF(e,0) = f;
         EF(e,0) = f;
         EI(e,0) = v;
         EI(e,0) = v;
       }else
       }else
       {
       {
-        assert(F(f,(v+1)%3) == E(e,1) && F(f,(v+2)%3) == E(e,0));
+        assert(F(f,(v+1)%3) == uE(e,1) && F(f,(v+2)%3) == uE(e,0));
         EF(e,1) = f;
         EF(e,1) = f;
         EI(e,1) = v;
         EI(e,1) = v;
       }
       }
@@ -45,16 +45,16 @@ IGL_INLINE void igl::edge_flaps(
 
 
 IGL_INLINE void igl::edge_flaps(
 IGL_INLINE void igl::edge_flaps(
   const Eigen::MatrixXi & F,
   const Eigen::MatrixXi & F,
-  Eigen::MatrixXi & E,
+  Eigen::MatrixXi & uE,
   Eigen::VectorXi & EMAP,
   Eigen::VectorXi & EMAP,
   Eigen::MatrixXi & EF,
   Eigen::MatrixXi & EF,
   Eigen::MatrixXi & EI)
   Eigen::MatrixXi & EI)
 {
 {
   Eigen::MatrixXi allE;
   Eigen::MatrixXi allE;
   std::vector<std::vector<int> > uE2E;
   std::vector<std::vector<int> > uE2E;
-  igl::unique_edge_map(F,allE,E,EMAP,uE2E);
+  igl::unique_edge_map(F,allE,uE,EMAP,uE2E);
   // Const-ify to call overload
   // Const-ify to call overload
-  const auto & cE = E;
+  const auto & cuE = uE;
   const auto & cEMAP = EMAP;
   const auto & cEMAP = EMAP;
-  return edge_flaps(F,cE,cEMAP,EF,EI);
+  return edge_flaps(F,cuE,cEMAP,EF,EI);
 }
 }

+ 7 - 5
include/igl/edge_flaps.h

@@ -16,15 +16,17 @@ namespace igl
   //
   //
   // Inputs:
   // Inputs:
   //   F  #F by 3 list of face indices
   //   F  #F by 3 list of face indices
-  //   E  #E by 2 list of edge indices into V.
-  //   EMAP #F*3 list of indices into E, mapping each directed edge to unique
-  //     unique edge in E
+  //   uE  #uE by 2 list of edge indices into V.
+  //   EMAP #F*3 list of indices into uE, mapping each directed edge to unique
+  //     unique edge in uE
   // Outputs:
   // Outputs:
   //   EF  #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of
   //   EF  #E by 2 list of edge flaps, EF(e,0)=f means e=(i-->j) is the edge of
   //     F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) "
   //     F(f,:) opposite the vth corner, where EI(e,0)=v. Similarly EF(e,1) "
   //     e=(j->i)
   //     e=(j->i)
   //   EI  #E by 2 list of edge flap corners (see above).
   //   EI  #E by 2 list of edge flap corners (see above).
   //
   //
+  // See also: unique_edge_map
+  //
   // TODO: This seems to be a duplicate of edge_topology.h
   // TODO: This seems to be a duplicate of edge_topology.h
   // igl::edge_topology(V,F,etEV,etFE,etEF);
   // igl::edge_topology(V,F,etEV,etFE,etEF);
   // igl::edge_flaps(F,efE,efEMAP,efEF,efEI);
   // igl::edge_flaps(F,efE,efEMAP,efEF,efEI);
@@ -34,14 +36,14 @@ namespace igl
   // all(efEMAP(sub2ind(size(F),repmat(1:size(F,1),3,1)',repmat([1 2 3],size(F,1),1))) == etFE(:,[2 3 1]))
   // all(efEMAP(sub2ind(size(F),repmat(1:size(F,1),3,1)',repmat([1 2 3],size(F,1),1))) == etFE(:,[2 3 1]))
   IGL_INLINE void edge_flaps(
   IGL_INLINE void edge_flaps(
     const Eigen::MatrixXi & F,
     const Eigen::MatrixXi & F,
-    const Eigen::MatrixXi & E,
+    const Eigen::MatrixXi & uE,
     const Eigen::VectorXi & EMAP,
     const Eigen::VectorXi & EMAP,
     Eigen::MatrixXi & EF,
     Eigen::MatrixXi & EF,
     Eigen::MatrixXi & EI);
     Eigen::MatrixXi & EI);
   // Only faces as input
   // Only faces as input
   IGL_INLINE void edge_flaps(
   IGL_INLINE void edge_flaps(
     const Eigen::MatrixXi & F,
     const Eigen::MatrixXi & F,
-    Eigen::MatrixXi & E,
+    Eigen::MatrixXi & uE,
     Eigen::VectorXi & EMAP,
     Eigen::VectorXi & EMAP,
     Eigen::MatrixXi & EF,
     Eigen::MatrixXi & EF,
     Eigen::MatrixXi & EI);
     Eigen::MatrixXi & EI);