A sphere mesh node: ellipsoid_create with equal semi-axes.
| Type | Intent | Optional | 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) |
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