Blender V2.61 - r43446
|
Go to the source code of this file.
Definition in file BKE_sketch.h.
#define SK_OVERDRAW_LIMIT 5 |
Definition at line 61 of file BKE_sketch.h.
Referenced by sk_hasOverdraw(), and sk_updateOverdraw().
#define SK_Stroke_BUFFER_INIT_SIZE 20 |
Definition at line 70 of file BKE_sketch.h.
Referenced by sk_createStroke().
typedef struct SK_DrawData SK_DrawData |
typedef struct SK_Gesture SK_Gesture |
typedef struct SK_Intersection SK_Intersection |
typedef struct SK_Overdraw SK_Overdraw |
enum SK_PMode |
Definition at line 35 of file BKE_sketch.h.
enum SK_PType |
Definition at line 29 of file BKE_sketch.h.
SK_Sketch* createSketch | ( | void | ) |
Definition at line 59 of file sketch.c.
References SK_Sketch::active_stroke, ListBase::first, SK_Sketch::gesture, ListBase::last, MEM_callocN(), NULL, and SK_Sketch::strokes.
Referenced by contextSketch(), and viewcontextSketch().
void freeSketch | ( | SK_Sketch * | sketch | ) |
Definition at line 43 of file sketch.c.
References BLI_freelistN(), SK_Sketch::depth_peels, ListBase::first, MEM_freeN(), SK_Stroke::next, next, sk_freeStroke(), and SK_Sketch::strokes.
Referenced by free_armature().
void sk_allocStrokeBuffer | ( | SK_Stroke * | stk | ) |
Definition at line 96 of file sketch.c.
References SK_Stroke::buf_size, MEM_callocN(), and SK_Stroke::points.
Referenced by sk_createStroke(), sk_filterStroke(), sk_growStrokeBuffer(), sk_growStrokeBufferN(), sk_reverseStroke(), and sk_shrinkStrokeBuffer().
Definition at line 192 of file sketch.c.
References SK_Stroke::nb_points, SK_Stroke::points, and sk_growStrokeBuffer().
Referenced by sk_addStrokeDrawPoint(), sk_addStrokeSnapPoint(), sk_filterStroke(), and sk_getSegments().
Definition at line 91 of file sketch.c.
Referenced by sk_reverseStroke().
SK_Stroke* sk_createStroke | ( | void | ) |
Definition at line 107 of file sketch.c.
References SK_Stroke::buf_size, MEM_callocN(), SK_Stroke::nb_points, SK_Stroke::selected, sk_allocStrokeBuffer(), and SK_Stroke_BUFFER_INIT_SIZE.
Referenced by sk_initGesture(), sk_start_draw_gesture(), and sk_startStroke().
void sk_deleteSelectedStrokes | ( | SK_Sketch * | sketch | ) |
Definition at line 553 of file sketch.c.
References ListBase::first, SK_Stroke::next, next, SK_Stroke::selected, sk_removeStroke(), and SK_Sketch::strokes.
Referenced by BIF_deleteSketch(), and sketch_delete().
void sk_endContinuousStroke | ( | SK_Stroke * | stk | ) |
Definition at line 519 of file sketch.c.
References SK_Stroke::nb_points, SK_Stroke::points, PT_EXACT, and SK_Point::type.
Referenced by sketch_draw_modal().
void sk_filterLastContinuousStroke | ( | SK_Stroke * | stk | ) |
Definition at line 490 of file sketch.c.
References SK_Stroke::nb_points, SK_Stroke::points, PT_CONTINUOUS, sk_filterStroke(), and SK_Point::type.
Referenced by sketch_draw_modal().
void sk_filterStroke | ( | SK_Stroke * | stk, |
int | start, | ||
int | end | ||
) |
Definition at line 374 of file sketch.c.
References i, max_i(), MEM_callocN(), MEM_freeN(), mul(), SK_Stroke::nb_points, NULL, SK_Point::p2d, SK_Stroke::points, sk_allocStrokeBuffer(), sk_appendStrokePoint(), and sk_shrinkStrokeBuffer().
Referenced by sk_filterLastContinuousStroke().
void sk_flattenStroke | ( | SK_Stroke * | stk, |
int | start, | ||
int | end | ||
) |
Definition at line 315 of file sketch.c.
References add_v3_v3(), copy_v3_v3(), simple_enum_gen::d, distance(), i, mul_v3_fl(), SK_Point::no, normalize_v3(), p, SK_Point::p, SK_Stroke::points, project_v3_v3v3(), sub_v3_v3(), sub_v3_v3v3(), and VECCOPY.
Referenced by sk_applyCommandGesture().
void sk_freeStroke | ( | SK_Stroke * | stk | ) |
Definition at line 101 of file sketch.c.
References MEM_freeN(), and SK_Stroke::points.
Referenced by freeSketch(), sk_freeGesture(), sk_removeStroke(), and sketch_draw_modal().
void sk_growStrokeBuffer | ( | SK_Stroke * | stk | ) |
Definition at line 138 of file sketch.c.
References SK_Stroke::buf_size, MEM_freeN(), SK_Stroke::nb_points, SK_Stroke::points, and sk_allocStrokeBuffer().
Referenced by sk_appendStrokePoint(), and sk_insertStrokePoint().
void sk_growStrokeBufferN | ( | SK_Stroke * | stk, |
int | n | ||
) |
Definition at line 154 of file sketch.c.
References SK_Stroke::buf_size, MEM_freeN(), SK_Stroke::nb_points, SK_Stroke::points, and sk_allocStrokeBuffer().
Referenced by sk_insertStrokePoints().
void sk_initDrawData | ( | SK_DrawData * | dd, |
const int | mval[2] | ||
) |
Definition at line 543 of file sketch.c.
References SK_DrawData::mval, SK_DrawData::previous_mval, PT_EXACT, and SK_DrawData::type.
Referenced by sketch_draw_gesture(), sketch_draw_preview(), and sketch_draw_stroke().
void sk_initPoint | ( | SK_Point * | pt, |
SK_DrawData * | dd, | ||
float * | no | ||
) |
Definition at line 74 of file sketch.c.
References SK_DrawData::mval, SK_Point::no, normalize_v3_v3(), and SK_Point::p2d.
Referenced by sk_addStrokeDrawPoint(), and sk_addStrokeSnapPoint().
Definition at line 179 of file sketch.c.
References SK_Stroke::nb_points, SK_Stroke::points, size(), and sk_growStrokeBuffer().
Referenced by sk_applyCutGesture(), and sk_straightenStroke().
Definition at line 201 of file sketch.c.
References SK_Stroke::nb_points, SK_Stroke::points, size(), and sk_growStrokeBufferN().
Referenced by sk_endOverdraw().
Definition at line 507 of file sketch.c.
References SK_Stroke::nb_points, NULL, and SK_Stroke::points.
Referenced by sk_detectMergeGesture(), sk_detectReverseGesture(), sk_drawSketch(), sk_endOverdraw(), sk_projectDrawPoint(), sk_strokeToArc(), and sk_updateOverdraw().
void sk_polygonizeStroke | ( | SK_Stroke * | stk, |
int | start, | ||
int | end | ||
) |
Definition at line 269 of file sketch.c.
References i, SK_Stroke::nb_points, SK_Stroke::points, PT_EXACT, size(), and SK_Point::type.
Referenced by sk_applyCommandGesture().
Definition at line 346 of file sketch.c.
References SK_Sketch::active_stroke, BLI_remlink(), NULL, sk_freeStroke(), and SK_Sketch::strokes.
Referenced by sk_applyDeleteGesture(), sk_cancelStroke(), sk_deleteSelectedStrokes(), sk_endOverdraw(), and sk_finish_stroke().
Definition at line 174 of file sketch.c.
References SK_Stroke::points.
Referenced by sk_applyTrimGesture().
void sk_reverseStroke | ( | SK_Stroke * | stk | ) |
Definition at line 357 of file sketch.c.
References i, MEM_freeN(), SK_Stroke::nb_points, SK_Stroke::points, sk_allocStrokeBuffer(), and sk_copyPoint().
Referenced by sk_applyReverseGesture(), and sk_endOverdraw().
void sk_selectAllSketch | ( | SK_Sketch * | sketch, |
int | mode | ||
) |
Definition at line 568 of file sketch.c.
References ListBase::first, SK_Stroke::next, NULL, SK_Stroke::selected, and SK_Sketch::strokes.
Referenced by sk_selectStroke(), and sk_start_draw_stroke().
void sk_shrinkStrokeBuffer | ( | SK_Stroke * | stk | ) |
Definition at line 122 of file sketch.c.
References SK_Stroke::buf_size, MEM_freeN(), SK_Stroke::nb_points, SK_Stroke::points, and sk_allocStrokeBuffer().
Referenced by sk_endStroke(), and sk_filterStroke().
void sk_straightenStroke | ( | SK_Stroke * | stk, |
int | start, | ||
int | end, | ||
float | p_start[3], | ||
float | p_end[3] | ||
) |
Definition at line 231 of file sketch.c.
References add_v3_v3(), copy_v3_v3(), i, SK_Point::mode, mul_v3_fl(), next, SK_Point::no, p, SK_Point::p, SK_Stroke::points, sk_insertStrokePoint(), sub_v3_v3v3(), SK_Point::type, and VECCOPY.
Referenced by sk_applyCommandGesture().
int sk_stroke_filtermval | ( | SK_DrawData * | dd | ) |
Definition at line 532 of file sketch.c.
References ABS, UserDef::gp_manhattendist, SK_DrawData::mval, SK_DrawData::previous_mval, and U.
Referenced by sk_draw_stroke().
void sk_trimStroke | ( | SK_Stroke * | stk, |
int | start, | ||
int | end | ||
) |
Definition at line 219 of file sketch.c.
References SK_Stroke::nb_points, SK_Stroke::points, and size().
Referenced by sk_applyTrimGesture().
Definition at line 524 of file sketch.c.
References SK_Stroke::nb_points, SK_Sketch::next_point, SK_Point::p, and SK_Stroke::points.
Referenced by sk_draw_stroke(), and sketch_draw_modal().