Pick what the frame draws (see the module documentation): to_root
is its transform to the root frame; hits are added to hits(1:n). A
plain frame: its origin, if it shows axes or its name label.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ReferenceFrame), | intent(in), | target | :: | self | ||
| type(PickCamera), | intent(in) | :: | cam |
the cursor's ray and the pick's settings |
||
| 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 (grown as needed) |
|
| integer, | intent(inout) | :: | n |
number of hits in hits |
subroutine pick(self, cam, to_root, hits, n) class(ReferenceFrame), intent(in), target :: self type(PickCamera), intent(in) :: cam !! the cursor's ray and the pick's settings 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 (grown as needed) integer, intent(inout) :: n !! number of hits in hits type(PickHit) :: h if (self%axes == NO_AXES .and. .not. self%name_label) return if (.not. wants(cam, PICK_FRAME)) return if (.not. point_pick(cam, to_root(1:3, 4), h%pixels, h%distance)) return h%kind = PICK_FRAME h%frame => self h%position = to_root(1:3, 4) call add_pick_hit(hits, n, h) end subroutine pick