The camera of the view shown (from the last frame): eye, center and up
in the view frame's coordinates (OpenFrames' trackball
getTransformation), or in its root frame's if in_root. Zero before
the window's first frame.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(WindowProxy), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out) | :: | eye(3) |
view frame's coordinates (or root's) |
||
| real(kind=wp), | intent(out) | :: | center(3) |
view frame's coordinates (or root's) |
||
| real(kind=wp), | intent(out) | :: | up(3) |
view frame's coordinates (or root's) |
||
| logical, | intent(in), | optional | :: | in_root |
true: in the root frame's coordinates (default: the view frame's) |
subroutine get_camera(self, eye, center, up, in_root) class(WindowProxy), intent(in) :: self real(wp), intent(out) :: eye(3), center(3), up(3) !! view frame's coordinates (or root's) logical, intent(in), optional :: in_root !! true: in the root frame's coordinates (default: the view frame's) real(wp) :: cam(3,3) eye = 0.0_wp center = 0.0_wp up = 0.0_wp if (.not. self%is_open() .or. .not. associated(self%shown)) return if (vkf_viewer_get_look_at(self%viewer_, eye, center, up) /= 0) return if (.not. present(in_root)) return if (.not. in_root) return cam = transform_camera(rigid_inverse(self%shown%world_to_view()), reshape([eye, center, up], [3, 3])) eye = cam(:, 1) center = cam(:, 2) up = cam(:, 3) end subroutine get_camera