time_move_handle_point Subroutine

private subroutine time_move_handle_point(self, p)

The handle moved to the sampled point of the path nearest p (frame coordinates; after a grab: the path's points are sampled then).

Type Bound

TimeHandle

Arguments

Type IntentOptional Attributes Name
class(TimeHandle), intent(inout) :: self
real(kind=wp), intent(in) :: p(3)

the point (frame coordinates)


Calls

proc~~time_move_handle_point~~CallsGraph proc~time_move_handle_point TimeHandle%time_move_handle_point proc~position~2 ReferenceFrame%position proc~time_move_handle_point->proc~position~2 proc~set_time~2 TimeHandle%set_time proc~time_move_handle_point->proc~set_time~2 position position proc~set_time~2->position proc~set_position~2 ReferenceFrame%set_position proc~set_time~2->proc~set_position~2 proc~next_motion_stamp next_motion_stamp proc~set_position~2->proc~next_motion_stamp

Source Code

    subroutine time_move_handle_point(self, p)
        class(TimeHandle), intent(inout) :: self
        real(wp), intent(in) :: p(3)                        !! the point (frame coordinates)
        real(wp) :: q(3)
        integer :: k
        if (.not. allocated(self%sample_t)) return
        q = p + self%position()                             ! (the parent's coordinates)
        k = minloc(norm2(self%sample_p - spread(q, 2, size(self%sample_t)), dim=1), dim=1)
        call self%set_time(self%sample_t(k))
    end subroutine time_move_handle_point