Rotate facet given axis and angle.
Angle must be in radiants.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(facet_object), | intent(inout) | :: | self | Facet. |
||
| type(vector_R8P), | intent(in) | :: | axis | Axis of rotation. |
||
| real(kind=R8P), | intent(in) | :: | angle | Angle of rotation. |
||
| logical, | intent(in), | optional | :: | recompute_metrix | Sentinel to activate metrix recomputation. |
pure subroutine rotate_by_axis_angle(self, axis, angle, recompute_metrix)
!< Rotate facet given axis and angle.
!<
!< Angle must be in radiants.
class(facet_object), intent(inout) :: self !< Facet.
type(vector_R8P), intent(in) :: axis !< Axis of rotation.
real(R8P), intent(in) :: angle !< Angle of rotation.
logical, intent(in), optional :: recompute_metrix !< Sentinel to activate metrix recomputation.
call self%rotate_by_matrix(matrix=rotation_matrix_R8P(axis=axis, angle=angle))
if (present(recompute_metrix)) then
if (recompute_metrix) call self%compute_metrix
endif
endsubroutine rotate_by_axis_angle