diff options
| author | Juan Linietsky | 2017-12-26 12:44:58 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-12-26 12:45:56 -0300 |
| commit | c1153f5041f896536957b851329b5adaa1de6dc4 (patch) | |
| tree | b9ebf4b5f247521ffbeb97bde57415d62679c530 /core/math/matrix3.cpp | |
| parent | b8c849205c18c632e34c66c294bd5b38b11687f3 (diff) | |
| download | godot-c1153f5041f896536957b851329b5adaa1de6dc4.tar.gz godot-c1153f5041f896536957b851329b5adaa1de6dc4.tar.zst godot-c1153f5041f896536957b851329b5adaa1de6dc4.zip | |
Diffstat (limited to 'core/math/matrix3.cpp')
| -rw-r--r-- | core/math/matrix3.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/math/matrix3.cpp b/core/math/matrix3.cpp index ab3bca79a..534614147 100644 --- a/core/math/matrix3.cpp +++ b/core/math/matrix3.cpp @@ -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); } |
