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)
52 mesh.
add_polygons(
static_cast<Index
>(F.rows()),
static_cast<Index
>(F.cols()));
54 facet_ref(mesh) = F.template cast<Index>();
void add_vertices(Index num_vertices, span< const Scalar > coordinates={})
Adds multiple vertices to the mesh.
Definition: SurfaceMesh.cpp:1566
void add_polygons(Index num_facets, Index facet_size, span< const Index > facet_indices={})
Adds multiple polygonal facets of the same size to the mesh.
Definition: SurfaceMesh.cpp:1701
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
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.
Definition: AABBIGL.h:30