Segment i: its endpoints, and their colors (rgba).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(CustomLineSegments), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
1 to num_segments |
||
| 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 segment(self, i, a, b, color_a, color_b) class(CustomLineSegments), intent(in) :: self integer, intent(in) :: i !! 1 to num_segments 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%a(:, i) b = self%b(:, i) if (present(color_a)) color_a = segment_color(self, self%color_a, i) if (present(color_b)) color_b = segment_color(self, self%color_b, i) end subroutine segment