|
Blender V4.3
|
#include <limits.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_ghash.h"#include "BLI_listbase.h"#include "BLI_math_geom.h"#include "BLI_math_vector.h"#include "BLI_utildefines.h"#include "BLI_scanfill.h"#include "BLI_strict_flags.h"Go to the source code of this file.
Classes | |
| struct | PolyInfo |
| struct | ScanFillIsect |
Macros | |
| #define | V_ISISECT 1 |
| #define | E_ISISECT 1 |
| #define | E_ISDELETE 2 |
| #define | EFLAG_SET(eed, val) |
| #define | VFLAG_SET(eve, val) |
Typedefs | |
| typedef struct PolyInfo | PolyInfo |
| typedef struct ScanFillIsect | ScanFillIsect |
Functions | |
| static ListBase * | edge_isect_ls_ensure (GHash *isect_hash, ScanFillEdge *eed) |
| static ListBase * | edge_isect_ls_add (GHash *isect_hash, ScanFillEdge *eed, ScanFillIsect *isect) |
| static int | edge_isect_ls_sort_cb (void *thunk, const void *def_a_ptr, const void *def_b_ptr) |
| static ScanFillEdge * | edge_step (PolyInfo *poly_info, const ushort poly_nr, ScanFillVert *v_prev, ScanFillVert *v_curr, ScanFillEdge *e_curr) |
| static bool | scanfill_preprocess_self_isect (ScanFillContext *sf_ctx, PolyInfo *poly_info, const ushort poly_nr, ListBase *filledgebase) |
| bool | BLI_scanfill_calc_self_isect (ScanFillContext *sf_ctx, ListBase *remvertbase, ListBase *remedgebase) |
| #define E_ISDELETE 2 |
Definition at line 42 of file scanfill_utils.c.
Referenced by BLI_scanfill_calc_self_isect(), and scanfill_preprocess_self_isect().
| #define E_ISISECT 1 |
Definition at line 41 of file scanfill_utils.c.
Referenced by edge_isect_ls_add(), and scanfill_preprocess_self_isect().
| #define EFLAG_SET | ( | eed, | |
| val ) |
Definition at line 44 of file scanfill_utils.c.
Referenced by edge_isect_ls_add(), and scanfill_preprocess_self_isect().
| #define V_ISISECT 1 |
Definition at line 40 of file scanfill_utils.c.
Referenced by scanfill_preprocess_self_isect().
| #define VFLAG_SET | ( | eve, | |
| val ) |
Definition at line 59 of file scanfill_utils.c.
Referenced by scanfill_preprocess_self_isect().
| typedef struct PolyInfo PolyInfo |
| typedef struct ScanFillIsect ScanFillIsect |
| bool BLI_scanfill_calc_self_isect | ( | ScanFillContext * | sf_ctx, |
| ListBase * | remvertbase, | ||
| ListBase * | remedgebase ) |
Call before scan-fill to remove self intersections.
Definition at line 364 of file scanfill_utils.c.
References BLI_addtail(), BLI_assert, BLI_remlink(), E_ISDELETE, PolyInfo::edge_first, PolyInfo::edge_last, ScanFillContext::filledgebase, ScanFillContext::fillvertbase, ListBase::first, ListBase::last, MEM_callocN, MEM_freeN(), ScanFillEdge::next, ScanFillVert::next, NULL, ScanFillContext::poly_nr, ScanFillEdge::poly_nr, ScanFillVert::poly_nr, scanfill_preprocess_self_isect(), SF_POLY_UNSET, UNLIKELY, ScanFillEdge::user_flag, ScanFillVert::user_flag, ScanFillEdge::v1, and ScanFillEdge::v2.
Referenced by BKE_maskrasterize_handle_init().
|
static |
Definition at line 107 of file scanfill_utils.c.
References BLI_addtail(), LinkData::data, E_ISISECT, edge_isect_ls_ensure(), EFLAG_SET, and MEM_callocN.
Referenced by scanfill_preprocess_self_isect().
|
static |
Definition at line 94 of file scanfill_utils.c.
References BLI_ghash_ensure_p(), and MEM_callocN.
Referenced by edge_isect_ls_add().
|
static |
Definition at line 119 of file scanfill_utils.c.
References b, ScanFillIsect::co, and len_squared_v2v2().
Referenced by scanfill_preprocess_self_isect().
|
static |
Definition at line 135 of file scanfill_utils.c.
References BLI_assert, PolyInfo::edge_first, PolyInfo::edge_last, ELEM, ScanFillEdge::next, NULL, ScanFillEdge::prev, ScanFillEdge::v1, and ScanFillEdge::v2.
Referenced by scanfill_preprocess_self_isect().
|
static |
Definition at line 162 of file scanfill_utils.c.
References BLI_addtail(), BLI_assert, BLI_freelistN(), BLI_ghash_free(), BLI_ghash_lookup(), BLI_ghash_ptr_new(), BLI_insertlinkafter(), BLI_listbase_is_single(), BLI_listbase_sort_r(), BLI_remlink(), BLI_scanfill_edge_add(), BLI_scanfill_vert_add(), ScanFillIsect::co, ScanFillVert::co, copy_v2_v2(), LinkData::data, E_ISDELETE, E_ISISECT, edge_isect_ls_add(), edge_isect_ls_sort_cb(), edge_step(), EFLAG_SET, ELEM, ScanFillContext::filledgebase, ListBase::first, FLT_MAX, isect_seg_seg_v2_point(), MEM_freeN(), MEM_mallocN, LinkData::next, ScanFillEdge::next, NULL, ScanFillEdge::poly_nr, ScanFillVert::poly_nr, UNLIKELY, ScanFillEdge::user_flag, ScanFillVert::user_flag, ScanFillIsect::v, ScanFillEdge::v1, ScanFillEdge::v2, V_ISISECT, and VFLAG_SET.
Referenced by BLI_scanfill_calc_self_isect().