set_light_position Subroutine

private subroutine set_light_position(self, position)

The light's position in eye coordinates (x right, y up, z toward the viewer): [x, y, z, 0] for a directional light from direction (x, y, z), [x, y, z, 1] for a point light (OpenFrames' setLightPosition; default [0, 0, 1, 0], a headlight).

Type Bound

WindowProxy

Arguments

Type IntentOptional Attributes Name
class(WindowProxy), intent(inout) :: self
real(kind=wp), intent(in) :: position(4)

[x, y, z, w], eye coordinates (not all 0)


Calls

proc~~set_light_position~~CallsGraph proc~set_light_position WindowProxy%set_light_position proc~apply_window_light apply_window_light proc~set_light_position->proc~apply_window_light interface~vkf_light_set vkf_light_set proc~apply_window_light->interface~vkf_light_set interface~vkf_viewer_light vkf_viewer_light proc~apply_window_light->interface~vkf_viewer_light

Source Code

    subroutine set_light_position(self, position)
        class(WindowProxy), intent(inout) :: self
        real(wp), intent(in) :: position(4)                 !! [x, y, z, w], eye coordinates (not all 0)
        if (all(position(1:3) == 0.0_wp) .and. position(4) == 0.0_wp) return
        self%light_position_ = position
        call apply_window_light(self)
    end subroutine set_light_position