Browse Source

fix documentation

Former-commit-id: 37f4f21a0b45b185dce82896b4b52f267b558c93
Alec Jacobson 9 years ago
parent
commit
a7c4fe3b1c
2 changed files with 15 additions and 9 deletions
  1. 1 1
      include/igl/edge_lengths.h
  2. 14 8
      include/igl/face_areas.h

+ 1 - 1
include/igl/edge_lengths.h

@@ -32,7 +32,7 @@ namespace igl
   //     for edges, column of lengths
   //     for triangles, columns correspond to edges [1,2],[2,0],[0,1]
   //     for tets, columns correspond to edges
-  //     [1,2],[2,0],[0,1],[3,0],[3,1],[3,2]
+  //     [3 0],[3 1],[3 2],[1 2],[2 0],[0 1]
   //
   template <typename DerivedV, typename DerivedF, typename DerivedL>
   IGL_INLINE void edge_lengths(

+ 14 - 8
include/igl/face_areas.h

@@ -15,22 +15,28 @@ namespace igl
 {
   // Constructs a list of face areas of faces opposite each index in a tet list
   //
-  // Templates:
-  //   DerivedV derived from vertex positions matrix type: i.e. MatrixXd
-  //   DerivedT derived from face indices matrix type: i.e. MatrixXi
-  //   DerivedL derived from edge lengths matrix type: i.e. MatrixXd
   // Inputs:
-  //   V  eigen matrix #V by 3
-  //   T  #T by 3 list of mesh faces (must be triangles)
+  //   V  #V by 3 list of mesh vertex positions
+  //   T  #T by 3 list of tet mesh indices into V
   // Outputs:
-  //   E #E by 2 list of edges in no particular order
+  //   A   #T by 4 list of face areas corresponding to faces opposite vertices
+  //     0,1,2,3
   //
-  // See also: adjacency_matrix
   template <typename DerivedV, typename DerivedT, typename DerivedA>
   IGL_INLINE void face_areas(
     const Eigen::PlainObjectBase<DerivedV>& V,
     const Eigen::PlainObjectBase<DerivedT>& T,
     Eigen::PlainObjectBase<DerivedA>& A);
+  // Compute tet-mesh face areas from edge lengths.
+  //
+  // Inputs:
+  //   L  #T by 6 list of tet-mesh edge lengths corresponding to edges
+  //     [3 0],[3 1],[3 2],[1 2],[2 0],[0 1]
+  // Outputs:
+  //   A   #T by 4 list of face areas corresponding to faces opposite vertices 
+  //     0,1,2,3: i.e. made of edges [123],[024],[015],[345]
+  //    
+  //
   template <typename DerivedL, typename DerivedA>
   IGL_INLINE void face_areas(
     const Eigen::PlainObjectBase<DerivedL>& L,