Pointers to the arrays of a mesh of n_vertices vertices and n_indices
indices (as created by vkf_mesh_create), to fill in place before the
first frame. Indices are 0-based.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | intent(in) | :: | mesh |
mesh handle (vkf_mesh_create) |
||
| integer, | intent(in) | :: | n_vertices | |||
| integer, | intent(in) | :: | n_indices | |||
| real(kind=c_float), | intent(out), | dimension(:,:), pointer | :: | xyz |
(3, n_vertices) |
|
| real(kind=c_float), | intent(out), | dimension(:,:), pointer | :: | normals |
(3, n_vertices) |
|
| real(kind=c_float), | intent(out), | dimension(:,:), pointer | :: | uv |
(2, n_vertices) |
|
| integer(kind=c_int32_t), | intent(out), | dimension(:), pointer | :: | indices |
(n_indices) triangle indices, 0-based |
subroutine mesh_arrays(mesh, n_vertices, n_indices, xyz, normals, uv, indices) type(c_ptr), intent(in) :: mesh !! mesh handle (vkf_mesh_create) integer, intent(in) :: n_vertices, n_indices real(c_float), dimension(:,:), pointer, intent(out) :: xyz !! (3, n_vertices) real(c_float), dimension(:,:), pointer, intent(out) :: normals !! (3, n_vertices) real(c_float), dimension(:,:), pointer, intent(out) :: uv !! (2, n_vertices) integer(c_int32_t), dimension(:), pointer, intent(out) :: indices !! (n_indices) triangle indices, 0-based call c_f_pointer(vkf_mesh_array(mesh, 1_c_int), xyz, [3, n_vertices]) call c_f_pointer(vkf_mesh_array(mesh, 2_c_int), normals, [3, n_vertices]) call c_f_pointer(vkf_mesh_array(mesh, 3_c_int), uv, [2, n_vertices]) call c_f_pointer(vkf_mesh_array(mesh, 4_c_int), indices, [n_indices]) end subroutine mesh_arrays