// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2014 Alec Jacobson // // 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_FACE_AREAS_H #define IGL_FACE_AREAS_H #include "igl_inline.h" #include namespace igl { /// Constructs a list of face areas of faces opposite each index in a tet list /// /// @param[in] V #V by 3 list of mesh vertex positions /// @param[in] T #T by 3 list of tet mesh indices into V /// @param[out] A #T by 4 list of face areas corresponding to faces opposite vertices /// 0,1,2,3 /// template IGL_INLINE void face_areas( const Eigen::MatrixBase& V, const Eigen::MatrixBase& T, Eigen::PlainObjectBase& A); /// \overload /// \brief Compute tet-mesh face areas from edge lengths. /// /// @param[in] 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] template IGL_INLINE void face_areas( const Eigen::MatrixBase& L, Eigen::PlainObjectBase& A); /// \overload /// /// @param[in] doublearea_nan_replacement See doublearea.h template IGL_INLINE void face_areas( const Eigen::MatrixBase& L, const typename DerivedL::Scalar doublearea_nan_replacement, Eigen::PlainObjectBase& A); } #ifndef IGL_STATIC_LIBRARY # include "face_areas.cpp" #endif #endif