Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

scanfill.c File Reference

#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)
EditVertBLI_addfillvert (float *vec)
EditEdgeBLI_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 ScFillVertaddedgetoscanlist (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 ScFillVertscdata
ListBase fillvertbase = {NULL, NULL}
ListBase filledgebase = {NULL, NULL}
ListBase fillfacebase = {NULL, NULL}
static int cox
static int coy

Detailed Description

Definition in file scanfill.c.


Define Documentation

#define COMPLIMIT   0.00003

Definition at line 91 of file scanfill.c.

Referenced by BLI_edgefill(), and testvertexnearedge().


Typedef Documentation

typedef struct PolyFill PolyFill
typedef struct ScFillVert ScFillVert

Function Documentation

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]
static void addfillface ( EditVert v1,
EditVert v2,
EditVert v3,
short  mat_nr 
) [static]
EditEdge* BLI_addfilledge ( EditVert v1,
EditVert v2 
) [read]
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)
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.

Parameters:
fThe function to use as callback
Attention:
used in creator.c

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.

Parameters:
fThe function to use as callback
Attention:
used in creator.c

Definition at line 51 of file scanfill.c.

References BLI_localInterruptCallBack.

static short boundinsideEV ( EditEdge eed,
EditVert eve 
) [static]

Definition at line 372 of file scanfill.c.

References EditVert::co, cox, coy, EditEdge::v1, and EditEdge::v2.

Referenced by testvertexnearedge().

static int boundisect ( PolyFill pf2,
PolyFill pf1 
) [static]

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().

static void mergepolysSimp ( PolyFill pf1,
PolyFill pf2 
) [static]
static void* new_mem_element ( int  size) [static]
static int scanfill ( PolyFill pf,
short  mat_nr 
) [static]
static void splitlist ( ListBase tempve,
ListBase temped,
short  nr 
) [static]
static short testedgeside ( float *  v1,
float *  v2,
float *  v3 
) [static]

Definition at line 281 of file scanfill.c.

References cox, and coy.

Referenced by scanfill().

static void testvertexnearedge ( void  ) [static]
static int vergpoly ( const void *  a1,
const void *  a2 
) [static]

Definition at line 116 of file scanfill.c.

References PolyFill::min.

Referenced by BLI_edgefill().

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().


Variable Documentation

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]
int coy
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}
Attention:
Defined in scanfill.c

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().