drawn_segment Subroutine

private subroutine drawn_segment(self, i, a, b, color_a, color_b)

Segment i as drawn (read back from the GPU buffers, for checks): its endpoints and colors.

Type Bound

CustomLineSegments

Arguments

Type IntentOptional Attributes Name
class(CustomLineSegments), intent(in) :: self
integer, intent(in) :: i

1 to num_drawn

real(kind=wp), intent(out) :: a(3)

endpoints (frame coordinates)

real(kind=wp), intent(out) :: b(3)

endpoints (frame coordinates)

real(kind=wp), intent(out), optional :: color_a(4)

color at a: [r, g, b, a]

real(kind=wp), intent(out), optional :: color_b(4)

color at b: [r, g, b, a]


Calls

proc~~drawn_segment~2~~CallsGraph proc~drawn_segment~2 CustomLineSegments%drawn_segment proc~point LineChain%point proc~drawn_segment~2->proc~point proc~point_color LineChain%point_color proc~drawn_segment~2->proc~point_color proc~line_buffer line_buffer proc~point->proc~line_buffer proc~color_slice LineChain%color_slice proc~point_color->proc~color_slice interface~vkf_line_colors vkf_line_colors proc~color_slice->interface~vkf_line_colors interface~vkf_line_points vkf_line_points proc~line_buffer->interface~vkf_line_points

Source Code

    subroutine drawn_segment(self, i, a, b, color_a, color_b)
        class(CustomLineSegments), intent(in) :: self
        integer, intent(in) :: i                            !! 1 to num_drawn
        real(wp), intent(out) :: a(3), b(3)                 !! endpoints (frame coordinates)
        real(wp), intent(out), optional :: color_a(4)       !! color at a: [r, g, b, a]
        real(wp), intent(out), optional :: color_b(4)       !! color at b: [r, g, b, a]
        a = self%chain%point(2 * i - 1)
        b = self%chain%point(2 * i)
        if (present(color_a)) color_a = self%chain%point_color(2 * i - 1)
        if (present(color_b)) color_b = self%chain%point_color(2 * i)
    end subroutine drawn_segment