Browse Source

better doc on colmajor expectation of winding number code

Former-commit-id: 1eb0a81a85ea5ec557e23a9273a9fc435048f4aa
Alec Jacobson 10 years ago
parent
commit
9cab50ce05
2 changed files with 13 additions and 3 deletions
  1. 1 0
      include/igl/winding_number.cpp
  2. 12 3
      include/igl/winding_number.h

+ 1 - 0
include/igl/winding_number.cpp

@@ -4,6 +4,7 @@
 #include <igl/PI.h>
 #include <igl/PI.h>
 #include <cmath>
 #include <cmath>
 
 
+// IF THIS IS EVER TEMPLATED BE SURE THAT V IS COLMAJOR
 IGL_INLINE void igl::winding_number(
 IGL_INLINE void igl::winding_number(
   const Eigen::MatrixXd & V,
   const Eigen::MatrixXd & V,
   const Eigen::MatrixXi & F,
   const Eigen::MatrixXi & F,

+ 12 - 3
include/igl/winding_number.h

@@ -16,11 +16,8 @@ namespace igl
   //   dim  dimension of input
   //   dim  dimension of input
   // Inputs:
   // Inputs:
   //  V  n by 3 list of vertex positions
   //  V  n by 3 list of vertex positions
-  //  n  number of mesh vertices
   //  F  #F by 3 list of triangle indices, minimum index is 0
   //  F  #F by 3 list of triangle indices, minimum index is 0
-  //  m  number of faces
   //  O  no by 3 list of origin positions
   //  O  no by 3 list of origin positions
-  //  no  number of origins
   // Outputs:
   // Outputs:
   //  S  no by 1 list of winding numbers
   //  S  no by 1 list of winding numbers
   //
   //
@@ -30,6 +27,18 @@ namespace igl
     const Eigen::MatrixXi & F,
     const Eigen::MatrixXi & F,
     const Eigen::MatrixXd & O,
     const Eigen::MatrixXd & O,
     Eigen::VectorXd & W);
     Eigen::VectorXd & W);
+  // Inputs:
+  //   V  pointer to array containing #V by 3 vertex positions along rows,
+  //     given in column major order
+  //   n  number of mesh vertices
+  //   F  pointer to array containing #F by 3 face indices along rows,
+  //     given in column major order
+  //   m  number of faces
+  //   O  pointer to array containing #O by 3 query positions along rows,
+  //     given in column major order
+  //   no  number of origins
+  // Outputs:
+  //   S  no by 1 list of winding numbers
   template <typename DerivedF>
   template <typename DerivedF>
   IGL_INLINE void winding_number_3(
   IGL_INLINE void winding_number_3(
     const double * V,
     const double * V,