sphere_create Function

public function sphere_create(radius, rgba, texture, n_lon, n_lat) result(mesh)

A sphere mesh node: ellipsoid_create with equal semi-axes.

Arguments

Type IntentOptional Attributes Name
real(kind=c_double), intent(in) :: radius

the sphere's radius

real(kind=c_float), intent(in), dimension(4) :: rgba

color [r, g, b, a] (0 to 1)

type(c_ptr), intent(in), optional :: texture

image handle of the texture

integer, intent(in), optional :: n_lon

segments in longitude (default 128)

integer, intent(in), optional :: n_lat

segments in latitude (default 64)

Return Value type(c_ptr)


Calls

proc~~sphere_create~~CallsGraph proc~sphere_create sphere_create proc~ellipsoid_create ellipsoid_create proc~sphere_create->proc~ellipsoid_create interface~vkf_mesh_create vkf_mesh_create proc~ellipsoid_create->interface~vkf_mesh_create interface~vkf_mesh_set_bound vkf_mesh_set_bound proc~ellipsoid_create->interface~vkf_mesh_set_bound proc~ellipsoid ellipsoid proc~ellipsoid_create->proc~ellipsoid proc~ellipsoid_size ellipsoid_size proc~ellipsoid_create->proc~ellipsoid_size proc~mesh_arrays mesh_arrays proc~ellipsoid_create->proc~mesh_arrays interface~vkf_mesh_array vkf_mesh_array proc~mesh_arrays->interface~vkf_mesh_array

Source Code

    function sphere_create(radius, rgba, texture, n_lon, n_lat) result(mesh)
        real(c_double), intent(in) :: radius                !! the sphere's radius
        real(c_float), dimension(4), intent(in) :: rgba     !! color [r, g, b, a] (0 to 1)
        type(c_ptr), intent(in), optional :: texture        !! image handle of the texture
        integer, intent(in), optional :: n_lon              !! segments in longitude (default 128)
        integer, intent(in), optional :: n_lat              !! segments in latitude (default 64)
        type(c_ptr) :: mesh
        mesh = ellipsoid_create([radius, radius, radius], rgba, texture, n_lon, n_lat)
    end function sphere_create