drawable_pick Subroutine

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

Picks what the artists draw (see the module documentation), then the frame's origin (if it shows axes or its name label).

Type Bound

DrawableTrajectory

Arguments

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

the pick camera

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

the frame's transform to the root frame

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

hits are added to hits(1:n)

integer, intent(inout) :: n

number of hits


Calls

proc~~drawable_pick~~CallsGraph proc~drawable_pick DrawableTrajectory%drawable_pick proc~attach_frames attach_frames proc~drawable_pick->proc~attach_frames proc~contents_shown ReferenceFrame%contents_shown proc~drawable_pick->proc~contents_shown proc~curve_pick curve_pick proc~drawable_pick->proc~curve_pick proc~marker_pick marker_pick proc~drawable_pick->proc~marker_pick proc~pick ReferenceFrame%pick proc~drawable_pick->proc~pick proc~segment_artist_pick segment_artist_pick proc~drawable_pick->proc~segment_artist_pick proc~wants wants proc~drawable_pick->proc~wants chunk_bounds chunk_bounds proc~curve_pick->chunk_bounds is_built is_built proc~curve_pick->is_built num_chunks num_chunks proc~curve_pick->num_chunks positions positions proc~curve_pick->positions proc~add_pick_hit add_pick_hit proc~curve_pick->proc~add_pick_hit proc~art_point art_point proc~curve_pick->proc~art_point proc~better better proc~curve_pick->proc~better proc~is_position_xyz is_position_xyz proc~curve_pick->proc~is_position_xyz proc~point_pick point_pick proc~curve_pick->proc~point_pick proc~segment_pick segment_pick proc~curve_pick->proc~segment_pick proc~sphere_near sphere_near proc~curve_pick->proc~sphere_near proc~transformed transformed proc~curve_pick->proc~transformed proc~marker_pick->proc~add_pick_hit proc~marker_pick->proc~better proc~drawn_marker MarkerArtist%drawn_marker proc~marker_pick->proc~drawn_marker proc~marker_pick->proc~point_pick proc~source_points source_points proc~marker_pick->proc~source_points proc~pick->proc~wants proc~pick->proc~add_pick_hit proc~pick->proc~point_pick num_times num_times proc~segment_artist_pick->num_times proc~segment_artist_pick->proc~add_pick_hit proc~segment_artist_pick->proc~better proc~drawn_segment SegmentArtist%drawn_segment proc~segment_artist_pick->proc~drawn_segment proc~segment_artist_pick->proc~segment_pick proc~point~2 Trajectory%point proc~art_point->proc~point~2 proc~to_shown_at to_shown_at proc~art_point->proc~to_shown_at proc~point LineChain%point proc~drawn_marker->proc~point proc~drawn_segment->proc~point proc~project project proc~point_pick->proc~project proc~segment_pick->proc~project proc~num_points Trajectory%num_points proc~source_points->proc~num_points proc~verify_data Trajectory%verify_data proc~source_points->proc~verify_data proc~sphere_near->proc~project proc~line_buffer line_buffer proc~point->proc~line_buffer proc~to_shown_at->proc~transformed proc~to_shown to_shown proc~to_shown_at->proc~to_shown interface~vkf_line_points vkf_line_points proc~line_buffer->interface~vkf_line_points proc~data_to_shown data_to_shown proc~to_shown->proc~data_to_shown proc~moves moves proc~to_shown->proc~moves proc~rigid_inverse rigid_inverse proc~data_to_shown->proc~rigid_inverse proc~world_matrix_at ReferenceFrame%world_matrix_at proc~data_to_shown->proc~world_matrix_at proc~moves->proc~moves proc~is_following ReferenceFrame%is_following proc~moves->proc~is_following proc~num_parents ReferenceFrame%num_parents proc~moves->proc~num_parents proc~parent ReferenceFrame%parent proc~moves->proc~parent proc~num_trajectories TrajectoryFollower%num_trajectories proc~is_following->proc~num_trajectories proc~world_matrix_at->proc~world_matrix_at proc~local_matrix_at ReferenceFrame%local_matrix_at proc~world_matrix_at->proc~local_matrix_at proc~followed_pose followed_pose proc~local_matrix_at->proc~followed_pose proc~frame_matrix frame_matrix proc~local_matrix_at->proc~frame_matrix proc~followed_pose->proc~rigid_inverse proc~followed_pose->proc~world_matrix_at proc~quat_from_matrix quat_from_matrix proc~followed_pose->proc~quat_from_matrix proc~quat_multiply quat_multiply proc~followed_pose->proc~quat_multiply proc~quat_normalize quat_normalize proc~followed_pose->proc~quat_normalize proc~state_at TrajectoryFollower%state_at proc~followed_pose->proc~state_at proc~quat_to_matrix quat_to_matrix proc~frame_matrix->proc~quat_to_matrix proc~chosen_trajectory chosen_trajectory proc~state_at->proc~chosen_trajectory proc~data_valid TrajectoryFollower%data_valid proc~state_at->proc~data_valid proc~interpolate_attitude interpolate_attitude proc~state_at->proc~interpolate_attitude proc~interpolate_position interpolate_position proc~state_at->proc~interpolate_position proc~time_index Trajectory%time_index proc~state_at->proc~time_index proc~wrapped_time wrapped_time proc~state_at->proc~wrapped_time proc~time_distance Trajectory%time_distance proc~chosen_trajectory->proc~time_distance proc~data_valid->proc~verify_data proc~attitude~3 Trajectory%attitude proc~interpolate_attitude->proc~attitude~3 proc~num_attitudes Trajectory%num_attitudes proc~interpolate_attitude->proc~num_attitudes proc~quat_slerp quat_slerp proc~interpolate_attitude->proc~quat_slerp proc~interpolate_position->proc~num_points proc~interpolate_position->proc~point~2 proc~point_between Trajectory%point_between proc~interpolate_position->proc~point_between proc~time_index->proc~time_distance proc~time_range~3 Trajectory%time_range proc~wrapped_time->proc~time_range~3 proc~point_between->proc~num_points proc~point_between->proc~point~2 proc~time_fraction Trajectory%time_fraction proc~point_between->proc~time_fraction

Source Code

    subroutine drawable_pick(self, cam, to_root, hits, n)
        class(DrawableTrajectory), intent(in), target :: self
        type(PickCamera), intent(in) :: cam         !! the pick camera
        real(wp), intent(in) :: to_root(4,4)        !! the frame's transform to the root frame
        type(PickHit), allocatable, intent(inout) :: hits(:)  !! hits are added to hits(1:n)
        integer, intent(inout) :: n                 !! number of hits
        integer :: k
        if (self%contents_shown()) then
            call attach_frames(self)
            do k = 1, self%n_artists
                if (.not. self%artists(k)%p%pickable_) cycle
                select type (a => self%artists(k)%p)
                class is (CurveArtist)
                    if (wants(cam, PICK_CURVE)) call curve_pick(a, self, cam, to_root, hits, n)
                class is (SegmentArtist)
                    if (wants(cam, PICK_SEGMENT)) call segment_artist_pick(a, self, cam, to_root, hits, n)
                class is (MarkerArtist)
                    if (wants(cam, PICK_MARKER)) call marker_pick(a, self, cam, to_root, hits, n)
                end select
            end do
        end if
        call self%ReferenceFrame%pick(cam, to_root, hits, n)
    end subroutine drawable_pick