Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/gpencil_geom.c
| Context not available. | |||||
| float vec1[3]; | float vec1[3]; | ||||
| float vec2[3]; | float vec2[3]; | ||||
| float vec3[3]; | |||||
| /* initial vector (p0 -> p1) */ | /* initial vector (p0 -> p1) */ | ||||
| sub_v3_v3v3(vec1, &pt1->x, &pt0->x); | sub_v3_v3v3(vec1, &pt1->x, &pt0->x); | ||||
| Context not available. | |||||
| sub_v3_v3v3(vec2, &pt3->x, &pt0->x); | sub_v3_v3v3(vec2, &pt3->x, &pt0->x); | ||||
| /* vector orthogonal to polygon plane */ | /* vector orthogonal to polygon plane */ | ||||
| cross_v3_v3v3(r_normal, vec1, vec2); | cross_v3_v3v3(vec3, vec1, vec2); | ||||
| cross_v3_v3v3(r_normal, vec1, vec3); | |||||
| /* Normalize vector */ | /* Normalize vector */ | ||||
| normalize_v3(r_normal); | normalize_v3(r_normal); | ||||
| Context not available. | |||||