mesh_arrays Subroutine

public subroutine mesh_arrays(mesh, n_vertices, n_indices, xyz, normals, uv, indices)

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.

Arguments

Type IntentOptional 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


Calls

proc~~mesh_arrays~~CallsGraph proc~mesh_arrays mesh_arrays interface~vkf_mesh_array vkf_mesh_array proc~mesh_arrays->interface~vkf_mesh_array

Called by

proc~~mesh_arrays~~CalledByGraph proc~mesh_arrays mesh_arrays proc~arrow_create arrow_create proc~arrow_create->proc~mesh_arrays proc~ellipsoid_create ellipsoid_create proc~ellipsoid_create->proc~mesh_arrays proc~shadow_build_contents ShadowCones%shadow_build_contents proc~shadow_build_contents->proc~mesh_arrays proc~surface_node surface_node proc~surface_node->proc~mesh_arrays proc~unit_part unit_part proc~unit_part->proc~mesh_arrays proc~write_region write_region proc~write_region->proc~mesh_arrays proc~build_lod_mesh build_lod_mesh proc~build_lod_mesh->proc~ellipsoid_create proc~make_axis make_axis proc~make_axis->proc~arrow_create proc~make_cone make_cone proc~make_cone->proc~surface_node proc~make_plane make_plane proc~make_plane->proc~surface_node proc~make_polyhedron make_polyhedron proc~make_polyhedron->proc~surface_node proc~shape_regions shape_regions proc~shape_regions->proc~write_region proc~sphere_build_contents Sphere%sphere_build_contents proc~sphere_build_contents->proc~ellipsoid_create proc~sphere_build_contents->proc~build_lod_mesh proc~sphere_create sphere_create proc~sphere_create->proc~ellipsoid_create proc~vector_build_contents VectorHandle%vector_build_contents proc~vector_build_contents->proc~unit_part proc~build_decorations build_decorations proc~build_decorations->proc~make_axis proc~cone_build_contents PolyhedralCone%cone_build_contents proc~cone_build_contents->proc~make_cone proc~cone_set_line_color PolyhedralCone%cone_set_line_color proc~cone_set_line_color->proc~make_cone proc~elliptic_set_primary_angles EllipticCone%elliptic_set_primary_angles proc~elliptic_set_primary_angles->proc~make_cone proc~move_axis move_axis proc~move_axis->proc~make_axis proc~place place proc~place->proc~shape_regions proc~plane_build_contents RadialPlane%plane_build_contents proc~plane_build_contents->proc~make_plane proc~plane_set_line_color RadialPlane%plane_set_line_color proc~plane_set_line_color->proc~make_plane proc~plane_set_parameters RadialPlane%plane_set_parameters proc~plane_set_parameters->proc~make_plane proc~place_axes place_axes proc~plane_set_parameters->proc~place_axes proc~poly_build_contents Polyhedron%poly_build_contents proc~poly_build_contents->proc~make_polyhedron proc~poly_set_draw_mode Polyhedron%poly_set_draw_mode proc~poly_set_draw_mode->proc~make_polyhedron proc~poly_set_line_color Polyhedron%poly_set_line_color proc~poly_set_line_color->proc~make_polyhedron proc~poly_set_line_width Polyhedron%poly_set_line_width proc~poly_set_line_width->proc~make_polyhedron proc~poly_set_opacity Polyhedron%poly_set_opacity proc~poly_set_opacity->proc~make_polyhedron proc~rect_set_primary_angles RectangularCone%rect_set_primary_angles proc~rect_set_primary_angles->proc~make_cone proc~remake_axes remake_axes proc~remake_axes->proc~make_axis proc~remove_vertex_colors Polyhedron%remove_vertex_colors proc~remove_vertex_colors->proc~make_polyhedron proc~set_cone_color PolyhedralCone%set_cone_color proc~set_cone_color->proc~make_cone proc~set_cone_length PolyhedralCone%set_cone_length proc~set_cone_length->proc~make_cone proc~set_draw_mode PolyhedralCone%set_draw_mode proc~set_draw_mode->proc~make_cone proc~set_edges Polyhedron%set_edges proc~set_edges->proc~make_polyhedron proc~set_face_color Polyhedron%set_face_color proc~set_face_color->proc~make_polyhedron proc~set_faces Polyhedron%set_faces proc~set_faces->proc~make_polyhedron proc~set_grid Polyhedron%set_grid proc~set_grid->proc~make_polyhedron proc~set_lit Polyhedron%set_lit proc~set_lit->proc~make_polyhedron proc~set_plane_color RadialPlane%set_plane_color proc~set_plane_color->proc~make_plane proc~set_point_color Polyhedron%set_point_color proc~set_point_color->proc~make_polyhedron proc~set_point_size Polyhedron%set_point_size proc~set_point_size->proc~make_polyhedron proc~set_smooth Polyhedron%set_smooth proc~set_smooth->proc~make_polyhedron proc~set_triangles Polyhedron%set_triangles proc~set_triangles->proc~make_polyhedron proc~set_two_sided Polyhedron%set_two_sided proc~set_two_sided->proc~make_polyhedron proc~set_vertex_angles PolyhedralCone%set_vertex_angles proc~set_vertex_angles->proc~make_cone proc~set_vertex_colors Polyhedron%set_vertex_colors proc~set_vertex_colors->proc~make_polyhedron proc~set_vertices Polyhedron%set_vertices proc~set_vertices->proc~make_polyhedron proc~set_x_label ReferenceFrame%set_x_label proc~set_x_label->proc~make_axis proc~set_y_label ReferenceFrame%set_y_label proc~set_y_label->proc~make_axis proc~set_z_label ReferenceFrame%set_z_label proc~set_z_label->proc~make_axis proc~sphere_update Sphere%sphere_update proc~sphere_update->proc~build_lod_mesh proc~move_x_axis ReferenceFrame%move_x_axis proc~move_x_axis->proc~move_axis proc~move_y_axis ReferenceFrame%move_y_axis proc~move_y_axis->proc~move_axis proc~move_z_axis ReferenceFrame%move_z_axis proc~move_z_axis->proc~move_axis proc~realize ReferenceFrame%realize proc~realize->proc~build_decorations proc~realize->proc~realize proc~relayout_labels relayout_labels proc~relayout_labels->proc~remake_axes proc~set_color~2 ReferenceFrame%set_color proc~set_color~2->proc~remake_axes proc~set_label_font ReferenceFrame%set_label_font proc~set_label_font->proc~remake_axes proc~shadow_late_update ShadowCones%shadow_late_update proc~shadow_late_update->proc~place proc~add_child ReferenceFrame%add_child proc~add_child->proc~realize proc~axes_set_color CoordinateAxes%axes_set_color proc~axes_set_color->proc~set_color~2 proc~frame WindowProxy%frame proc~frame->proc~realize proc~grid_set_color LatLonGrid%grid_set_color proc~grid_set_color->proc~set_color~2 proc~new_reference_frame new_reference_frame proc~new_reference_frame->proc~set_color~2 proc~place_axes->proc~move_x_axis proc~place_axes->proc~move_y_axis proc~place_axes->proc~move_z_axis proc~place_grid_axes place_grid_axes proc~place_grid_axes->proc~move_x_axis proc~place_grid_axes->proc~move_y_axis proc~place_grid_axes->proc~move_z_axis proc~segments_set_color CustomLineSegments%segments_set_color proc~segments_set_color->proc~set_color~2 proc~set_label_alignment ReferenceFrame%set_label_alignment proc~set_label_alignment->proc~relayout_labels proc~set_label_size ReferenceFrame%set_label_size proc~set_label_size->proc~relayout_labels proc~sphere_set_color Sphere%sphere_set_color proc~sphere_set_color->proc~set_color~2 proc~time_set_color TimeHandle%time_set_color proc~time_set_color->proc~set_color~2 proc~vector_set_color VectorHandle%vector_set_color proc~vector_set_color->proc~set_color~2 interface~referenceframe ReferenceFrame interface~referenceframe->proc~new_reference_frame proc~grid_set_parameters LatLonGrid%grid_set_parameters proc~grid_set_parameters->proc~place_grid_axes proc~new_coordinate_axes new_coordinate_axes proc~new_coordinate_axes->proc~place_axes proc~new_lat_lon_grid new_lat_lon_grid proc~new_lat_lon_grid->proc~place_grid_axes proc~new_radial_plane new_radial_plane proc~new_radial_plane->proc~place_axes proc~resize WindowProxy%resize proc~resize->proc~frame proc~run WindowProxy%run proc~run->proc~frame proc~set_axis_length CoordinateAxes%set_axis_length proc~set_axis_length->proc~place_axes interface~coordinateaxes CoordinateAxes interface~coordinateaxes->proc~new_coordinate_axes interface~latlongrid LatLonGrid interface~latlongrid->proc~new_lat_lon_grid interface~radialplane RadialPlane interface~radialplane->proc~new_radial_plane

Source Code

    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