14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/views.h>
45template <
typename Scalar,
typename Index,
typename DerivedV,
typename DerivedF>
47 const Eigen::MatrixBase<DerivedV>& V,
48 const Eigen::MatrixBase<DerivedF>& F)
51 mesh.add_vertices(
static_cast<Index
>(V.rows()));
52 mesh.add_polygons(
static_cast<Index
>(F.rows()),
static_cast<Index
>(F.cols()));
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66
SurfaceMesh< Scalar, Index > eigen_to_surface_mesh(const Eigen::MatrixBase< DerivedV > &V, const Eigen::MatrixBase< DerivedF > &F)
Create a SurfaceMesh from a igl-style pair of matrices (V, F).
Definition eigen_convert.h:46
SurfaceMesh< ToScalar, ToIndex > cast(const SurfaceMesh< FromScalar, FromIndex > &source_mesh, const AttributeFilter &convertible_attributes={}, std::vector< std::string > *converted_attributes_names=nullptr)
Cast a mesh to a mesh of different scalar and/or index type.
RowMatrixView< Scalar > vertex_ref(SurfaceMesh< Scalar, Index > &mesh)
Returns a writable view of the mesh vertices in the form of an Eigen matrix.
Definition views.cpp:150
RowMatrixView< Index > facet_ref(SurfaceMesh< Scalar, Index > &mesh)
Returns a writable view of a mesh facets in the form of an Eigen matrix.
Definition views.cpp:162
Main namespace for Lagrange.