ellipsoid_size Subroutine

public pure subroutine ellipsoid_size(n_lon, n_lat, n_vertices, n_indices)

Number of vertices and triangle indices of ellipsoid(radii, n_lon, n_lat, ...).

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n_lon

segments in longitude

integer, intent(in) :: n_lat

segments in latitude

integer, intent(out) :: n_vertices

number of vertices

integer, intent(out) :: n_indices

number of triangle indices (3 per triangle)


Called by

proc~~ellipsoid_size~~CalledByGraph proc~ellipsoid_size ellipsoid_size proc~ellipsoid_create ellipsoid_create proc~ellipsoid_create->proc~ellipsoid_size proc~build_lod_mesh build_lod_mesh proc~build_lod_mesh->proc~ellipsoid_create 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~sphere_update Sphere%sphere_update proc~sphere_update->proc~build_lod_mesh

Source Code

    pure subroutine ellipsoid_size(n_lon, n_lat, n_vertices, n_indices)
        integer, intent(in) :: n_lon  !! segments in longitude
        integer, intent(in) :: n_lat  !! segments in latitude
        integer, intent(out) :: n_vertices  !! number of vertices
        integer, intent(out) :: n_indices   !! number of triangle indices (3 per triangle)
        n_vertices = (n_lon + 1) * (n_lat + 1)
        n_indices = 6 * n_lon * (n_lat - 1)
    end subroutine ellipsoid_size