Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_snap_object.c
| Show First 20 Lines • Show All 3,248 Lines • ▼ Show 20 Lines | |||||
| * \param sctx: Snap context. | * \param sctx: Snap context. | ||||
| * \param mval: Screenspace coordinate. | * \param mval: Screenspace coordinate. | ||||
| * \param prev_co: Coordinate for perpendicular point calculation (optional). | * \param prev_co: Coordinate for perpendicular point calculation (optional). | ||||
| * \param dist_px: Maximum distance to snap (in pixels). | * \param dist_px: Maximum distance to snap (in pixels). | ||||
| * \param r_loc: hit location. | * \param r_loc: hit location. | ||||
| * \param r_no: hit normal (optional). | * \param r_no: hit normal (optional). | ||||
| * \return Snap success | * \return Snap success | ||||
| */ | */ | ||||
| bool ED_transform_snap_object_project_view3d(SnapObjectContext *sctx, | short ED_transform_snap_object_project_view3d(SnapObjectContext *sctx, | ||||
| Depsgraph *depsgraph, | Depsgraph *depsgraph, | ||||
| const ARegion *region, | const ARegion *region, | ||||
| const View3D *v3d, | const View3D *v3d, | ||||
| const ushort snap_to, | const ushort snap_to, | ||||
| const struct SnapObjectParams *params, | const struct SnapObjectParams *params, | ||||
| const float mval[2], | const float mval[2], | ||||
| const float prev_co[3], | const float prev_co[3], | ||||
| float *dist_px, | float *dist_px, | ||||
| float r_loc[3], | float r_loc[3], | ||||
| float r_no[3]) | float r_no[3]) | ||||
| { | { | ||||
| return ED_transform_snap_object_project_view3d_ex(sctx, | return ED_transform_snap_object_project_view3d_ex(sctx, | ||||
| depsgraph, | depsgraph, | ||||
| region, | region, | ||||
| v3d, | v3d, | ||||
| snap_to, | snap_to, | ||||
| params, | params, | ||||
| mval, | mval, | ||||
| prev_co, | prev_co, | ||||
| dist_px, | dist_px, | ||||
| r_loc, | r_loc, | ||||
| r_no, | r_no, | ||||
| NULL, | NULL, | ||||
| NULL, | NULL, | ||||
| NULL, | NULL, | ||||
| NULL) != 0; | NULL); | ||||
| } | } | ||||
| /** | /** | ||||
| * see: #ED_transform_snap_object_project_ray_all | * see: #ED_transform_snap_object_project_ray_all | ||||
| */ | */ | ||||
| bool ED_transform_snap_object_project_all_view3d_ex(SnapObjectContext *sctx, | bool ED_transform_snap_object_project_all_view3d_ex(SnapObjectContext *sctx, | ||||
| Depsgraph *depsgraph, | Depsgraph *depsgraph, | ||||
| const ARegion *region, | const ARegion *region, | ||||
| Show All 19 Lines | |||||