30 return (!is_select && (
is_inside)) ? 1 : -1;
36 return (is_select &&
is_inside) ? -1 : (is_select ? 0 : -1);
49 return (!is_select &&
is_inside) ? 1 : -1;
56 return (is_select &&
is_inside) ? -1 : (is_select ? 0 : -1);
67 if (is_first ==
false) {
81 return (
fabsf(delta) <= thresh);
83 return ((delta + thresh) >= 0.0f);
85 return ((delta - thresh) <= 0.0f);
100 float nearest_edge_length;
105 nearest_edge_length =
length;
112 nearest_edge_length = -1.0f;
123 KDTreeNearest_1d nearest;
124 if (BLI_kdtree_1d_find_nearest(
tree, &nearest_edge_length, &nearest) != -1) {
126 float delta = length - nearest.co[0];
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
A KD-tree for nearest neighbor search.
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
static bool is_inside(int x, int y, int cols, int rows)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
bool ED_select_similar_compare_float(const float delta, const float thresh, const eSimilarCmp compare)
bool ED_select_similar_compare_float_tree(const KDTree_1d *tree, const float length, const float thresh, const eSimilarCmp compare)
std::string ED_select_pick_get_name(wmOperatorType *, PointerRNA *ptr)
int ED_select_op_action(const eSelectOp sel_op, const bool is_select, const bool is_inside)
eSelectOp ED_select_op_modal(const eSelectOp sel_op, const bool is_first)
void ED_select_pick_params_from_operator(PointerRNA *ptr, SelectPick_Params *params)
eSelectOp ED_select_op_from_operator(PointerRNA *ptr)
int ED_select_op_action_deselected(const eSelectOp sel_op, const bool is_select, const bool is_inside)
std::string ED_select_circle_get_name(wmOperatorType *, PointerRNA *ptr)