add_intermediates Subroutine

private subroutine add_intermediates(self, n)

Compute the intermediate markers not computed yet (all of them when counted from the end), and write them.

Arguments

Type IntentOptional Attributes Name
type(MarkerArtist), intent(inout) :: self
integer, intent(in) :: n

the points


Calls

proc~~add_intermediates~~CallsGraph proc~add_intermediates add_intermediates proc~intermediates_by_data intermediates_by_data proc~add_intermediates->proc~intermediates_by_data proc~intermediates_by_distance intermediates_by_distance proc~add_intermediates->proc~intermediates_by_distance proc~intermediates_by_time intermediates_by_time proc~add_intermediates->proc~intermediates_by_time proc~is_colored LineChain%is_colored proc~add_intermediates->proc~is_colored proc~write_intermediates write_intermediates proc~add_intermediates->proc~write_intermediates proc~art_point art_point proc~intermediates_by_data->proc~art_point proc~counted counted proc~intermediates_by_data->proc~counted proc~push_intermediate push_intermediate proc~intermediates_by_data->proc~push_intermediate proc~intermediates_by_distance->proc~art_point proc~intermediates_by_distance->proc~counted proc~intermediates_by_distance->proc~push_intermediate proc~art_point_between art_point_between proc~intermediates_by_time->proc~art_point_between proc~intermediates_by_time->proc~counted proc~intermediates_by_time->proc~push_intermediate time_index time_index proc~intermediates_by_time->time_index proc~color_slice LineChain%color_slice proc~write_intermediates->proc~color_slice proc~num_chunks~2 LineChain%num_chunks proc~write_intermediates->proc~num_chunks~2 proc~reserve LineChain%reserve proc~write_intermediates->proc~reserve proc~slice LineChain%slice proc~write_intermediates->proc~slice proc~split_points split_points proc~write_intermediates->proc~split_points proc~written LineChain%written proc~write_intermediates->proc~written 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_between Trajectory%point_between proc~art_point_between->proc~point_between proc~to_shown to_shown proc~art_point_between->proc~to_shown proc~transformed transformed proc~art_point_between->proc~transformed interface~vkf_line_colors vkf_line_colors proc~color_slice->interface~vkf_line_colors proc~push_intermediate->proc~is_colored proc~color_at color_at proc~push_intermediate->proc~color_at interface~vkf_compile_node vkf_compile_node proc~reserve->interface~vkf_compile_node interface~vkf_line_create vkf_line_create proc~reserve->interface~vkf_line_create interface~vkf_line_create_colored vkf_line_create_colored proc~reserve->interface~vkf_line_create_colored interface~vkf_marker_create vkf_marker_create proc~reserve->interface~vkf_marker_create interface~vkf_node_add_child vkf_node_add_child proc~reserve->interface~vkf_node_add_child interface~vkf_ribbon_create vkf_ribbon_create proc~reserve->interface~vkf_ribbon_create proc~apply_style apply_style proc~reserve->proc~apply_style proc~check_status check_status proc~reserve->proc~check_status proc~line_set_segments line_set_segments proc~reserve->proc~line_set_segments proc~move_chunks move_chunks proc~reserve->proc~move_chunks proc~line_buffer line_buffer proc~slice->proc~line_buffer interface~vkf_line_points_changed vkf_line_points_changed proc~written->interface~vkf_line_points_changed proc~written->proc~check_status proc~measure measure proc~written->proc~measure proc~update_lod update_lod proc~written->proc~update_lod proc~apply_style->proc~check_status interface~vkf_line_set_dash_mode vkf_line_set_dash_mode proc~apply_style->interface~vkf_line_set_dash_mode interface~vkf_line_set_highlight vkf_line_set_highlight proc~apply_style->interface~vkf_line_set_highlight interface~vkf_line_set_trail vkf_line_set_trail proc~apply_style->interface~vkf_line_set_trail proc~line_set_pattern line_set_pattern proc~apply_style->proc~line_set_pattern proc~line_set_style line_set_style proc~apply_style->proc~line_set_style proc~marker_set_style marker_set_style proc~apply_style->proc~marker_set_style proc~color_at->time_index num_times num_times proc~color_at->num_times proc~point_rgba_or point_rgba_or proc~color_at->proc~point_rgba_or interface~vkf_line_points vkf_line_points proc~line_buffer->interface~vkf_line_points interface~vkf_line_style vkf_line_style proc~line_set_segments->interface~vkf_line_style interface~vkf_line_style_changed vkf_line_style_changed proc~line_set_segments->interface~vkf_line_style_changed proc~measure->proc~line_buffer proc~split_distances split_distances proc~measure->proc~split_distances proc~point_between->proc~point~2 proc~num_points Trajectory%num_points proc~point_between->proc~num_points proc~time_fraction Trajectory%time_fraction proc~point_between->proc~time_fraction proc~data_to_shown data_to_shown proc~to_shown->proc~data_to_shown proc~moves moves proc~to_shown->proc~moves proc~to_shown_at->proc~to_shown proc~to_shown_at->proc~transformed proc~update_lod->proc~line_buffer proc~segment_distance segment_distance proc~update_lod->proc~segment_distance proc~send_lod send_lod proc~update_lod->proc~send_lod 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~line_set_pattern->interface~vkf_line_style proc~line_set_pattern->interface~vkf_line_style_changed proc~line_set_style->interface~vkf_line_style proc~line_set_style->interface~vkf_line_style_changed proc~marker_set_style->interface~vkf_line_style proc~marker_set_style->interface~vkf_line_style_changed 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~color~3 Trajectory%color proc~point_rgba_or->proc~color~3 proc~num_colors Trajectory%num_colors proc~point_rgba_or->proc~num_colors proc~send_lod->proc~check_status interface~vkf_line_set_lod vkf_line_set_lod proc~send_lod->interface~vkf_line_set_lod proc~lod_error~2 LineChain%lod_error proc~send_lod->proc~lod_error~2 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~verify_data Trajectory%verify_data 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~point_between proc~interpolate_position->proc~point~2 proc~interpolate_position->proc~num_points proc~time_index->proc~time_distance proc~time_range~3 Trajectory%time_range proc~wrapped_time->proc~time_range~3

Called by

proc~~add_intermediates~~CalledByGraph proc~add_intermediates add_intermediates proc~marker_update MarkerArtist%marker_update proc~marker_update->proc~add_intermediates

Source Code

    subroutine add_intermediates(self, n)
        type(MarkerArtist), intent(inout) :: self
        integer, intent(in) :: n                            !! the points
        integer :: first
        if (self%direction_ == MARKER_END) then          ! everything changes when points are added
            self%n_inter = 0
            self%n_inter_written = 0
            self%next_index = 0
        end if
        select case (self%intermediate_type_)
        case (INTERMEDIATE_TIME)
            call intermediates_by_time(self, n)
        case (INTERMEDIATE_DISTANCE)
            call intermediates_by_distance(self, n)
        case default
            call intermediates_by_data(self, n)
        end select
        if (self%direction_ == MARKER_END) then          ! in trajectory order
            self%inter_xyz(:, 1:self%n_inter) = self%inter_xyz(:, self%n_inter:1:-1)
            self%inter_t(1:self%n_inter) = self%inter_t(self%n_inter:1:-1)
            if (self%inter%is_colored()) self%inter_rgba(:, 1:self%n_inter) = self%inter_rgba(:, self%n_inter:1:-1)
        end if
        first = self%n_inter_written + 1
        if (self%n_inter >= first) call write_intermediates(self, first, self%n_inter)
        self%n_inter_written = self%n_inter
    end subroutine add_intermediates