initialize from Eulers (common case)

This commit is contained in:
Martin Diehl 2019-06-07 14:30:16 +02:00
parent 04a6054047
commit 1b595b4864
1 changed files with 10 additions and 0 deletions

View File

@ -65,6 +65,7 @@ module rotations
procedure, public :: asRotationMatrix
!------------------------------------------
procedure, public :: fromRotationMatrix
procedure, public :: fromEulerAngles
!------------------------------------------
procedure, public :: rotVector
procedure, public :: rotTensor
@ -143,7 +144,16 @@ subroutine fromRotationMatrix(self,om)
self%q = om2qu(om)
end subroutine
!---------------------------------------------------------------------------------------------------
subroutine fromEulerAngles(self,eu)
class(rotation), intent(out) :: self
real(pReal), dimension(3), intent(in) :: eu
self%q = eu2qu(eu)
end subroutine
!---------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------
!> @author Marc De Graef, Carnegie Mellon University