Skip to content

Commit

Permalink
Fix Check limit cones clear functionality test.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Dec 18, 2023
1 parent 826a27d commit 39ed468
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ik_kusudama_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
1 change: 1 addition & 0 deletions src/ik_kusudama_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ class IKKusudama3D : public Resource {
bool is_enabled();
void disable();
void enable();
void clear_limit_cones();
TypedArray<IKLimitCone3D> get_limit_cones() const;
void set_limit_cones(TypedArray<IKLimitCone3D> p_cones);
float get_resistance();
Expand Down
3 changes: 1 addition & 2 deletions tests/test_ik_kusudama_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ TEST_CASE("[Modules][ManyBoneIK][IKKusudama3D] Check limit cones clear functiona
TypedArray<IKLimitCone3D> 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();
Expand Down

0 comments on commit 39ed468

Please sign in to comment.