Segment i as drawn (read back from the GPU buffers, for checks): its endpoints and colors.
| Type | Intent | Optional | 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] |
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