Blender  V3.3
Classes | Macros | Typedefs | Functions
scanfill_utils.c File Reference
#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 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 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)
 

Macro Definition Documentation

◆ E_ISDELETE

#define E_ISDELETE   2

Definition at line 39 of file scanfill_utils.c.

◆ E_ISISECT

#define E_ISISECT   1

Definition at line 38 of file scanfill_utils.c.

◆ EFLAG_SET

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

Definition at line 41 of file scanfill_utils.c.

◆ V_ISISECT

#define V_ISISECT   1

Definition at line 37 of file scanfill_utils.c.

◆ VFLAG_SET

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

Definition at line 56 of file scanfill_utils.c.

Typedef Documentation

◆ PolyInfo

typedef struct PolyInfo PolyInfo

◆ ScanFillIsect

typedef struct ScanFillIsect ScanFillIsect

Function Documentation

◆ BLI_scanfill_calc_self_isect()

bool BLI_scanfill_calc_self_isect ( ScanFillContext sf_ctx,
ListBase fillvertbase,
ListBase filledgebase 
)

◆ edge_isect_ls_add()

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

◆ edge_isect_ls_ensure()

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

Definition at line 91 of file scanfill_utils.c.

References BLI_ghash_ensure_p(), and MEM_callocN.

Referenced by edge_isect_ls_add().

◆ edge_isect_ls_sort_cb()

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

◆ edge_step()

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

◆ scanfill_preprocess_self_isect()

static bool scanfill_preprocess_self_isect ( ScanFillContext sf_ctx,
PolyInfo poly_info,
const unsigned short  poly_nr,
ListBase filledgebase 
)
static