121 quat[0] = oldquat[0];
124 quat[1] = oldquat[1];
127 quat[2] = oldquat[2];
130 quat[3] = oldquat[3];
135 float eul[3], oldeul[3], nquat[4], noldquat[4];
160 if ((nquat[0] < 0.0f && quat[0] > 0.0f) || (nquat[0] > 0.0f && quat[0] < 0.0f)) {
184 short protectflag,
float axis[3],
float *
angle,
const float oldAxis[3],
float oldAngle)
197 axis[0] = oldAxis[0];
200 axis[1] = oldAxis[1];
203 axis[2] = oldAxis[2];
208 float eul[3], oldeul[3];
227 if (
IS_EQF(axis[0], axis[1]) &&
IS_EQF(axis[1], axis[2])) {
273 for (con = td->
con; con; con = con->
next) {
279 ListBaseT<bConstraintTarget> targets = {
nullptr,
nullptr};
339 targets.free_no_destruct();
383 bool do_limit =
false;
386 for (con = td->
con; con; con = con->
next) {
406 if (do_limit ==
false) {
474 float scale_sign[3], scale_abs[3];
480 for (i = 0; i < 3; i++) {
488 for (con = td->
con; con; con = con->
next) {
565 IFACE_(
"Rotation: %s %s %s"),
573 IFACE_(
"Rotation: %.2f%s %s"),
589 const float mat[3][3],
592 float vec[3], totmat[3][3], smat[3][3];
593 float eul[3], fmat[3][3], quat[4];
602 const float *gp_falloff =
static_cast<const float *
>(td->
extra);
603 if (gp_falloff !=
nullptr && *gp_falloff != 1.0f) {
604 float ident_mat[3][3];
698 float iquat[4], tquat[4];
787 float iquat[4], tquat[4];
842 const float mat[3][3],
890 IFACE_(
"Scale: %s : %s%s %s"),
899 IFACE_(
"Scale: %s : %s : %s%s %s"),
912 IFACE_(
"Scale X: %s Y: %s%s %s"),
921 IFACE_(
"Scale X: %s Y: %s Z: %s%s %s"),
941static void TransMat3ToSize(
const float mat[3][3],
const float smat[3][3],
float size[3])
948 if (
dot_v3v3(rmat[0], smat[0]) < 0.0f) {
951 if (
dot_v3v3(rmat[1], smat[1]) < 0.0f) {
954 if (
dot_v3v3(rmat[2], smat[2]) < 0.0f) {
962 const float mat[3][3])
966 float tmat[3][3], smat[3][3], center[3];
1001 if (td_ext->
scale) {
1010 float ob_scale_mat[3][3];
1079 const float *gp_falloff_ptr =
static_cast<const float *
>(td->
extra);
1080 const float gp_falloff = gp_falloff_ptr !=
nullptr ? *gp_falloff_ptr : 1.0f;
1086 float values_final_evil[4];
1091 float ratio = values_final_evil[0];
1092 float transformed_value = td->
ival *
fabs(ratio);
1282 float view_vector[3];
1284 return dot_v3v3(axis, view_vector) > 0.0f;
1290 if (tc->custom.mode.data) {
1294 BLI_assert_msg(0,
"Should never happen, at least one container must have valid data");
#define CTX_DATA_COUNT(C, member)
#define mul_m3_series(...)
#define BLI_assert_msg(a, msg)
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
float3x3 scale(float3x3 mat, float2 scale)
ccl_device_inline dual3 fabs(const ccl_private dual3 &a)
T interpolate(const T &a, const T &b, const FactorT &t)
T max(const T &a, const T &b)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void mul_m3_v3(const float M[3][3], float r[3])
size_t size_t size_t BLI_snprintf_utf8(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
void axis_angle_to_eulO(float eul[3], short order, const float axis[3], float angle)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void mat4_to_quat(float q[4], const float mat[4][4])
const bConstraintTypeInfo * BKE_constraint_typeinfo_from_type(int type)
@ CONSTRAINT_TYPE_ROTLIMIT
@ CONSTRAINT_TYPE_SIZELIMIT
@ CONSTRAINT_TYPE_LOCLIMIT
@ CONSTRAINT_TYPE_DISTLIMIT
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])
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_LOCAL_ORIGINS
void quat_to_eul(float eul[3], const float quat[4])
void mat3_to_compatible_eulO(float eul[3], const float oldrot[3], short order, const float mat[3][3])
void axis_angle_to_quat(float r[4], const float axis[3], float angle)
bool hasNumInput(const NumInput *n)
void axis_angle_to_mat4(float R[4][4], const float axis[3], float angle)
void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
void sub_eul_euleul(float r_eul[3], float a[3], float b[3], short order)
ViewLayer * CTX_data_view_layer(const bContext *C)
void mat3_to_rot_size(float rot[3][3], float size[3], const float mat3[3][3])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE bool is_zero_v4(const float v[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v3_v3(float r[3], const float a[3])
void eulO_to_mat3(float M[3][3], const float e[3], short order)
void add_eul_euleul(float r_eul[3], float a[3], float b[3], short order)
void quat_to_mat3(float m[3][3], const float q[4])
void size_to_mat4(float R[4][4], const float size[3])
void BKE_constraint_custom_object_space_init(struct bConstraintOb *cob, struct bConstraint *con)
MINLINE void mul_v3_v3(float r[3], const float a[3])
void eulO_to_axis_angle(float axis[3], float *angle, const float eul[3], short order)
bool BKE_constraint_has_influence(const struct bConstraint *con)
BMesh const char void * data
MINLINE float signf(float f)
void eul_to_quat(float quat[4], const float eul[3])
void quat_to_axis_angle(float axis[3], float *angle, const float q[4])
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
void unit_m4(float m[4][4])
void mat4_to_eulO(float eul[3], short order, const float m[4][4])
void BKE_constraint_targets_for_solving_get(struct Depsgraph *depsgraph, struct bConstraint *con, struct bConstraintOb *ob, ListBaseT< bConstraintTarget > *targets, float ctime)
bool applyNumInput(NumInput *n, float *vec)
void mul_mat3_m4_v3(const float mat[4][4], float r[3])
void mat4_to_size(float size[3], const float M[4][4])
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 mat4_to_axis_angle(float axis[3], float *angle, const float mat[4][4])
void interp_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3], float t)
Main * CTX_data_main(const bContext *C)
void unit_m3(float m[3][3])
void outputNumInput(NumInput *n, char *str, const UnitSettings &unit_settings)
void eulO_to_mat4(float mat[4][4], const float e[3], short order)
Scene * CTX_data_scene(const bContext *C)
void invert_qt_qt_normalized(float q1[4], const float q2[4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
void mul_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
VecBase< float, 3 > float3
void mat3_to_size(float size[3], const float M[3][3])
size_t BLI_snprintf_utf8_rlen(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
MINLINE float dot_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
void mul_qt_fl(float q[4], float f)
MINLINE bool is_zero_v3(const float v[3]) ATTR_WARN_UNUSED_RESULT
void mat3_to_quat(float q[4], const float mat[3][3])
void mul_m4_m3m4(float R[4][4], const float A[3][3], const float B[4][4])
void quat_to_mat4(float m[4][4], const float q[4])
float normalize_qt_qt(float r[4], const float q[4])
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
void(*) evaluate_constraint(struct bConstraint *con, struct bConstraintOb *cob, ListBaseT< bConstraintTarget > *targets)
eBConstraint_SpaceTypes ownspace
struct bConstraint * next