11#ifndef EASY3D_ALGO_SURFACE_MESH_COMPONENTS_H
12#define EASY3D_ALGO_SURFACE_MESH_COMPONENTS_H
16#include <easy3d/core/surface_mesh.h>
46 const std::vector<Face> &faces()
const {
return faces_; }
48 const std::vector<Vertex> &vertices()
const {
return vertices_; }
50 const std::vector<Edge> &edges()
const {
return edges_; }
52 const std::vector<Halfedge> &halfedges()
const {
return halfedges_; }
54 std::size_t n_faces()
const {
return faces_.size(); }
56 std::size_t n_vertices()
const {
return vertices_.size(); }
58 std::size_t n_edges()
const {
return edges_.size(); }
60 std::size_t n_halfedges()
const {
return halfedges_.size(); }
85 std::vector<Face> faces_;
86 std::vector<Vertex> vertices_;
87 std::vector<Halfedge> halfedges_;
88 std::vector<Edge> edges_;
A connected component of a SurfaceMesh.
Definition: surface_mesh_components.h:27
SurfaceMesh * to_mesh() const
Definition: surface_mesh_components.cpp:21
void translate(const vec3 &offset)
Definition: surface_mesh_components.cpp:111
static std::vector< SurfaceMeshComponent > extract(SurfaceMesh *mesh, bool descending=true)
Definition: surface_mesh_components.cpp:118
float area() const
Definition: surface_mesh_components.cpp:50
Box3 bbox() const
Definition: surface_mesh_components.cpp:102
SurfaceMesh * mesh() const
Definition: surface_mesh_components.h:63
float border_length() const
Definition: surface_mesh_components.cpp:86
A halfedge data structure for polygonal meshes of 2-manifold.
Definition: surface_mesh.h:52
Definition: collider.cpp:182
Definition: surface_mesh.h:124
Definition: surface_mesh.h:134
Definition: surface_mesh.h:114
Definition: surface_mesh.h:104