diff options
author | Hans Goudey <h.goudey@me.com> | 2022-03-28 22:59:42 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-03-28 22:59:42 +0300 |
commit | 037f7891115318e60a63ffcb1bf877b0bbc35d0f (patch) | |
tree | 560a21c91ce874f26482461fd089a0feadd12e89 /source/blender/editors/include | |
parent | 21e72496a6297a1cee4fcb77f3efa24b7ee3c418 (diff) |
Cleanup: Move transform_snap_object.c to C++
This is meant to allow using C++ data structures in this file
as a performance improvement. Particularly `Vector` instead
of `ListBase` for `duplilist`.
Differential Revision: https://developer.blender.org/D14475
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_transform_snap_object_context.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/include/ED_transform_snap_object_context.h b/source/blender/editors/include/ED_transform_snap_object_context.h index a8a11cd7dda..2919001c5ce 100644 --- a/source/blender/editors/include/ED_transform_snap_object_context.h +++ b/source/blender/editors/include/ED_transform_snap_object_context.h @@ -21,11 +21,11 @@ struct Object; struct Scene; struct View3D; -/* transform_snap_object.c */ +/* transform_snap_object.cc */ /* ED_transform_snap_object_*** API */ -typedef enum { +typedef enum eSnapSelect { SNAP_ALL = 0, SNAP_NOT_SELECTED = 1, SNAP_NOT_ACTIVE = 2, @@ -33,7 +33,7 @@ typedef enum { SNAP_SELECTABLE = 4, } eSnapSelect; -typedef enum { +typedef enum eSnapEditType { SNAP_GEOM_FINAL = 0, SNAP_GEOM_CAGE = 1, SNAP_GEOM_EDIT = 2, /* Bmesh for mesh-type. */ @@ -59,13 +59,13 @@ struct SnapObjectHitDepth { /** parameters that define which objects will be used to snap. */ struct SnapObjectParams { /* Special context sensitive handling for the active or selected object. */ - char snap_select; + eSnapSelect snap_select; /* 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 */ - unsigned int use_occlusion_test : 1; + bool use_occlusion_test : true; /* exclude back facing geometry from snapping */ - unsigned int use_backface_culling : 1; + bool use_backface_culling : true; }; typedef struct SnapObjectContext SnapObjectContext; |