Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | ScanFillContext |
struct | ScanFillVert |
struct | ScanFillEdge |
struct | ScanFillFace |
Macros | |
#define | BLI_SCANFILL_ARENA_SIZE MEM_SIZE_OPTIMAL(1 << 14) |
#define | SF_POLY_UNSET ((unsigned short)-1) |
Typedefs | |
typedef struct ScanFillContext | ScanFillContext |
typedef struct ScanFillVert | ScanFillVert |
typedef struct ScanFillEdge | ScanFillEdge |
typedef struct ScanFillFace | ScanFillFace |
Enumerations | |
enum | { BLI_SCANFILL_CALC_REMOVE_DOUBLES = (1 << 1) , BLI_SCANFILL_CALC_POLYS = (1 << 2) , BLI_SCANFILL_CALC_HOLES = (1 << 3) , BLI_SCANFILL_CALC_LOOSE = (1 << 4) } |
Functions | |
struct ScanFillVert * | BLI_scanfill_vert_add (ScanFillContext *sf_ctx, const float vec[3]) |
struct ScanFillEdge * | BLI_scanfill_edge_add (ScanFillContext *sf_ctx, struct ScanFillVert *v1, struct ScanFillVert *v2) |
void | BLI_scanfill_begin (ScanFillContext *sf_ctx) |
unsigned int | BLI_scanfill_calc (ScanFillContext *sf_ctx, int flag) |
unsigned int | BLI_scanfill_calc_ex (ScanFillContext *sf_ctx, int flag, const float nor_proj[3]) |
void | BLI_scanfill_end (ScanFillContext *sf_ctx) |
void | BLI_scanfill_begin_arena (ScanFillContext *sf_ctx, struct MemArena *arena) |
void | BLI_scanfill_end_arena (ScanFillContext *sf_ctx, struct MemArena *arena) |
bool | BLI_scanfill_calc_self_isect (ScanFillContext *sf_ctx, ListBase *fillvertbase, ListBase *filledgebase) |
#define BLI_SCANFILL_ARENA_SIZE MEM_SIZE_OPTIMAL(1 << 14) |
Definition at line 29 of file BLI_scanfill.h.
#define SF_POLY_UNSET ((unsigned short)-1) |
Definition at line 36 of file BLI_scanfill.h.
typedef struct ScanFillContext ScanFillContext |
typedef struct ScanFillEdge ScanFillEdge |
typedef struct ScanFillFace ScanFillFace |
typedef struct ScanFillVert ScanFillVert |
anonymous enum |
Enumerator | |
---|---|
BLI_SCANFILL_CALC_REMOVE_DOUBLES | |
BLI_SCANFILL_CALC_POLYS | |
BLI_SCANFILL_CALC_HOLES | |
BLI_SCANFILL_CALC_LOOSE |
Definition at line 84 of file BLI_scanfill.h.
void BLI_scanfill_begin | ( | ScanFillContext * | sf_ctx | ) |
Definition at line 779 of file scanfill.c.
References ScanFillContext::arena, BLI_memarena_new(), BLI_SCANFILL_ARENA_SIZE, ScanFillContext::poly_nr, and SF_POLY_UNSET.
Referenced by bmo_triangle_fill_exec().
void BLI_scanfill_begin_arena | ( | ScanFillContext * | sf_ctx, |
struct MemArena * | arena | ||
) |
Definition at line 786 of file scanfill.c.
References ScanFillContext::arena, ScanFillContext::poly_nr, and SF_POLY_UNSET.
Referenced by BKE_displist_fill(), and BKE_maskrasterize_handle_init().
unsigned int BLI_scanfill_calc | ( | ScanFillContext * | sf_ctx, |
int | flag | ||
) |
Definition at line 1145 of file scanfill.c.
References BLI_scanfill_calc_ex(), and NULL.
unsigned int BLI_scanfill_calc_ex | ( | ScanFillContext * | sf_ctx, |
int | flag, | ||
const float | nor_proj[3] | ||
) |
Definition at line 813 of file scanfill.c.
References Freestyle::a, add_newell_cross_v3_v3v3(), axis_dominant_v3_to_m3_negate(), BLI_assert, BLI_listbase_clear(), BLI_listbase_is_empty(), BLI_movelisttolist(), BLI_remlink(), BLI_SCANFILL_CALC_HOLES, BLI_SCANFILL_CALC_LOOSE, BLI_SCANFILL_CALC_POLYS, boundisect(), Freestyle::c, ScanFillVert::co, compare_v3v3(), copy_v3_v3(), ScanFillVert::edge_count, PolyFill::edges, ScanFillVert::f, PolyFill::f, ScanFillContext::filledgebase, ScanFillContext::fillvertbase, ListBase::first, if(), ListBase::last, len_squared_v3(), LIKELY, PolyFill::max_xy, MEM_callocN, MEM_freeN, MEM_mallocN, mergepolysSimp(), PolyFill::min_xy, mul_v2_m3v3(), ScanFillVert::next, ScanFillEdge::next, normalize_v3(), NULL, pf, ScanFillContext::poly_nr, ScanFillVert::poly_nr, ScanFillEdge::poly_nr, ScanFillEdge::prev, scanfill(), SF_EPSILON, SF_POLY_NEW, SF_POLY_UNSET, SF_POLY_VALID, SF_VERT_AVAILABLE, splitlist(), testvertexnearedge(), UNLIKELY, ScanFillEdge::v1, ScanFillEdge::v2, vergpoly(), PolyFill::verts, ScanFillVert::xy, and zero_v3().
Referenced by BKE_displist_fill(), BKE_maskrasterize_handle_init(), BLI_scanfill_calc(), and bmo_triangle_fill_exec().
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().
struct ScanFillEdge* BLI_scanfill_edge_add | ( | ScanFillContext * | sf_ctx, |
struct ScanFillVert * | v1, | ||
struct ScanFillVert * | v2 | ||
) |
Definition at line 134 of file scanfill.c.
References ScanFillContext::arena, BLI_addtail(), BLI_memarena_alloc(), ScanFillEdge::c, ScanFillEdge::f, ScanFillContext::filledgebase, ScanFillContext::poly_nr, ScanFillEdge::poly_nr, SF_EDGE_NEW, ScanFillEdge::tmp, ScanFillEdge::user_flag, ScanFillEdge::v1, v1, ScanFillEdge::v2, and v2.
Referenced by BKE_displist_fill(), BKE_maskrasterize_handle_init(), bmo_triangle_fill_exec(), scanfill(), scanfill_preprocess_self_isect(), and testvertexnearedge().
void BLI_scanfill_end | ( | ScanFillContext * | sf_ctx | ) |
Definition at line 793 of file scanfill.c.
References ScanFillContext::arena, BLI_listbase_clear(), BLI_memarena_free(), ScanFillContext::filledgebase, ScanFillContext::fillfacebase, ScanFillContext::fillvertbase, and NULL.
Referenced by bmo_triangle_fill_exec().
void BLI_scanfill_end_arena | ( | ScanFillContext * | sf_ctx, |
struct MemArena * | arena | ||
) |
Definition at line 803 of file scanfill.c.
References ScanFillContext::arena, BLI_assert, BLI_listbase_clear(), BLI_memarena_clear(), ScanFillContext::filledgebase, ScanFillContext::fillfacebase, and ScanFillContext::fillvertbase.
Referenced by BKE_displist_fill(), and BKE_maskrasterize_handle_init().
struct ScanFillVert* BLI_scanfill_vert_add | ( | ScanFillContext * | sf_ctx, |
const float | vec[3] | ||
) |
Definition at line 112 of file scanfill.c.
References ScanFillContext::arena, BLI_addtail(), BLI_memarena_alloc(), ScanFillVert::co, copy_v3_v3(), ScanFillVert::edge_count, ScanFillVert::f, ScanFillContext::fillvertbase, ScanFillVert::keyindex, NULL, ScanFillVert::p, ScanFillContext::poly_nr, ScanFillVert::poly_nr, SF_VERT_NEW, ScanFillVert::tmp, ScanFillVert::user_flag, ScanFillVert::xy, and zero_v2().
Referenced by BKE_displist_fill(), bmo_triangle_fill_exec(), scanfill_preprocess_self_isect(), and scanfill_vert_add_v2_with_depth().