Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 7,180 Lines • ▼ Show 20 Lines | float SCULPT_raycast_init(ViewContext *vc, | ||||
| mul_m4_v3(obimat, ray_start); | mul_m4_v3(obimat, ray_start); | ||||
| mul_m4_v3(obimat, ray_end); | mul_m4_v3(obimat, ray_end); | ||||
| sub_v3_v3v3(ray_normal, ray_end, ray_start); | sub_v3_v3v3(ray_normal, ray_end, ray_start); | ||||
| dist = normalize_v3(ray_normal); | dist = normalize_v3(ray_normal); | ||||
| if ((rv3d->is_persp == false) && | if ((rv3d->is_persp == false) && | ||||
| /* If the ray is clipped, don't adjust its start/end. */ | /* If the ray is clipped, don't adjust its start/end. */ | ||||
| RV3D_CLIPPING_ENABLED(v3d, rv3d)) { | !RV3D_CLIPPING_ENABLED(v3d, rv3d)) { | ||||
| BKE_pbvh_raycast_project_ray_root(ob->sculpt->pbvh, original, ray_start, ray_end, ray_normal); | BKE_pbvh_raycast_project_ray_root(ob->sculpt->pbvh, original, ray_start, ray_end, ray_normal); | ||||
| /* rRecalculate the normal. */ | /* rRecalculate the normal. */ | ||||
| sub_v3_v3v3(ray_normal, ray_end, ray_start); | sub_v3_v3v3(ray_normal, ray_end, ray_start); | ||||
| dist = normalize_v3(ray_normal); | dist = normalize_v3(ray_normal); | ||||
| } | } | ||||
| return dist; | return dist; | ||||
| ▲ Show 20 Lines • Show All 2,067 Lines • Show Last 20 Lines | |||||