Blender V5.0
blender::bke::calc_edges Namespace Reference

Typedefs

using EdgeMap

Functions

static uint64_t edge_hash_2 (const OrderedEdge &edge)
static void reserve_hash_maps (const Mesh &mesh, const bool keep_existing_edges, MutableSpan< EdgeMap > edge_maps)
static OffsetIndices< int > edge_map_offsets (const Span< EdgeMap > maps, Array< int > &r_sizes)
static int edge_to_hash_map_i (const OrderedEdge edge, const uint32_t parallel_mask)
static void add_existing_edges_to_hash_maps (const Mesh &mesh, const uint32_t parallel_mask, MutableSpan< EdgeMap > edge_maps)
static void add_face_edges_to_hash_maps (const Mesh &mesh, const uint32_t parallel_mask, MutableSpan< EdgeMap > edge_maps)
static void serialize_and_initialize_deduplicated_edges (MutableSpan< EdgeMap > edge_maps, const OffsetIndices< int > edge_offsets, const OffsetIndices< int > prefix_skip_offsets, MutableSpan< int2 > new_edges)
static void update_edge_indices_in_face_loops (const OffsetIndices< int > faces, const Span< int > corner_verts, const Span< EdgeMap > edge_maps, const uint32_t parallel_mask, const OffsetIndices< int > edge_offsets, MutableSpan< int > corner_edges)
static int get_parallel_maps_count (const Mesh &mesh)
static void clear_hash_tables (MutableSpan< EdgeMap > edge_maps)
static IndexMask mask_first_distinct_edges (const Span< int2 > edges, const IndexMask &edges_to_check, const Span< EdgeMap > edge_maps, const uint32_t parallel_mask, const OffsetIndices< int > edge_offsets, IndexMaskMemory &memory)
static void map_edge_to_span_index (const Span< int2 > edges, const Span< EdgeMap > edge_maps, const uint32_t parallel_mask, const OffsetIndices< int > edge_offsets, MutableSpan< int > indices)

Typedef Documentation

◆ EdgeMap

Function Documentation

◆ add_existing_edges_to_hash_maps()

void blender::bke::calc_edges::add_existing_edges_to_hash_maps ( const Mesh & mesh,
const uint32_t parallel_mask,
MutableSpan< EdgeMap > edge_maps )
static

◆ add_face_edges_to_hash_maps()

◆ clear_hash_tables()

◆ edge_hash_2()

uint64_t blender::bke::calc_edges::edge_hash_2 ( const OrderedEdge & edge)
static

Return a hash value that is likely to be different in the low bits from the normal hash() function. This is necessary to avoid collisions in mesh_calc_edges.

Definition at line 30 of file mesh_calc_edges.cc.

References blender::OrderedEdge::v_low.

Referenced by edge_to_hash_map_i().

◆ edge_map_offsets()

◆ edge_to_hash_map_i()

int blender::bke::calc_edges::edge_to_hash_map_i ( const OrderedEdge edge,
const uint32_t parallel_mask )
static

◆ get_parallel_maps_count()

int blender::bke::calc_edges::get_parallel_maps_count ( const Mesh & mesh)
static

◆ map_edge_to_span_index()

void blender::bke::calc_edges::map_edge_to_span_index ( const Span< int2 > edges,
const Span< EdgeMap > edge_maps,
const uint32_t parallel_mask,
const OffsetIndices< int > edge_offsets,
MutableSpan< int > indices )
static

◆ mask_first_distinct_edges()

◆ reserve_hash_maps()

void blender::bke::calc_edges::reserve_hash_maps ( const Mesh & mesh,
const bool keep_existing_edges,
MutableSpan< EdgeMap > edge_maps )
static

◆ serialize_and_initialize_deduplicated_edges()

◆ update_edge_indices_in_face_loops()

void blender::bke::calc_edges::update_edge_indices_in_face_loops ( const OffsetIndices< int > faces,
const Span< int > corner_verts,
const Span< EdgeMap > edge_maps,
const uint32_t parallel_mask,
const OffsetIndices< int > edge_offsets,
MutableSpan< int > corner_edges )
static

Definition at line 134 of file mesh_calc_edges.cc.

References faces, and blender::threading::parallel_for().

Referenced by blender::bke::mesh_calc_edges().