A line node through points xyz(3, n): a strip, or separate segments (points 1-2, 3-4, ...).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | xyz(:,:) |
(3, n) points |
||
| real(kind=wp), | intent(in) | :: | rgba(4) |
color [r, g, b, a] (0 to 1) |
||
| real(kind=wp), | intent(in) | :: | width |
line width (window units) |
||
| logical, | intent(in) | :: | segments |
separate segments (else a strip) |
function line_node(xyz, rgba, width, segments) result(node) real(wp), intent(in) :: xyz(:,:) !! (3, n) points real(wp), intent(in) :: rgba(4) !! color [r, g, b, a] (0 to 1) real(wp), intent(in) :: width !! line width (window units) logical, intent(in) :: segments !! separate segments (else a strip) type(c_ptr) :: node node = c_null_ptr if (size(xyz, 2) < 2) return node = vkf_line_create(int(size(xyz, 2), c_int)) if (.not. c_associated(node)) return if (segments) call check_status(line_set_segments(node, .true.), 'shapes') call check_status(line_set_style(node, real(rgba, c_float), real(width, c_float)), 'shapes') call check_status(line_set_points(node, real(xyz, c_double)), 'shapes') end function line_node