Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/ED_transform_snap_object_context.h
| Show All 15 Lines | |||||
| struct ARegion; | struct ARegion; | ||||
| struct Depsgraph; | struct Depsgraph; | ||||
| struct ListBase; | struct ListBase; | ||||
| struct Object; | struct Object; | ||||
| struct Scene; | struct Scene; | ||||
| struct View3D; | struct View3D; | ||||
| /* transform_snap_object.c */ | /* transform_snap_object.cc */ | ||||
| /* ED_transform_snap_object_*** API */ | /* ED_transform_snap_object_*** API */ | ||||
| typedef enum { | typedef enum eSnapSelect { | ||||
| SNAP_ALL = 0, | SNAP_ALL = 0, | ||||
| SNAP_NOT_SELECTED = 1, | SNAP_NOT_SELECTED = 1, | ||||
| SNAP_NOT_ACTIVE = 2, | SNAP_NOT_ACTIVE = 2, | ||||
| SNAP_NOT_EDITED = 3, | SNAP_NOT_EDITED = 3, | ||||
| SNAP_ONLY_ACTIVE = 4, | SNAP_ONLY_ACTIVE = 4, | ||||
| SNAP_SELECTABLE = 5, | SNAP_SELECTABLE = 5, | ||||
| } eSnapSelect; | } eSnapSelect; | ||||
| typedef enum { | typedef enum eSnapEditType { | ||||
| SNAP_GEOM_FINAL = 0, | SNAP_GEOM_FINAL = 0, | ||||
| SNAP_GEOM_CAGE = 1, | SNAP_GEOM_CAGE = 1, | ||||
| SNAP_GEOM_EDIT = 2, /* Bmesh for mesh-type. */ | SNAP_GEOM_EDIT = 2, /* Bmesh for mesh-type. */ | ||||
| } eSnapEditType; | } eSnapEditType; | ||||
| /** used for storing multiple hits */ | /** used for storing multiple hits */ | ||||
| struct SnapObjectHitDepth { | struct SnapObjectHitDepth { | ||||
| struct SnapObjectHitDepth *next, *prev; | struct SnapObjectHitDepth *next, *prev; | ||||
| Show All 9 Lines | struct SnapObjectHitDepth { | ||||
| /* needed to tell which ray-cast this was part of, | /* needed to tell which ray-cast this was part of, | ||||
| * the same object may be part of many ray-casts when dupli's are used. */ | * the same object may be part of many ray-casts when dupli's are used. */ | ||||
| unsigned int ob_uuid; | unsigned int ob_uuid; | ||||
| }; | }; | ||||
| /** parameters that define which objects will be used to snap. */ | /** parameters that define which objects will be used to snap. */ | ||||
| struct SnapObjectParams { | struct SnapObjectParams { | ||||
| /* Special context sensitive handling for the active or selected object. */ | /* Special context sensitive handling for the active or selected object. */ | ||||
| char snap_select; | eSnapSelect snap_select; | ||||
| /* Geometry for snapping in edit mode. */ | /* Geometry for snapping in edit mode. */ | ||||
| char edit_mode_type; | eSnapEditType edit_mode_type; | ||||
| /* snap to the closest element, use when using more than one snap type */ | /* snap to the closest element, use when using more than one snap type */ | ||||
| unsigned int use_occlusion_test : 1; | bool use_occlusion_test : true; | ||||
| /* exclude back facing geometry from snapping */ | /* exclude back facing geometry from snapping */ | ||||
| unsigned int use_backface_culling : 1; | bool use_backface_culling : true; | ||||
| }; | }; | ||||
| typedef struct SnapObjectContext SnapObjectContext; | typedef struct SnapObjectContext SnapObjectContext; | ||||
| SnapObjectContext *ED_transform_snap_object_context_create(struct Scene *scene, int flag); | SnapObjectContext *ED_transform_snap_object_context_create(struct Scene *scene, int flag); | ||||
| void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx); | void ED_transform_snap_object_context_destroy(SnapObjectContext *sctx); | ||||
| /* callbacks to filter how snap works */ | /* callbacks to filter how snap works */ | ||||
| void ED_transform_snap_object_context_set_editmesh_callbacks( | void ED_transform_snap_object_context_set_editmesh_callbacks( | ||||
| ▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines | |||||