new_shadow_cones Function

private function new_shadow_cones(name, body, light, body_radius, light_radius) result(s)

The shadow named name of body in the light of light (frames of the same tree; optional here, set later with set_body and set_light), with their radii if given (else the frames': see the module documentation). Its axes and name label are hidden.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

the frame's name

class(ReferenceFrame), intent(in), optional, target :: body

the body casting the shadow, the light (not owned)

class(ReferenceFrame), intent(in), optional, target :: light

the body casting the shadow, the light (not owned)

real(kind=wp), intent(in), optional :: body_radius

scene units (default: the frames' own)

real(kind=wp), intent(in), optional :: light_radius

scene units (default: the frames' own)

Return Value type(ShadowCones)


Calls

proc~~new_shadow_cones~~CallsGraph proc~new_shadow_cones new_shadow_cones proc~set_body_radius ShadowCones%set_body_radius proc~new_shadow_cones->proc~set_body_radius proc~set_light_radius ShadowCones%set_light_radius proc~new_shadow_cones->proc~set_light_radius proc~show_axes ReferenceFrame%show_axes proc~new_shadow_cones->proc~show_axes proc~show_axes_labels ReferenceFrame%show_axes_labels proc~new_shadow_cones->proc~show_axes_labels proc~show_name_label ReferenceFrame%show_name_label proc~new_shadow_cones->proc~show_name_label proc~update_switches update_switches proc~show_axes->proc~update_switches proc~show_axes_labels->proc~update_switches proc~show_name_label->proc~update_switches interface~vkf_switch_set vkf_switch_set proc~update_switches->interface~vkf_switch_set proc~check_status check_status proc~update_switches->proc~check_status

Called by

proc~~new_shadow_cones~~CalledByGraph proc~new_shadow_cones new_shadow_cones interface~shadowcones ShadowCones interface~shadowcones->proc~new_shadow_cones

Source Code

    function new_shadow_cones(name, body, light, body_radius, light_radius) result(s)
        character(len=*), intent(in) :: name                !! the frame's name
        class(ReferenceFrame), intent(in), target, optional :: body, light !! the body casting the shadow, the light (not owned)
        real(wp), intent(in), optional :: body_radius, light_radius  !! scene units (default: the frames' own)
        type(ShadowCones) :: s
        s%ReferenceFrame = ReferenceFrame(name)
        call s%show_axes(NO_AXES)
        call s%show_axes_labels(NO_AXES)
        call s%show_name_label(.false.)
        if (present(body)) s%body_ => body
        if (present(light)) s%light_ => light
        if (present(body_radius)) call s%set_body_radius(body_radius)
        if (present(light_radius)) call s%set_light_radius(light_radius)
        s%region(umbra)%color = [0.95_wp, 0.25_wp, 0.2_wp, 0.25_wp]
        s%region(penumbra)%color = [0.95_wp, 0.75_wp, 0.25_wp, 0.08_wp]
        s%region(antumbra)%color = [0.35_wp, 0.5_wp, 1.0_wp, 0.25_wp]
    end function new_shadow_cones