Skip to content

Commit

Permalink
Refactor code for style.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Dec 9, 2023
1 parent 824cff0 commit 8dde301
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 22 deletions.
24 changes: 24 additions & 0 deletions src/ik_bone_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,27 @@ void IKBone3D::pull_back_toward_allowable_region() {
current_constraint->set_axes_to_returnfulled(get_bone_direction_transform(), get_ik_transform(), get_constraint_orientation_transform(), cos_half_return_damp, return_damp);
}
}

Vector<float> &IKBone3D::getCosHalfReturnfullnessDampened() {
return cos_half_returnfulness_dampened;
}

void IKBone3D::setCosHalfReturnfullnessDampened(const Vector<float> &value) {
cos_half_returnfulness_dampened = value;
}

Vector<float> &IKBone3D::getHalfReturnfullnessDampened() {
return half_returnfulness_dampened;
}

void IKBone3D::setHalfReturnfullnessDampened(const Vector<float> &value) {
half_returnfulness_dampened = value;
}

void IKBone3D::set_stiffness(double p_stiffness) {
stiffness = p_stiffness;
}

double IKBone3D::get_stiffness() const {
return stiffness;
}
28 changes: 6 additions & 22 deletions src/ik_bone_3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,12 @@ class IKBone3D : public Resource {
static void _bind_methods();

public:
Vector<float> &getCosHalfReturnfullnessDampened() {
return cos_half_returnfulness_dampened;
}

void setCosHalfReturnfullnessDampened(const Vector<float> &value) {
cos_half_returnfulness_dampened = value;
}

Vector<float> &getHalfReturnfullnessDampened() {
return half_returnfulness_dampened;
}

void setHalfReturnfullnessDampened(const Vector<float> &value) {
half_returnfulness_dampened = value;
}
void set_stiffness(double p_stiffness) {
stiffness = p_stiffness;
}

double get_stiffness() const {
return stiffness;
}
Vector<float> &getCosHalfReturnfullnessDampened();
void setCosHalfReturnfullnessDampened(const Vector<float> &value);
Vector<float> &getHalfReturnfullnessDampened();
void setHalfReturnfullnessDampened(const Vector<float> &value);
void set_stiffness(double p_stiffness);
double get_stiffness() const;
void pull_back_toward_allowable_region();
bool is_axially_constrained();
bool is_orientationally_constrained();
Expand Down

0 comments on commit 8dde301

Please sign in to comment.