diff --git a/src/ik_kusudama_3d.cpp b/src/ik_kusudama_3d.cpp index 82de5aa9..0ac7a0ac 100644 --- a/src/ik_kusudama_3d.cpp +++ b/src/ik_kusudama_3d.cpp @@ -423,3 +423,6 @@ Quaternion IKKusudama3D::clamp_to_quadrance_angle(Quaternion p_rotation, double } return rotation.slerp(clamped_rotation, over_limit); } +void IKKusudama3D::clear_limit_cones() { + limit_cones.clear(); +} diff --git a/src/ik_kusudama_3d.h b/src/ik_kusudama_3d.h index 8cc54b2a..c19012b7 100644 --- a/src/ik_kusudama_3d.h +++ b/src/ik_kusudama_3d.h @@ -195,6 +195,7 @@ class IKKusudama3D : public Resource { bool is_enabled(); void disable(); void enable(); + void clear_limit_cones(); TypedArray get_limit_cones() const; void set_limit_cones(TypedArray p_cones); float get_resistance(); diff --git a/tests/test_ik_kusudama_3d.h b/tests/test_ik_kusudama_3d.h index 5945ea33..67b68975 100644 --- a/tests/test_ik_kusudama_3d.h +++ b/tests/test_ik_kusudama_3d.h @@ -114,8 +114,7 @@ TEST_CASE("[Modules][ManyBoneIK][IKKusudama3D] Check limit cones clear functiona TypedArray limit_cones = kusudama->get_limit_cones(); REQUIRE(limit_cones.size() == 3); - // Clear all limit cones - limit_cones.clear(); + kusudama->clear_limit_cones(); // Re-check limit cones - there should be none limit_cones = kusudama->get_limit_cones();