The pick camera of the view shown, with the cursor at (x, y) (-1 to 1, y up) and no tolerance. False before the first frame (or closed).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(WindowProxy), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | x |
the cursor: -1 to 1 across the window, y up |
||
| real(kind=wp), | intent(in) | :: | y |
the cursor: -1 to 1 across the window, y up |
||
| type(PickCamera), | intent(out) | :: | cam |
the view's camera, the cursor there |
logical function view_camera(self, x, y, cam) result(ok) class(WindowProxy), intent(in) :: self real(wp), intent(in) :: x, y !! the cursor: -1 to 1 across the window, y up type(PickCamera), intent(out) :: cam !! the view's camera, the cursor there real(wp) :: eye(3), center(3), up(3) integer(c_int) :: width, height ok = .false. if (.not. self%is_open() .or. .not. associated(self%shown)) return if (vkf_viewer_size(self%viewer_, width, height) /= 0) return call self%get_camera(eye, center, up, in_root=.true.) cam = pick_camera(eye, center, up, self%shown%projection_type() == PERSPECTIVE, self%shown%field_of_view(), & aspect_ratio(self), self%shown%orthographic_bounds(), int(width), int(height), x, y, 0.0_wp) cam%pixel_ratio = vkf_viewer_pixel_ratio(self%viewer_) ok = .true. end function view_camera