Blender V2.61 - r43446
|
#include "MEM_guardedalloc.h"
#include "BLI_callbacks.h"
#include "BLI_editVert.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_scanfill.h"
Go to the source code of this file.
Classes | |
struct | PolyFill |
struct | ScFillVert |
struct | mem_elements |
Defines | |
#define | COMPLIMIT 0.00003 |
Typedefs | |
typedef struct PolyFill | PolyFill |
typedef struct ScFillVert | ScFillVert |
Functions | |
void | BLI_setErrorCallBack (void(*f)(const char *)) |
void | BLI_setInterruptCallBack (int(*f)(void)) |
void | callLocalErrorCallBack (const char *msg) |
static int | vergscdata (const void *a1, const void *a2) |
static int | vergpoly (const void *a1, const void *a2) |
static void * | new_mem_element (int size) |
void | BLI_end_edgefill (void) |
EditVert * | BLI_addfillvert (float *vec) |
EditEdge * | BLI_addfilledge (EditVert *v1, EditVert *v2) |
static void | addfillface (EditVert *v1, EditVert *v2, EditVert *v3, short mat_nr) |
static int | boundisect (PolyFill *pf2, PolyFill *pf1) |
static void | mergepolysSimp (PolyFill *pf1, PolyFill *pf2) |
static short | testedgeside (float *v1, float *v2, float *v3) |
static short | addedgetoscanvert (ScFillVert *sc, EditEdge *eed) |
static ScFillVert * | addedgetoscanlist (EditEdge *eed, int len) |
static short | boundinsideEV (EditEdge *eed, EditVert *eve) |
static void | testvertexnearedge (void) |
static void | splitlist (ListBase *tempve, ListBase *temped, short nr) |
static int | scanfill (PolyFill *pf, short mat_nr) |
int | BLI_edgefill (short mat_nr) |
Variables | |
static void(* | BLI_localErrorCallBack )(const char *) = NULL |
static int(* | BLI_localInterruptCallBack )(void) = NULL |
static ScFillVert * | scdata |
ListBase | fillvertbase = {NULL, NULL} |
ListBase | filledgebase = {NULL, NULL} |
ListBase | fillfacebase = {NULL, NULL} |
static int | cox |
static int | coy |
Definition in file scanfill.c.
#define COMPLIMIT 0.00003 |
Definition at line 91 of file scanfill.c.
Referenced by BLI_edgefill(), and testvertexnearedge().
typedef struct ScFillVert ScFillVert |
static ScFillVert* addedgetoscanlist | ( | EditEdge * | eed, |
int | len | ||
) | [static] |
Definition at line 341 of file scanfill.c.
References addedgetoscanvert(), EditVert::co, ScFillVert::v1, EditEdge::v1, EditEdge::v2, and vergscdata().
Referenced by scanfill().
static short addedgetoscanvert | ( | ScFillVert * | sc, |
EditEdge * | eed | ||
) | [static] |
Definition at line 297 of file scanfill.c.
References BLI_addtail(), BLI_insertlinkbefore(), EditVert::co, cox, coy, ScFillVert::first, ScFillVert::last, EditEdge::next, EditEdge::prev, EditEdge::v1, and EditEdge::v2.
Referenced by addedgetoscanlist().
Definition at line 219 of file scanfill.c.
References BLI_addtail(), EditFace::f, EditFace::mat_nr, new_mem_element(), EditFace::v1, EditFace::v2, and EditFace::v3.
Referenced by scanfill().
Definition at line 206 of file scanfill.c.
References BLI_addtail(), new_mem_element(), EditEdge::v1, and EditEdge::v2.
Referenced by draw_filled_lasso(), fill_mesh(), filldisplist(), scanfill(), and testvertexnearedge().
EditVert* BLI_addfillvert | ( | float * | vec | ) | [read] |
Definition at line 192 of file scanfill.c.
References BLI_addtail(), EditVert::co, and new_mem_element().
Referenced by draw_filled_lasso(), fill_mesh(), and filldisplist().
int BLI_edgefill | ( | short | mat_nr | ) |
Definition at line 754 of file scanfill.c.
References axis_dominant_v3(), BLI_movelisttolist(), BLI_remlink(), boundisect(), callLocalErrorCallBack(), EditVert::co, compare_v3v3(), COMPLIMIT, cox, coy, PolyFill::edges, PolyFill::f, EditEdge::f, EditVert::f, EditEdge::f1, ListBase::first, EditEdge::h, EditVert::h, ListBase::last, len(), PolyFill::max, MEM_callocN(), MEM_freeN(), mergepolysSimp(), PolyFill::min, EditEdge::next, EditVert::next, norm(), normal_tri_v3(), PolyFill::nr, pf, EditEdge::prev, scanfill(), splitlist(), testvertexnearedge(), EditEdge::v1, EditEdge::v2, vergpoly(), PolyFill::verts, and EditVert::xs.
Referenced by draw_filled_lasso(), fill_mesh(), and filldisplist().
void BLI_end_edgefill | ( | void | ) |
Definition at line 181 of file scanfill.c.
References ListBase::first, ListBase::last, and new_mem_element().
Referenced by draw_filled_lasso(), fill_mesh(), and filldisplist().
void BLI_setErrorCallBack | ( | void(*)(const char *) | f | ) |
Set a function taking a char* as argument to flag errors. If the callback is not set, the error is discarded.
f | The function to use as callback |
Definition at line 46 of file scanfill.c.
References BLI_localErrorCallBack.
Referenced by setCallbacks().
void BLI_setInterruptCallBack | ( | int(*)(void) | f | ) |
Set a function to be able to interrupt the execution of processing in this module. If the function returns true, the execution will terminate gracefully. If the callback is not set, interruption is not possible.
f | The function to use as callback |
Definition at line 51 of file scanfill.c.
References BLI_localInterruptCallBack.
Definition at line 372 of file scanfill.c.
References EditVert::co, cox, coy, EditEdge::v1, and EditEdge::v2.
Referenced by testvertexnearedge().
Definition at line 234 of file scanfill.c.
References cox, coy, PolyFill::edges, PolyFill::max, and PolyFill::min.
Referenced by BLI_edgefill().
void callLocalErrorCallBack | ( | const char * | msg | ) |
Definition at line 57 of file scanfill.c.
References BLI_localErrorCallBack.
Referenced by BLI_edgefill().
Definition at line 258 of file scanfill.c.
References PolyFill::edges, PolyFill::f, EditEdge::f1, ListBase::first, EditEdge::next, EditVert::next, PolyFill::nr, PolyFill::verts, and EditVert::xs.
Referenced by BLI_edgefill().
static void* new_mem_element | ( | int | size | ) | [static] |
Definition at line 141 of file scanfill.c.
References BLI_addtail(), BLI_freelistN(), mem_elements::data, ListBase::first, MEM_callocN(), MEM_freeN(), mem_elements::next, NULL, offs, and size().
Referenced by addfillface(), BLI_addfilledge(), BLI_addfillvert(), and BLI_end_edgefill().
static int scanfill | ( | PolyFill * | pf, |
short | mat_nr | ||
) | [static] |
Definition at line 495 of file scanfill.c.
References addedgetoscanlist(), addfillface(), BLI_addfilledge(), BLI_addtail(), BLI_insertlinkbefore(), BLI_remlink(), EditVert::co, coy, PolyFill::f, EditEdge::f, EditVert::f, ScFillVert::first, ListBase::first, EditVert::h, ScFillVert::last, MEM_callocN(), MEM_freeN(), EditVert::next, EditEdge::next, PolyFill::nr, NULL, scdata, rna_array::test, testedgeside(), EditVert::tmp, EditVert::v, ScFillVert::v1, EditEdge::v1, EditEdge::v2, vergscdata(), PolyFill::verts, and EditVert::xs.
Referenced by BLI_edgefill().
Definition at line 465 of file scanfill.c.
References BLI_addtail(), BLI_movelisttolist(), BLI_remlink(), EditEdge::f1, ListBase::first, EditEdge::next, EditVert::next, and EditVert::xs.
Referenced by BLI_edgefill().
static short testedgeside | ( | float * | v1, |
float * | v2, | ||
float * | v3 | ||
) | [static] |
static void testvertexnearedge | ( | void | ) | [static] |
Definition at line 398 of file scanfill.c.
References BLI_addfilledge(), boundinsideEV(), EditVert::co, compare_v3v3(), COMPLIMIT, cox, coy, dist_to_line_v2(), EditEdge::f, EditEdge::f1, ListBase::first, EditEdge::h, EditVert::h, EditVert::next, EditEdge::next, EditEdge::v1, EditEdge::v2, and EditVert::xs.
Referenced by BLI_edgefill().
static int vergpoly | ( | const void * | a1, |
const void * | a2 | ||
) | [static] |
static int vergscdata | ( | const void * | a1, |
const void * | a2 | ||
) | [static] |
Definition at line 104 of file scanfill.c.
References EditVert::co, and ScFillVert::v1.
Referenced by addedgetoscanlist(), and scanfill().
void(* BLI_localErrorCallBack)(const char *) = NULL [static] |
Definition at line 43 of file scanfill.c.
Referenced by BLI_setErrorCallBack(), and callLocalErrorCallBack().
int(* BLI_localInterruptCallBack)(void) = NULL [static] |
Definition at line 44 of file scanfill.c.
Referenced by BLI_setInterruptCallBack().
int cox [static] |
Definition at line 99 of file scanfill.c.
Referenced by addedgetoscanvert(), BLI_edgefill(), boundinsideEV(), boundisect(), cu_isectLL(), cube_project_exec(), Kx_VecUpMat3(), testedgeside(), and testvertexnearedge().
int coy |
Definition at line 99 of file scanfill.c.
Referenced by addedgetoscanvert(), BLI_edgefill(), boundinsideEV(), boundisect(), cu_isectLL(), cube_project_exec(), Kx_VecUpMat3(), scanfill(), testedgeside(), and testvertexnearedge().
ListBase filledgebase = {NULL, NULL} |
Definition at line 96 of file scanfill.c.
Referenced by fill_mesh().
ListBase fillfacebase = {NULL, NULL} |
Definition at line 97 of file scanfill.c.
Referenced by draw_filled_lasso(), fill_mesh(), and filldisplist().
ListBase fillvertbase = {NULL, NULL} |
Definition at line 95 of file scanfill.c.
Referenced by filldisplist().
ScFillVert* scdata [static] |
Definition at line 93 of file scanfill.c.
Referenced by scanfill().