37 const float mat_final[3][3],
38 const bool is_local_center)
49 if (is_local_center) {
64 float *gp_falloff =
static_cast<float *
>(td->
extra);
65 if (gp_falloff !=
nullptr) {
88 bool dir_flip =
false;
100 dir_flip = !dir_flip;
107 dir_flip = !dir_flip;
150 bool is_event_handled = (
event->type !=
MOUSEMOVE) && (status || t->
redraw);
163 float axismat_inv[3][3];
166 cross_v3_v3v3(axismat_inv[1], axismat_inv[0], axismat_inv[2]);
170 float mat_final[3][3];
177 for (const int i : range) {
178 TransData *td = &tc->data[i];
179 if (td->flag & TD_SKIP) {
182 transdata_elem_shear(t, tc, td, mat_final, is_local_center);
191 if (axis < 0 || 1 < axis) {
197 for (
int i = 0;
i < tc->data_len;
i++, td++) {
207 uv[axis] = uv[axis] + value * uv[1 - axis] * (2 * axis - 1);
210 if (uv[axis] < 0.0f || 1.0f < uv[axis]) {
220 float value = vec[0];
222 vec_inside_bounds[0] = value;
225 float value_inside_bounds = vec_inside_bounds[0];
229 const int max_i = 32;
232 const float value_mid = (value_inside_bounds + value) / 2.0f;
233 if (
ELEM(value_mid, value_inside_bounds, value)) {
237 value_inside_bounds = value_mid;
244 vec_inside_bounds[0] = value_inside_bounds;
245 vec[0] = value_inside_bounds;
286 if (update_status_bar) {
290 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
291 status.
item(
IFACE_(
"Cancel"), ICON_MOUSE_RMB);
295 status.
item(
IFACE_(
"Swap Axes"), ICON_MOUSE_MMB);
319 bool update_status_bar =
true;
void mul_m3_v3(const float M[3][3], float r[3])
void copy_m3_m3(float m1[3][3], const float m2[3][3])
void unit_m3(float m[3][3])
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
#define mul_m3_series(...)
void mul_mat3_m4_v3(const float mat[4][4], float r[3])
MINLINE void sub_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void negate_v3(float r[3])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE float normalize_v2(float n[2])
MINLINE void copy_v3_fl(float r[3], float f)
MINLINE void add_v3_v3(float r[3], const float a[3])
#define SNPRINTF(dst, format,...)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
void ED_area_status_text(ScrArea *area, const char *str)
void item_bool(std::string text, bool inverted, int icon1, int icon2=0)
void item(std::string text, int icon1, int icon2=0)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))