Blender V5.3
blender::meshintersect::CDT_state< T > Class Template Reference

Public Member Functions

 CDT_state (int input_verts_num, int input_edges_num, int input_faces_num, T epsilon, CDT_ids_needed_type needed_ids)

Public Attributes

CDTArrangement< T > cdt
int input_vert_num
int visit_count
uint32_t face_edge_offset
T epsilon
CDT_ids_needed_type needed_ids
Map< CDTEdge< T > *, int > * edge_winding_map
Map< CDTEdge< T > *, int > * polygon_boundary_count_map

Detailed Description

template<typename T>
class blender::meshintersect::CDT_state< T >

Definition at line 338 of file delaunay_2d.cc.

Constructor & Destructor Documentation

◆ CDT_state()

template<typename T>
blender::meshintersect::CDT_state< T >::CDT_state ( int input_verts_num,
int input_edges_num,
int input_faces_num,
T epsilon,
CDT_ids_needed_type needed_ids )
explicit

Member Data Documentation

◆ cdt

◆ edge_winding_map

template<typename T>
Map<CDTEdge<T> *, int>* blender::meshintersect::CDT_state< T >::edge_winding_map

Maps edge to net winding contribution for non-zero winding rule. Only populated when non-zero winding is used. Sum of +1/-1 for each face edge, based on direction match with symedge ordering.

Computed before intersections are made to simplify calculation and reduce the possibility of numeric inaccuracy caused by degenerate (or near zero) edge lengths.

Note
This could be removed if we were to store the winding directly in the CDTEdge, however that adds overhead for even-odd filling, so accept some complexity to split out the data in a map.

Definition at line 368 of file delaunay_2d.cc.

Referenced by blender::meshintersect::add_edge_constraint(), blender::meshintersect::add_face_constraints(), CDT_state(), blender::meshintersect::delaunay_calc(), and blender::meshintersect::detect_holes_with_fillrule_nonzero().

◆ epsilon

template<typename T>
T blender::meshintersect::CDT_state< T >::epsilon

How close before coords considered equal.

Definition at line 351 of file delaunay_2d.cc.

Referenced by blender::meshintersect::add_edge_constraint(), CDT_state(), and blender::meshintersect::get_next_crossing_from_vert().

◆ face_edge_offset

template<typename T>
uint32_t blender::meshintersect::CDT_state< T >::face_edge_offset

Edge ids for face start with this, and each face gets this much index space to encode positions within the face.

Definition at line 349 of file delaunay_2d.cc.

Referenced by blender::meshintersect::add_edge_constraints(), blender::meshintersect::add_face_constraints(), and blender::meshintersect::get_cdt_output().

◆ input_vert_num

template<typename T>
int blender::meshintersect::CDT_state< T >::input_vert_num

How many verts were in input (will be first in vert_array).

Definition at line 342 of file delaunay_2d.cc.

Referenced by blender::meshintersect::add_input_verts(), CDT_state(), and blender::meshintersect::is_original_vert().

◆ needed_ids

◆ polygon_boundary_count_map

template<typename T>
Map<CDTEdge<T> *, int>* blender::meshintersect::CDT_state< T >::polygon_boundary_count_map

Per-edge polygon-boundary count for even-odd hole detection (may be null when not needed).

For each constrained CDT edge, the number of input polygon-face boundary edges that mapped to it (after CDT deduplication of coincident boundaries). Loose input.edge aren't included. Read by detect_holes_with_fillrule_even_odd for the per-edge parity flip.

Note
Only allocated when the output type drives even-odd hole detection. Non-zero filling and non-hole outputs do not use it. Tracked here as a separate map (rather than a field on CDTEdge) for the same reason as edge_winding_map: avoids per-edge overhead for callers that don't need it.
Tracked separately from #CDTEdge::input_ids because that set collapses to size <= 1 when CDT_input::needed_ids is doesn't have CDT_ORIG_EDGES, which would otherwise make even-odd output depend on the user's id-output preference.
Entries for edges later marked deleted are left in the map. While redundant this is harmless.

Definition at line 392 of file delaunay_2d.cc.

Referenced by blender::meshintersect::add_edge_constraint(), blender::meshintersect::add_face_constraints(), CDT_state(), blender::meshintersect::delaunay_calc(), and blender::meshintersect::detect_holes_with_fillrule_even_odd().

◆ visit_count


The documentation for this class was generated from the following file: