set_twilight Subroutine

private subroutine set_twilight(self, angle)

The twilight: the diffuse light extended past the terminator to where the light is angle (radians, 0 to 1.5) below the horizon, fading out smoothly (where it meets the light on the day side: the same brightness and slope, so no line shows), and the night texture fading in across it. 0 (the default): none, the light ends at the terminator (an airless body). Not in OpenFrames. Can change at any time.

Type Bound

Sphere

Arguments

Type IntentOptional Attributes Name
class(Sphere), intent(inout) :: self
real(kind=wp), intent(in) :: angle

radians below the horizon (clamped to 0 to 1.5)


Calls

proc~~set_twilight~~CallsGraph proc~set_twilight Sphere%set_twilight proc~apply_material apply_material proc~set_twilight->proc~apply_material proc~apply_material_to apply_material_to proc~apply_material->proc~apply_material_to interface~vkf_mesh_set_twilight vkf_mesh_set_twilight proc~apply_material_to->interface~vkf_mesh_set_twilight proc~color~2 ReferenceFrame%color proc~apply_material_to->proc~color~2 proc~mesh_set_material mesh_set_material proc~apply_material_to->proc~mesh_set_material proc~name ReferenceFrame%name proc~apply_material_to->proc~name interface~vkf_mesh_material vkf_mesh_material proc~mesh_set_material->interface~vkf_mesh_material interface~vkf_mesh_material_changed vkf_mesh_material_changed proc~mesh_set_material->interface~vkf_mesh_material_changed

Source Code

    subroutine set_twilight(self, angle)
        class(Sphere), intent(inout) :: self
        real(wp), intent(in) :: angle                       !! radians below the horizon (clamped to 0 to 1.5)
        self%twilight_ = max(0.0_wp, min(1.5_wp, angle))
        call apply_material(self)
    end subroutine set_twilight