Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
| Show First 20 Lines • Show All 407 Lines • ▼ Show 20 Lines | |||||
| #define LRT_ABC(index) (index == 0 ? a : (index == 1 ? b : c)) | #define LRT_ABC(index) (index == 0 ? a : (index == 1 ? b : c)) | ||||
| #define LRT_DOUBLE_CLOSE_ENOUGH(a, b) (((a) + DBL_EDGE_LIM) >= (b) && ((a)-DBL_EDGE_LIM) <= (b)) | #define LRT_DOUBLE_CLOSE_ENOUGH(a, b) (((a) + DBL_EDGE_LIM) >= (b) && ((a)-DBL_EDGE_LIM) <= (b)) | ||||
| BLI_INLINE int lineart_LineIntersectTest2d( | BLI_INLINE int lineart_LineIntersectTest2d( | ||||
| const double *a1, const double *a2, const double *b1, const double *b2, double *aRatio) | const double *a1, const double *a2, const double *b1, const double *b2, double *aRatio) | ||||
| { | { | ||||
| #define USE_VECTOR_LINE_INTERSECTION | /* Legacy intersection math aligns better with occlusion function quirks. */ | ||||
| /* #define USE_VECTOR_LINE_INTERSECTION */ | |||||
| #ifdef USE_VECTOR_LINE_INTERSECTION | #ifdef USE_VECTOR_LINE_INTERSECTION | ||||
| /* from isect_line_line_v2_point() */ | /* from isect_line_line_v2_point() */ | ||||
| double s10[2], s32[2]; | double s10[2], s32[2]; | ||||
| double div; | double div; | ||||
| sub_v2_v2v2_db(s10, a2, a1); | sub_v2_v2v2_db(s10, a2, a1); | ||||
| ▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines | |||||