Blender
V3.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.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 unsigned short poly_nr, ScanFillVert *v_prev, ScanFillVert *v_curr, ScanFillEdge *e_curr) |
static bool | scanfill_preprocess_self_isect (ScanFillContext *sf_ctx, PolyInfo *poly_info, const unsigned short poly_nr, ListBase *filledgebase) |
bool | BLI_scanfill_calc_self_isect (ScanFillContext *sf_ctx, ListBase *remvertbase, ListBase *remedgebase) |
#define E_ISDELETE 2 |
Definition at line 39 of file scanfill_utils.c.
#define E_ISISECT 1 |
Definition at line 38 of file scanfill_utils.c.
#define EFLAG_SET | ( | eed, | |
val | |||
) |
Definition at line 41 of file scanfill_utils.c.
#define V_ISISECT 1 |
Definition at line 37 of file scanfill_utils.c.
#define VFLAG_SET | ( | eve, | |
val | |||
) |
Definition at line 56 of file scanfill_utils.c.
typedef struct ScanFillIsect ScanFillIsect |
bool BLI_scanfill_calc_self_isect | ( | ScanFillContext * | sf_ctx, |
ListBase * | fillvertbase, | ||
ListBase * | filledgebase | ||
) |
Call before scan-fill to remove self intersections.
Definition at line 358 of file scanfill_utils.c.
References BLI_addtail(), BLI_assert, BLI_remlink(), E_ISDELETE, ScanFillContext::filledgebase, ScanFillContext::fillvertbase, ListBase::first, if(), ListBase::last, MEM_callocN, MEM_freeN, ScanFillVert::next, ScanFillEdge::next, NULL, ScanFillContext::poly_nr, ScanFillVert::poly_nr, ScanFillEdge::poly_nr, scanfill_preprocess_self_isect(), SF_POLY_UNSET, UNLIKELY, ScanFillVert::user_flag, ScanFillEdge::user_flag, ScanFillEdge::v1, and ScanFillEdge::v2.
Referenced by BKE_maskrasterize_handle_init().
|
static |
Definition at line 104 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 91 of file scanfill_utils.c.
References BLI_ghash_ensure_p(), and MEM_callocN.
Referenced by edge_isect_ls_add().
|
static |
Definition at line 116 of file scanfill_utils.c.
References Freestyle::a, usdtokens::b(), ScanFillIsect::co, and len_squared_v2v2().
Referenced by scanfill_preprocess_self_isect().
|
static |
Definition at line 132 of file scanfill_utils.c.
References BLI_assert, PolyInfo::edge_first, PolyInfo::edge_last, ELEM, if(), ScanFillEdge::next, NULL, ScanFillEdge::prev, ScanFillEdge::v1, and ScanFillEdge::v2.
Referenced by scanfill_preprocess_self_isect().
|
static |
Definition at line 159 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(), ScanFillVert::co, ScanFillIsect::co, copy_v2_v2(), LinkData::data, E_ISDELETE, E_ISISECT, PolyInfo::edge_first, edge_isect_ls_add(), edge_isect_ls_sort_cb(), PolyInfo::edge_last, edge_step(), EFLAG_SET, ELEM, ScanFillContext::filledgebase, ListBase::first, isect_seg_seg_v2_point(), MEM_freeN, MEM_mallocN, ScanFillEdge::next, LinkData::next, NULL, ScanFillVert::poly_nr, ScanFillEdge::poly_nr, UNLIKELY, ScanFillVert::user_flag, ScanFillEdge::user_flag, ScanFillIsect::v, ScanFillEdge::v1, ScanFillEdge::v2, V_ISISECT, and VFLAG_SET.
Referenced by BLI_scanfill_calc_self_isect().