#ifndef IGL_DOUBLEAREA_H #define IGL_DOUBLEAREA_H #include "igl_inline.h" #include namespace igl { // DOUBLEAREA computes twice the area for each input triangle // // Templates: // DerivedV derived type of eigen matrix for V (e.g. derived from // MatrixXd) // DerivedF derived type of eigen matrix for F (e.g. derived from // MatrixXi) // DeriveddblA derived type of eigen matrix for dblA (e.g. derived from // MatrixXd) // Inputs: // V #V by dim list of mesh vertex positions // F #F by simplex_size list of mesh faces (must be triangles) // Outputs: // dblA #F list of triangle double areas // // Note: THESE ARE *NOT* SIGNED. In matlab doublearea is signed in 2d template IGL_INLINE void doublearea( const Eigen::PlainObjectBase & V, const Eigen::PlainObjectBase & F, Eigen::PlainObjectBase & dblA); // Same as above but use instrinsic edge lengths rather than (V,F) mesh // Templates: // DerivedV derived type of eigen matrix for V (e.g. derived from // MatrixXd) // DerivedF derived type of eigen matrix for F (e.g. derived from // MatrixXi) // DeriveddblA derived type of eigen matrix for dblA (e.g. derived from // MatrixXd) // Inputs: // l #F by dim list of edge lengths using // for triangles, columns correspond to edges 23,31,12 // Outputs: // dblA #F list of triangle double areas template IGL_INLINE void doublearea( const Eigen::PlainObjectBase & l, Eigen::PlainObjectBase & dblA); } #ifdef IGL_HEADER_ONLY # include "doublearea.cpp" #endif #endif