time_pick Subroutine

private subroutine time_pick(self, cam, to_root, hits, n)

Picked at its marker (within the tolerance plus half its size), as PICK_HANDLE; else the frame's origin.

Type Bound

TimeHandle

Arguments

Type IntentOptional Attributes Name
class(TimeHandle), intent(in), target :: self
type(PickCamera), intent(in) :: cam

the camera and cursor of the pick

real(kind=wp), intent(in) :: to_root(4,4)

the frame's transform to the root frame

type(PickHit), intent(inout), allocatable :: hits(:)

hits so far, in hits(1:n); added to

integer, intent(inout) :: n

number of hits


Calls

proc~~time_pick~~CallsGraph proc~time_pick TimeHandle%time_pick proc~add_pick_hit add_pick_hit proc~time_pick->proc~add_pick_hit proc~contents_shown ReferenceFrame%contents_shown proc~time_pick->proc~contents_shown proc~draggable DragHandle%draggable proc~time_pick->proc~draggable proc~pick ReferenceFrame%pick proc~time_pick->proc~pick proc~point_pick point_pick proc~time_pick->proc~point_pick proc~wants wants proc~time_pick->proc~wants proc~pick->proc~add_pick_hit proc~pick->proc~point_pick proc~pick->proc~wants proc~project project proc~point_pick->proc~project

Source Code

    subroutine time_pick(self, cam, to_root, hits, n)
        class(TimeHandle), intent(in), target :: self
        type(PickCamera), intent(in) :: cam                 !! the camera and cursor of the pick
        real(wp), intent(in) :: to_root(4,4)                !! the frame's transform to the root frame
        type(PickHit), allocatable, intent(inout) :: hits(:)  !! hits so far, in hits(1:n); added to
        integer, intent(inout) :: n                         !! number of hits
        type(PickHit) :: h
        real(wp) :: pixels, depth
        call self%ReferenceFrame%pick(cam, to_root, hits, n)
        if (.not. (self%draggable() .and. self%contents_shown() .and. wants(cam, PICK_HANDLE))) return
        if (.not. point_pick(cam, to_root(1:3, 4), pixels, depth, extra=0.5_wp * self%size_ * cam%pixel_ratio)) return
        h%kind = PICK_HANDLE
        h%frame => self
        h%position = to_root(1:3, 4)
        h%local = 0.0_wp
        h%time = self%time_
        h%distance = depth
        h%pixels = pixels
        call add_pick_hit(hits, n, h)
    end subroutine time_pick