Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_utils.c
| Show First 20 Lines • Show All 1,386 Lines • ▼ Show 20 Lines | |||||
| static void scale_point(float c1[3], const float p[3], const float s) | static void scale_point(float c1[3], const float p[3], const float s) | ||||
| { | { | ||||
| sub_v3_v3(c1, p); | sub_v3_v3(c1, p); | ||||
| mul_v3_fl(c1, s); | mul_v3_fl(c1, s); | ||||
| add_v3_v3(c1, p); | add_v3_v3(c1, p); | ||||
| } | } | ||||
| bool BMBVH_EdgeVisible(struct BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v3d, Object *obedit) | bool BMBVH_EdgeVisible(struct BMBVHTree *tree, BMEdge *e, | ||||
| const struct Depsgraph *depsgraph, | |||||
| ARegion *ar, View3D *v3d, Object *obedit) | |||||
| { | { | ||||
| BMFace *f; | BMFace *f; | ||||
| float co1[3], co2[3], co3[3], dir1[3], dir2[3], dir3[3]; | float co1[3], co2[3], co3[3], dir1[3], dir2[3], dir3[3]; | ||||
| float origin[3], invmat[4][4]; | float origin[3], invmat[4][4]; | ||||
| float epsilon = 0.01f; | float epsilon = 0.01f; | ||||
| float end[3]; | float end[3]; | ||||
| const float mval_f[2] = {ar->winx / 2.0f, | const float mval_f[2] = {ar->winx / 2.0f, | ||||
| ar->winy / 2.0f}; | ar->winy / 2.0f}; | ||||
| ED_view3d_win_to_segment(ar, v3d, mval_f, origin, end, false); | ED_view3d_win_to_segment(depsgraph, ar, v3d, mval_f, origin, end, false); | ||||
| invert_m4_m4(invmat, obedit->obmat); | invert_m4_m4(invmat, obedit->obmat); | ||||
| mul_m4_v3(invmat, origin); | mul_m4_v3(invmat, origin); | ||||
| copy_v3_v3(co1, e->v1->co); | copy_v3_v3(co1, e->v1->co); | ||||
| mid_v3_v3v3(co2, e->v1->co, e->v2->co); | mid_v3_v3v3(co2, e->v1->co, e->v2->co); | ||||
| copy_v3_v3(co3, e->v2->co); | copy_v3_v3(co3, e->v2->co); | ||||
| Show All 34 Lines | |||||