23 rect->
xmin = rect->
xmax = mcoords[0][0];
24 rect->
ymin = rect->
ymax = mcoords[0][1];
27 if (mcoords[a][0] < rect->
xmin) {
28 rect->
xmin = mcoords[a][0];
30 else if (mcoords[a][0] > rect->
xmax) {
31 rect->
xmax = mcoords[a][0];
33 if (mcoords[a][1] < rect->
ymin) {
34 rect->
ymin = mcoords[a][1];
36 else if (mcoords[a][1] > rect->
ymax) {
37 rect->
ymax = mcoords[a][1];
45 const int error_value)
47 if (sx == error_value || mcoords.
is_empty()) {
51 const int pt[2] = {sx, sy};
53 pt,
reinterpret_cast<const int(*)[2]
>(mcoords.
data()),
uint(mcoords.
size()));
57 const Span<int2> mcoords,
int x0,
int y0,
int x1,
int y1,
const int error_value)
60 if (x0 == error_value || x1 == error_value || mcoords.
is_empty()) {
64 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)