write_marker Subroutine

private subroutine write_marker(chain, v, rgba)

A single marker's point (in a chain of one marker), and its color (a colored chain), uploaded.

Arguments

Type IntentOptional Attributes Name
type(LineChain), intent(inout) :: chain

the marker's buffers (one marker)

real(kind=wp), intent(in) :: v(3)

the marker's point; its color

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

the marker's point; its color


Calls

proc~~write_marker~~CallsGraph proc~write_marker write_marker proc~color_slice LineChain%color_slice proc~write_marker->proc~color_slice proc~num_chunks~2 LineChain%num_chunks proc~write_marker->proc~num_chunks~2 proc~slice LineChain%slice proc~write_marker->proc~slice proc~split_points split_points proc~write_marker->proc~split_points proc~written LineChain%written proc~write_marker->proc~written interface~vkf_line_colors vkf_line_colors proc~color_slice->interface~vkf_line_colors 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~check_status check_status proc~written->proc~check_status proc~measure measure proc~written->proc~measure proc~update_lod update_lod proc~written->proc~update_lod interface~vkf_line_points vkf_line_points proc~line_buffer->interface~vkf_line_points proc~measure->proc~line_buffer proc~split_distances split_distances proc~measure->proc~split_distances 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~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

Called by

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

Source Code

    subroutine write_marker(chain, v, rgba)
        type(LineChain), intent(inout) :: chain             !! the marker's buffers (one marker)
        real(wp), intent(in) :: v(3), rgba(4)               !! the marker's point; its color
        real(c_float), dimension(:,:,:), pointer :: p
        real(c_float), dimension(:,:), pointer :: c
        integer :: lo, hi
        if (chain%num_chunks() < 1) return
        call chain%slice(1, 1, 1, lo, hi, p)
        if (.not. associated(p)) return
        call split_points(reshape(v, [3, 1]), p)
        call chain%color_slice(1, 1, 1, lo, hi, c)
        if (associated(c)) c(:, 1) = real(rgba, c_float)
        call chain%written(1, 1)
    end subroutine write_marker