Blender V4.5
blender::geometry::deduplication Namespace Reference

Functions

static GroupedSpan< int > build_vert_to_tri_map (const int verts_num, const Span< int3int3 > vert_tris, Array< int > &r_offsets, Array< int > &r_indices)
static IndexMask calc_unselected_faces (const Mesh &mesh, const OffsetIndices< int > src_faces, const Span< int > src_corner_verts, const IndexMask &selection, const Span< int3int3 > corner_tris, IndexMaskMemory &memory)
static std::optional< int > find_edge_duplicate (const GroupedSpan< int > vert_to_edge_map, const Span< int2int2 > edges, const OrderedEdge edge)
static int calc_new_edges (const Mesh &src_mesh, const Span< int2int2 > src_edges, const IndexRange new_edges_range, MutableSpan< int2int2 > edges, MutableSpan< int > corner_edges)

Function Documentation

◆ build_vert_to_tri_map()

◆ calc_new_edges()

int blender::geometry::deduplication::calc_new_edges ( const Mesh & src_mesh,
const Span< int2int2 > src_edges,
const IndexRange new_edges_range,
MutableSpan< int2int2 > edges,
MutableSpan< int > corner_edges )
static

Given all the edges on the new mesh, find new edges that are duplicates of existing edges. If there are any, remove them and references to them in the corner edge array.

Returns
The final number of edges in the mesh.

Definition at line 628 of file mesh_triangulate.cc.

References blender::bke::mesh::build_vert_to_edge_map(), calc_new_edges(), blender::Span< T >::index_range(), blender::threading::parallel_for(), blender::MutableSpan< T >::size(), blender::Span< T >::size(), blender::MutableSpan< T >::slice(), and Mesh::verts_num.

Referenced by calc_new_edges(), and blender::geometry::mesh_triangulate().

◆ calc_unselected_faces()

IndexMask blender::geometry::deduplication::calc_unselected_faces ( const Mesh & mesh,
const OffsetIndices< int > src_faces,
const Span< int > src_corner_verts,
const IndexMask & selection,
const Span< int3int3 > corner_tris,
IndexMaskMemory & memory )
static

◆ find_edge_duplicate()

std::optional< int > blender::geometry::deduplication::find_edge_duplicate ( const GroupedSpan< int > vert_to_edge_map,
const Span< int2int2 > edges,
const OrderedEdge edge )
static