38 const float mat_final[3][3],
39 const bool is_local_center)
50 if (is_local_center) {
65 float *gp_falloff =
static_cast<float *
>(td->
extra);
66 if (gp_falloff !=
nullptr) {
93 bool dir_flip =
false;
100 dir_flip = !dir_flip;
105 dir_flip = !dir_flip;
112 dir_flip = !dir_flip;
118 dir_flip = !dir_flip;
162 bool is_event_handled = (
event->type !=
MOUSEMOVE) && (status || t->
redraw);
174 float axismat_inv[3][3];
177 cross_v3_v3v3(axismat_inv[1], axismat_inv[0], axismat_inv[2]);
181 float mat_final[3][3];
188 for (const int i : range) {
189 TransData *td = &tc->data[i];
190 if (td->flag & TD_SKIP) {
193 transdata_elem_shear(t, tc, td, mat_final, is_local_center);
202 if (axis < 0 || 1 < axis) {
208 for (
int i = 0; i < tc->data_len; i++, td++) {
218 uv[axis] =
uv[axis] + value *
uv[1 - axis] * (2 * axis - 1);
221 if (
uv[axis] < 0.0f || 1.0f <
uv[axis]) {
231 float value = vec[0];
233 vec_inside_bounds[0] = value;
236 float value_inside_bounds = vec_inside_bounds[0];
240 const int max_i = 32;
241 for (
int i = 0; i < max_i; i++) {
243 const float value_mid = (value_inside_bounds + value) / 2.0f;
244 if (
ELEM(value_mid, value_inside_bounds, value)) {
248 value_inside_bounds = value_mid;
255 vec_inside_bounds[0] = value_inside_bounds;
256 vec[0] = value_inside_bounds;
302 if (t->
keymap ==
nullptr) {
321 status.
item(
IFACE_(
"Swap Axes"), ICON_MOUSE_MMB);
356 t->
custom.mode.data = custom_data;
359 custom_data->data =
nullptr;
#define mul_m3_series(...)
#define SNPRINTF_UTF8(dst, format,...)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
constexpr IndexRange()=default
void item(std::string text, int icon1, int icon2=0)
void modal_keymap(std::string text, const wmKeyMap &keymap, int propvalue, bool inverted=false)
void item_bool(std::string text, bool inverted, 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))
void mul_m3_v3(const float M[3][3], float r[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
void copy_m3_m3(float m1[3][3], const float m2[3][3])
bool invert_m3_m3(float inverse[3][3], const float mat[3][3])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
bool hasNumInput(const NumInput *n)
MINLINE float normalize_v2(float n[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void sub_v3_v3(float r[3], const float a[3])
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void negate_v3(float r[3])
void ED_area_status_text(ScrArea *area, const char *str)
bool applyNumInput(NumInput *n, float *vec)
void mul_mat3_m4_v3(const float mat[4][4], float r[3])
MINLINE void add_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])
void unit_m3(float m[3][3])
MINLINE void copy_v3_fl(float r[3], float f)
void outputNumInput(NumInput *n, char *str, const UnitSettings &unit_settings)
float RNA_float_get(PointerRNA *ptr, const char *name)