set_light_source_enabled Subroutine

private subroutine set_light_source_enabled(self, enable)

Whether this frame carries a light source: a point light at its origin (e.g. the Sun), not dimmed with distance (default false; OpenFrames' setLightSourceEnabled). While any frame of a window's scene has one, the window's own light (WindowProxy%set_light_*) is off.

Type Bound

ReferenceFrame

Arguments

Type IntentOptional Attributes Name
class(ReferenceFrame), intent(inout) :: self
logical, intent(in) :: enable

(true: a point light at the frame's origin)


Calls

proc~~set_light_source_enabled~~CallsGraph proc~set_light_source_enabled ReferenceFrame%set_light_source_enabled interface~vkf_switch_set vkf_switch_set proc~set_light_source_enabled->interface~vkf_switch_set proc~build_light build_light proc~set_light_source_enabled->proc~build_light proc~check_status check_status proc~set_light_source_enabled->proc~check_status proc~build_light->proc~check_status interface~vkf_light_create vkf_light_create proc~build_light->interface~vkf_light_create interface~vkf_node_add_child vkf_node_add_child proc~build_light->interface~vkf_node_add_child interface~vkf_switch_create vkf_switch_create proc~build_light->interface~vkf_switch_create proc~apply_light apply_light proc~build_light->proc~apply_light proc~apply_light->proc~check_status interface~vkf_light_set vkf_light_set proc~apply_light->interface~vkf_light_set

Source Code

    subroutine set_light_source_enabled(self, enable)
        class(ReferenceFrame), intent(inout) :: self
        logical, intent(in) :: enable                       !! (true: a point light at the frame's origin)
        self%light_source = enable
        if (self%realized .and. enable .and. .not. c_associated(self%light_node)) call build_light(self)
        if (c_associated(self%light_switch)) &
            call check_status(vkf_switch_set(self%light_switch, merge(1_c_int, 0_c_int, enable)))
    end subroutine set_light_source_enabled