Change the rotate function of Spatial to be local, makes more sense. Closes #14569

This commit is contained in:
Juan Linietsky
2017-12-26 12:44:58 -03:00
parent b8c849205c
commit c1153f5041
4 changed files with 17 additions and 7 deletions

View File

@@ -311,6 +311,15 @@ void Basis::rotate(const Vector3 &p_axis, real_t p_phi) {
*this = rotated(p_axis, p_phi);
}
void Basis::rotate_local(const Vector3 &p_axis, real_t p_phi) {
*this = rotated_local(p_axis, p_phi);
}
Basis Basis::rotated_local(const Vector3 &p_axis, real_t p_phi) const {
return (*this) * Basis(p_axis, p_phi);
}
Basis Basis::rotated(const Vector3 &p_euler) const {
return Basis(p_euler) * (*this);
}