Change Basis is_equal_approx to use instance method
This commit is contained in:
parent
e40ba13e59
commit
23dabcd2d0
2 changed files with 2 additions and 4 deletions
|
@ -146,8 +146,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_equal_approx(const Basis &p_basis) const;
|
bool is_equal_approx(const Basis &p_basis) const;
|
||||||
// TODO: Break compatibility in 4.0 by getting rid of this so that it's only an instance method. See also TODO in variant_call.cpp
|
|
||||||
bool is_equal_approx(const Basis &a, const Basis &b) const { return a.is_equal_approx(b); }
|
|
||||||
bool is_equal_approx_ratio(const Basis &a, const Basis &b, real_t p_epsilon = UNIT_EPSILON) const;
|
bool is_equal_approx_ratio(const Basis &a, const Basis &b, real_t p_epsilon = UNIT_EPSILON) const;
|
||||||
|
|
||||||
bool operator==(const Basis &p_matrix) const;
|
bool operator==(const Basis &p_matrix) const;
|
||||||
|
|
|
@ -1035,7 +1035,7 @@ struct _VariantCall {
|
||||||
VCALL_PTR0R(Basis, get_orthogonal_index);
|
VCALL_PTR0R(Basis, get_orthogonal_index);
|
||||||
VCALL_PTR0R(Basis, orthonormalized);
|
VCALL_PTR0R(Basis, orthonormalized);
|
||||||
VCALL_PTR2R(Basis, slerp);
|
VCALL_PTR2R(Basis, slerp);
|
||||||
VCALL_PTR2R(Basis, is_equal_approx); // TODO: Break compatibility in 4.0 to change this to an instance method (a.is_equal_approx(b) as VCALL_PTR1R) for consistency.
|
VCALL_PTR1R(Basis, is_equal_approx);
|
||||||
VCALL_PTR0R(Basis, get_rotation_quat);
|
VCALL_PTR0R(Basis, get_rotation_quat);
|
||||||
|
|
||||||
VCALL_PTR0R(Transform, inverse);
|
VCALL_PTR0R(Transform, inverse);
|
||||||
|
@ -2356,7 +2356,7 @@ void register_variant_methods() {
|
||||||
ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray());
|
ADDFUNC1R(BASIS, VECTOR3, Basis, xform_inv, VECTOR3, "v", varray());
|
||||||
ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray());
|
ADDFUNC0R(BASIS, INT, Basis, get_orthogonal_index, varray());
|
||||||
ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", FLOAT, "t", varray());
|
ADDFUNC2R(BASIS, BASIS, Basis, slerp, BASIS, "b", FLOAT, "t", varray());
|
||||||
ADDFUNC2R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", FLOAT, "epsilon", varray(CMP_EPSILON)); // TODO: Replace in 4.0, see other TODO.
|
ADDFUNC1R(BASIS, BOOL, Basis, is_equal_approx, BASIS, "b", varray());
|
||||||
ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray());
|
ADDFUNC0R(BASIS, QUAT, Basis, get_rotation_quat, varray());
|
||||||
|
|
||||||
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, inverse, varray());
|
ADDFUNC0R(TRANSFORM, TRANSFORM, Transform, inverse, varray());
|
||||||
|
|
Loading…
Reference in a new issue