Blender  V2.93
ED_select_utils.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #pragma once
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 struct KDTree_1d;
28 
29 enum {
34 };
35 
36 typedef enum WalkSelectDirection {
42 
44 typedef enum {
50 } eSelectOp;
51 
52 /* Select Similar */
53 enum {
57 };
58 
59 #define SEL_OP_USE_OUTSIDE(sel_op) (ELEM(sel_op, SEL_OP_AND))
60 #define SEL_OP_USE_PRE_DESELECT(sel_op) (ELEM(sel_op, SEL_OP_SET))
61 #define SEL_OP_CAN_DESELECT(sel_op) (!ELEM(sel_op, SEL_OP_ADD))
62 
63 /* Use when we've de-selected all first for 'SEL_OP_SET' */
64 int ED_select_op_action(const eSelectOp sel_op, const bool is_select, const bool is_inside);
66  const bool is_select,
67  const bool is_inside);
68 
69 int ED_select_similar_compare_float(const float delta, const float thresh, const int compare);
70 bool ED_select_similar_compare_float_tree(const struct KDTree_1d *tree,
71  const float length,
72  const float thresh,
73  const int compare);
74 
75 eSelectOp ED_select_op_modal(const eSelectOp sel_op, const bool is_first);
76 
77 #ifdef __cplusplus
78 }
79 #endif
enum WalkSelectDirection WalkSelectDirections
int ED_select_similar_compare_float(const float delta, const float thresh, const int compare)
Definition: select_utils.c:87
WalkSelectDirection
@ UI_SELECT_WALK_RIGHT
@ UI_SELECT_WALK_UP
@ UI_SELECT_WALK_LEFT
@ UI_SELECT_WALK_DOWN
int ED_select_op_action(const eSelectOp sel_op, const bool is_select, const bool is_inside)
Definition: select_utils.c:30
@ SEL_SELECT
@ SEL_INVERT
@ SEL_DESELECT
@ SEL_TOGGLE
eSelectOp ED_select_op_modal(const eSelectOp sel_op, const bool is_first)
Definition: select_utils.c:77
int ED_select_op_action_deselected(const eSelectOp sel_op, const bool is_select, const bool is_inside)
Definition: select_utils.c:53
bool ED_select_similar_compare_float_tree(const struct KDTree_1d *tree, const float length, const float thresh, const int compare)
@ SIM_CMP_LT
@ SIM_CMP_GT
@ SIM_CMP_EQ
eSelectOp
@ SEL_OP_ADD
@ SEL_OP_SUB
@ SEL_OP_SET
@ SEL_OP_AND
@ SEL_OP_XOR
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
Definition: btQuaternion.h:895
void * tree
static bool is_inside(int x, int y, int cols, int rows)
Definition: filesel.c:663