23#ifndef VCL_ALGORITHMS_MESH_STAT_SELECTION_H
24#define VCL_ALGORITHMS_MESH_STAT_SELECTION_H
26#include <vclib/mesh.h>
39template<u
int ELEM_ID, MeshConcept MeshType>
40uint elementSelectionCount(
const MeshType& m)
42 return std::ranges::distance(
43 m.template elements<ELEM_ID>() | views::selected);
51template<MeshConcept MeshType>
52uint vertexSelectionCount(
const MeshType& m)
54 return elementSelectionCount<ElemId::VERTEX>(m);
62template<FaceMeshConcept MeshType>
63uint faceSelectionCount(
const MeshType& m)
65 return elementSelectionCount<ElemId::FACE>(m);
78template<FaceMeshConcept MeshType>
79uint faceEdgesSelectionCount(
const MeshType& m)
82 for (
const auto& f : m.
faces()) {
83 for (uint i = 0; i < f.vertexCount(); ++i) {
84 if (f.edgeSelected(i)) {
98template<EdgeMeshConcept MeshType>
99uint edgeSelectionCount(
const MeshType& m)
101 return elementSelectionCount<ElemId::EDGE>(m);
constexpr detail::FacesView faces
A view that allows to iterate overt the Face elements of an object.
Definition face.h:84