|
Blender
V3.3
|
#include "DNA_scene_types.h"Go to the source code of this file.
Classes | |
| struct | SnapObjectHitDepth |
| struct | SnapObjectParams |
Typedefs | |
| typedef enum eSnapEditType | eSnapEditType |
| typedef struct SnapObjectContext | SnapObjectContext |
Enumerations | |
| enum | eSnapEditType { SNAP_GEOM_FINAL = 0 , SNAP_GEOM_CAGE = 1 , SNAP_GEOM_EDIT = 2 } |
| typedef enum eSnapEditType eSnapEditType |
| typedef struct SnapObjectContext SnapObjectContext |
Definition at line 1 of file ED_transform_snap_object_context.h.
| enum eSnapEditType |
| Enumerator | |
|---|---|
| SNAP_GEOM_FINAL | |
| SNAP_GEOM_CAGE | |
| SNAP_GEOM_EDIT | |
Definition at line 30 of file ED_transform_snap_object_context.h.
| SnapObjectContext* ED_transform_snap_object_context_create | ( | struct Scene * | scene, |
| int | flag | ||
| ) |
Definition at line 3201 of file transform_snap_object.cc.
References SnapObjectContext::flag, scene, and SnapObjectContext::scene.
Referenced by add_vertex_invoke(), ED_view3d_cursor3d_position_rotation(), EDBM_project_snap_verts(), gizmo_move_invoke(), gpencil_bake_grease_pencil_animation_exec(), gpencil_strokes_reproject_exec(), initSnappingMode(), initWalkInfo(), v3d_cursor_snap_context_ensure(), and wm_xr_raycast().
| void ED_transform_snap_object_context_destroy | ( | SnapObjectContext * | sctx | ) |
Definition at line 3212 of file transform_snap_object.cc.
Referenced by add_vertex_invoke(), ED_view3d_cursor3d_position_rotation(), EDBM_project_snap_verts(), freeSnapping(), gizmo_move_exit(), gpencil_bake_grease_pencil_animation_exec(), gpencil_strokes_reproject_exec(), v3d_cursor_snap_context_ensure(), v3d_cursor_snap_free(), walkEnd(), and wm_xr_raycast().
| void ED_transform_snap_object_context_set_editmesh_callbacks | ( | SnapObjectContext * | sctx, |
| bool(*)(struct BMVert *, void *user_data) | test_vert_fn, | ||
| bool(*)(struct BMEdge *, void *user_data) | test_edge_fn, | ||
| bool(*)(struct BMFace *, void *user_data) | test_face_fn, | ||
| void * | user_data | ||
| ) |
Referenced by initSnappingMode().
| bool ED_transform_snap_object_project_all_view3d_ex | ( | SnapObjectContext * | sctx, |
| struct Depsgraph * | depsgraph, | ||
| const ARegion * | region, | ||
| const View3D * | v3d, | ||
| const struct SnapObjectParams * | params, | ||
| const float | mval[2], | ||
| float | ray_depth, | ||
| bool | sort, | ||
| ListBase * | r_hit_list | ||
| ) |
see: ED_transform_snap_object_project_ray_all
Referenced by peelObjectsTransform().
| bool ED_transform_snap_object_project_ray | ( | SnapObjectContext * | sctx, |
| struct Depsgraph * | depsgraph, | ||
| const View3D * | v3d, | ||
| const struct SnapObjectParams * | params, | ||
| const float | ray_origin[3], | ||
| const float | ray_direction[3], | ||
| float * | ray_depth, | ||
| float | r_co[3], | ||
| float | r_no[3] | ||
| ) |
Referenced by ED_gpencil_stroke_reproject(), view3d_ruler_item_mousemove(), walk_floor_distance_get(), and walk_ray_cast().
| bool ED_transform_snap_object_project_ray_all | ( | SnapObjectContext * | sctx, |
| struct Depsgraph * | depsgraph, | ||
| const View3D * | v3d, | ||
| const struct SnapObjectParams * | params, | ||
| const float | ray_start[3], | ||
| const float | ray_normal[3], | ||
| float | ray_depth, | ||
| bool | sort, | ||
| struct ListBase * | r_hit_list | ||
| ) |
Fill in a list of all hits.
| ray_depth | Only depths in this range are considered, -1.0 for maximum. |
| sort | Optionally sort the hits by depth. |
| r_hit_list | List of SnapObjectHitDepth (caller must free). |
| bool ED_transform_snap_object_project_ray_ex | ( | struct SnapObjectContext * | sctx, |
| struct Depsgraph * | depsgraph, | ||
| const View3D * | v3d, | ||
| const struct SnapObjectParams * | params, | ||
| const float | ray_start[3], | ||
| const float | ray_normal[3], | ||
| float * | ray_depth, | ||
| float | r_loc[3], | ||
| float | r_no[3], | ||
| int * | r_index, | ||
| struct Object ** | r_ob, | ||
| float | r_obmat[4][4] | ||
| ) |
Referenced by wm_xr_raycast().
| eSnapMode ED_transform_snap_object_project_view3d | ( | struct SnapObjectContext * | sctx, |
| struct Depsgraph * | depsgraph, | ||
| const ARegion * | region, | ||
| const View3D * | v3d, | ||
| const eSnapMode | snap_to, | ||
| const struct SnapObjectParams * | params, | ||
| const float | init_co[3], | ||
| const float | mval[2], | ||
| const float | prev_co[3], | ||
| float * | dist_px, | ||
| float | r_loc[3], | ||
| float | r_no[3] | ||
| ) |
Convenience function for performing snapping.
Given a 2D region value, snap to vert/edge/face.
| sctx | Snap context. |
| snap_to | Target elements to snap source to. |
| params | Addition snapping options. |
| init_co | Initial world-space coordinate of source (optional). |
| mval | Current transformed screen-space coordinate or mouse position (optional). |
| prev_co | Current transformed world-space coordinate of source (optional). |
| dist_px | Maximum distance to snap (in pixels). |
| r_loc | Snapped world-space coordinate. |
| r_no | Snapped world-space normal (optional). |
Referenced by add_vertex_invoke(), applyFaceNearest(), applyFaceProject(), EDBM_project_snap_verts(), gizmo_move_modal(), snapObjectsTransform(), and view3d_ruler_item_mousemove().
| eSnapMode ED_transform_snap_object_project_view3d_ex | ( | struct SnapObjectContext * | sctx, |
| struct Depsgraph * | depsgraph, | ||
| const ARegion * | region, | ||
| const View3D * | v3d, | ||
| const eSnapMode | snap_to, | ||
| const struct SnapObjectParams * | params, | ||
| const float | init_co[3], | ||
| const float | mval[2], | ||
| const float | prev_co[3], | ||
| float * | dist_px, | ||
| float | r_loc[3], | ||
| float | r_no[3], | ||
| int * | r_index, | ||
| struct Object ** | r_ob, | ||
| float | r_obmat[4][4], | ||
| float | r_face_nor[3] | ||
| ) |
Perform snapping.
Given a 2D region value, snap to vert/edge/face/grid.
| sctx | Snap context. |
| snap_to | Target elements to snap source to. |
| params | Addition snapping options. |
| init_co | Initial world-space coordinate of source (optional). |
| mval | Current transformed screen-space coordinate or mouse position (optional). |
| prev_co | Current transformed world-space coordinate of source (optional). |
| dist_px | Maximum distance to snap (in pixels). |
| r_loc | Snapped world-space coordinate. |
| r_no | Snapped world-space normal (optional). |
| r_index | Index of snapped-to target element (optional). |
| r_ob | Snapped-to target object (optional). |
| r_obmat | Matrix of snapped-to target object (optional). |
| r_face_nor | World-space normal of snapped-to target face (optional). |
Referenced by ED_view3d_cursor3d_position_rotation(), and v3d_cursor_snap_update().