A single marker's point (in a chain of one marker), and its color (a colored chain), uploaded.
| Type | Intent | Optional | 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 |
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