51 const float mat_final[3][3],
52 const bool is_local_center)
63 if (is_local_center) {
114 bool dir_flip =
false;
121 dir_flip = !dir_flip;
126 dir_flip = !dir_flip;
133 dir_flip = !dir_flip;
185 float axismat_inv[3][3];
188 cross_v3_v3v3(axismat_inv[1], axismat_inv[0], axismat_inv[2]);
192 float mat_final[3][3];
200 for (
int i = 0; i < tc->data_len; i++, td++) {
211 data.is_local_center = is_local_center;
224 if (axis < 0 || 1 < axis) {
230 for (
int i = 0; i < tc->data_len; i++, td++) {
240 uv[axis] = uv[axis] + value * uv[1 - axis] * (2 * axis - 1);
243 if (uv[axis] < 0.0f || 1.0f < uv[axis]) {
253 float value = vec[0];
255 vec_inside_bounds[0] = value;
258 float value_inside_bounds = vec_inside_bounds[0];
262 const int max_i = 32;
263 for (
int i = 0; i <
max_i; i++) {
265 const float value_mid = (value_inside_bounds + value) / 2.0f;
266 if (
ELEM(value_mid, value_inside_bounds, value)) {
270 value_inside_bounds = value_mid;
277 vec_inside_bounds[0] = value_inside_bounds;
278 vec[0] = value_inside_bounds;
319 status.
item(
IFACE_(
"Confirm"), ICON_MOUSE_LMB);
320 status.
item(
IFACE_(
"Cancel"), ICON_MOUSE_RMB);
324 status.
item(
IFACE_(
"Swap Axes"), ICON_MOUSE_MMB);
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,...)
void BLI_task_parallel_range(int start, int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
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)
const TransDataContainer * tc
struct TransInfo::@565 orient[3]
float values_modal_offset[4]
float values_inside_constraints[4]
float multi_frame_falloff
bGPDstroke_Runtime runtime