26 PolygonMesh::Point
mesh_vertex(
const PolygonMesh &M,
int v);
71 void reorder_mesh(Eigen::MatrixXd &
V, Eigen::MatrixXi &
F,
const Eigen::VectorXi &C, Eigen::VectorXi &R);
76 const Eigen::RowVector3d &interior_point,
double distance, Eigen::MatrixXd &offset);
91 const Eigen::MatrixXd &P, Eigen::VectorXd &D);
101 double signed_volume(
const Eigen::MatrixXd &
V,
const Eigen::MatrixXi &
F);
114 const Mesh2D &first,
const Mesh2D &second);
118 const Mesh3D &first,
const Mesh3D &second);
130 const Eigen::MatrixXd &BV,
const Eigen::MatrixXi &BE, Eigen::MatrixXi &OE);
147 const Eigen::MatrixXd &vertices,
148 const Eigen::MatrixXi &tets,
149 Eigen::MatrixXd &surface_vertices,
150 Eigen::MatrixXi &tris);
153 bool is_planar(
const Eigen::MatrixXd &
V,
const double tol = 1e-5);
156 int count_faces(
const int dim,
const Eigen::MatrixXi &cells);
std::vector< Eigen::VectorXi > faces
std::vector< std::pair< Navigation::Index, Navigation::Index > > compute_mesh_interface(const Mesh2D &first, const Mesh2D &second)
Pair coincident boundary edges, including nonconforming leader/follower edges.
void orient_closed_surface(const Eigen::MatrixXd &V, Eigen::MatrixXi &F, bool positive=true)
Orient a triangulated surface to have positive volume.
double signed_volume(const Eigen::MatrixXd &V, const Eigen::MatrixXi &F)
Compute the signed volume of a surface mesh.
PolygonMesh::Point mesh_vertex(const PolygonMesh &M, int v)
Retrieve a 3D vector with the position of a given vertex.
void offset_surface_vertices(const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::RowVector3d &interior_point, double distance, Eigen::MatrixXd &offset)
Offset along area-weighted surface normals, using the direction away from an interior point where inc...
void reorder_mesh(Eigen::MatrixXd &V, Eigen::MatrixXi &F, const Eigen::VectorXi &C, Eigen::VectorXi &R)
Reorder vertices of a mesh using color tags, so that vertices are ordered by increasing colors.
void find_triangle_surface_from_tets(const Eigen::MatrixXi &tets, Eigen::MatrixXi &faces)
Boundary triangles of a tet mesh, indexing the tets' vertices.
bool is_planar(const Eigen::MatrixXd &V, const double tol=1e-5)
Determine if the given V x (2|3) vertices are planar (2D or z-range below tol).
void extract_parent_edges(const Eigen::MatrixXd &IV, const Eigen::MatrixXi &IE, const Eigen::MatrixXd &BV, const Eigen::MatrixXi &BE, Eigen::MatrixXi &OE)
Extract a set of edges that are overlap with a set given set of parent edges, using vertices position...
void extract_triangle_surface_from_tets(const Eigen::MatrixXd &vertices, const Eigen::MatrixXi &tets, Eigen::MatrixXd &surface_vertices, Eigen::MatrixXi &tris)
Extract triangular surface from a tetmesh.
void signed_squared_distances(const Eigen::MatrixXd &V, const Eigen::MatrixXi &F, const Eigen::MatrixXd &P, Eigen::VectorXd &D)
Computes the signed squared distance from a list of points to a triangle mesh.
PolygonMesh::Point facet_barycenter(const PolygonMesh &M, int f)
void compute_element_tags(const PolygonMesh &M, std::vector< ElementType > &element_tags)
Compute the type of each facet in a surface mesh.
int mesh_create_vertex(PolygonMesh &M, const PolygonMesh::Point &p)
void orient_normals_2d(PolygonMesh &M)
Orient facets of a 2D mesh so that each connected component has positive volume.
void generate_edges(PolygonMesh &M)
Creates the edges of M (sorted by vertex pair) if it has none yet.
int count_faces(const int dim, const Eigen::MatrixXi &cells)
Count the number of boundary elements (triangles for tetmesh and edges for triangle mesh)