24 rect->
xmin = rect->
xmax = mcoords[0][0];
25 rect->
ymin = rect->
ymax = mcoords[0][1];
28 if (mcoords[a][0] < rect->
xmin) {
29 rect->
xmin = mcoords[a][0];
31 else if (mcoords[a][0] > rect->
xmax) {
32 rect->
xmax = mcoords[a][0];
34 if (mcoords[a][1] < rect->
ymin) {
35 rect->
ymin = mcoords[a][1];
37 else if (mcoords[a][1] > rect->
ymax) {
38 rect->
ymax = mcoords[a][1];
46 const int error_value)
48 if (sx == error_value || mcoords.
is_empty()) {
52 const int pt[2] = {sx, sy};
54 pt,
reinterpret_cast<const int (*)[2]
>(mcoords.
data()),
uint(mcoords.
size()));
58 const Span<int2> mcoords,
int x0,
int y0,
int x1,
int y1,
const int error_value)
61 if (x0 == error_value || x1 == error_value || mcoords.
is_empty()) {
65 const int v1[2] = {x0, y0},
v2[2] = {x1, y1};
bool isect_point_poly_v2_int(const int pt[2], const int verts[][2], unsigned int nr)
int isect_seg_seg_v2_int(const int v1[2], const int v2[2], const int v3[2], const int v4[2])
ATTR_WARN_UNUSED_RESULT const BMVert * v2
constexpr IndexRange drop_back(int64_t n) const
constexpr IndexRange drop_front(int64_t n) const
constexpr const T * data() const
constexpr int64_t size() const
constexpr const T & last(const int64_t n=0) const
constexpr IndexRange index_range() const
constexpr bool is_empty() const
void BLI_lasso_boundbox(rcti *rect, const Span< int2 > mcoords)
bool BLI_lasso_is_point_inside(const Span< int2 > mcoords, const int sx, const int sy, const int error_value)
bool BLI_lasso_is_edge_inside(const Span< int2 > mcoords, int x0, int y0, int x1, int y1, const int error_value)
VecBase< int32_t, 2 > int2