Blender V5.0
scanfill_utils.cc File Reference
#include <cstdlib>
#include "DNA_listBase.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)

Functions

static ListBaseedge_isect_ls_ensure (GHash *isect_hash, ScanFillEdge *eed)
static ListBaseedge_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 ScanFillEdgeedge_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)

Macro Definition Documentation

◆ E_ISDELETE

#define E_ISDELETE   2

◆ E_ISISECT

#define E_ISISECT   1

Definition at line 39 of file scanfill_utils.cc.

Referenced by edge_isect_ls_add(), and scanfill_preprocess_self_isect().

◆ EFLAG_SET

#define EFLAG_SET ( eed,
val )
Value:
{ \
CHECK_TYPE(eed, ScanFillEdge *); \
(eed)->user_flag = (eed)->user_flag | uint(val); \
} \
(void)0
unsigned int uint

Definition at line 42 of file scanfill_utils.cc.

Referenced by edge_isect_ls_add(), and scanfill_preprocess_self_isect().

◆ V_ISISECT

#define V_ISISECT   1

Definition at line 38 of file scanfill_utils.cc.

Referenced by scanfill_preprocess_self_isect().

◆ VFLAG_SET

#define VFLAG_SET ( eve,
val )
Value:
{ \
CHECK_TYPE(eve, ScanFillVert *); \
(eve)->user_flag = (eve)->user_flag | uint(val); \
} \
(void)0

Definition at line 57 of file scanfill_utils.cc.

Referenced by scanfill_preprocess_self_isect().

Function Documentation

◆ BLI_scanfill_calc_self_isect()

◆ edge_isect_ls_add()

ListBase * edge_isect_ls_add ( GHash * isect_hash,
ScanFillEdge * eed,
ScanFillIsect * isect )
static

◆ edge_isect_ls_ensure()

ListBase * edge_isect_ls_ensure ( GHash * isect_hash,
ScanFillEdge * eed )
static

Definition at line 92 of file scanfill_utils.cc.

References BLI_ghash_ensure_p(), and MEM_callocN().

Referenced by edge_isect_ls_add().

◆ edge_isect_ls_sort_cb()

int edge_isect_ls_sort_cb ( void * thunk,
const void * def_a_ptr,
const void * def_b_ptr )
static

Definition at line 115 of file scanfill_utils.cc.

References b, ScanFillIsect::co, data, and len_squared_v2v2().

Referenced by scanfill_preprocess_self_isect().

◆ edge_step()

ScanFillEdge * edge_step ( PolyInfo * poly_info,
const ushort poly_nr,
ScanFillVert * v_prev,
ScanFillVert * v_curr,
ScanFillEdge * e_curr )
static

◆ scanfill_preprocess_self_isect()