fm_update Subroutine

private subroutine fm_update(self, t, seen)

Update the scene for time t (followed trajectories, artists) and copy the frames' positions and attitudes to the renderer, unless another window already did for this time since this window's last frame. seen is the window's own: the number of updates at its last frame.

Type Bound

FrameManager

Arguments

Type IntentOptional Attributes Name
class(FrameManager), intent(inout) :: self
real(kind=wp), intent(in) :: t

simulation time

integer, intent(inout) :: seen

the window's own: updates at its last frame (updated)


Calls

proc~~fm_update~~CallsGraph proc~fm_update FrameManager%fm_update proc~late_update ReferenceFrame%late_update proc~fm_update->proc~late_update proc~sync ReferenceFrame%sync proc~fm_update->proc~sync proc~update ReferenceFrame%update proc~fm_update->proc~update proc~late_update->proc~late_update proc~sync->proc~sync interface~vkf_transform_set_matrix vkf_transform_set_matrix proc~sync->interface~vkf_transform_set_matrix proc~check_status check_status proc~sync->proc~check_status proc~local_matrix ReferenceFrame%local_matrix proc~sync->proc~local_matrix proc~followed_pose followed_pose proc~update->proc~followed_pose proc~update~2 TrajectoryFollower%update proc~update->proc~update~2 proc~quat_from_matrix quat_from_matrix proc~followed_pose->proc~quat_from_matrix proc~quat_multiply quat_multiply proc~followed_pose->proc~quat_multiply proc~quat_normalize quat_normalize proc~followed_pose->proc~quat_normalize proc~rigid_inverse rigid_inverse proc~followed_pose->proc~rigid_inverse proc~state_at TrajectoryFollower%state_at proc~followed_pose->proc~state_at proc~world_matrix_at ReferenceFrame%world_matrix_at proc~followed_pose->proc~world_matrix_at proc~frame_matrix frame_matrix proc~local_matrix->proc~frame_matrix proc~update~2->proc~state_at proc~quat_to_matrix quat_to_matrix proc~frame_matrix->proc~quat_to_matrix proc~chosen_trajectory chosen_trajectory proc~state_at->proc~chosen_trajectory proc~data_valid TrajectoryFollower%data_valid proc~state_at->proc~data_valid proc~interpolate_attitude interpolate_attitude proc~state_at->proc~interpolate_attitude proc~interpolate_position interpolate_position proc~state_at->proc~interpolate_position proc~time_index Trajectory%time_index proc~state_at->proc~time_index proc~wrapped_time wrapped_time proc~state_at->proc~wrapped_time proc~world_matrix_at->proc~world_matrix_at proc~local_matrix_at ReferenceFrame%local_matrix_at proc~world_matrix_at->proc~local_matrix_at proc~time_distance Trajectory%time_distance proc~chosen_trajectory->proc~time_distance proc~verify_data Trajectory%verify_data proc~data_valid->proc~verify_data proc~attitude~3 Trajectory%attitude proc~interpolate_attitude->proc~attitude~3 proc~num_attitudes Trajectory%num_attitudes proc~interpolate_attitude->proc~num_attitudes proc~quat_slerp quat_slerp proc~interpolate_attitude->proc~quat_slerp proc~num_points Trajectory%num_points proc~interpolate_position->proc~num_points proc~point_between Trajectory%point_between proc~interpolate_position->proc~point_between proc~point~2 Trajectory%point proc~interpolate_position->proc~point~2 proc~local_matrix_at->proc~followed_pose proc~local_matrix_at->proc~frame_matrix proc~time_index->proc~time_distance proc~time_range~3 Trajectory%time_range proc~wrapped_time->proc~time_range~3 proc~point_between->proc~num_points proc~point_between->proc~point~2 proc~time_fraction Trajectory%time_fraction proc~point_between->proc~time_fraction

Source Code

    subroutine fm_update(self, t, seen)
        class(FrameManager), intent(inout) :: self
        real(wp), intent(in) :: t                           !! simulation time
        integer, intent(inout) :: seen                      !! the window's own: updates at its last frame (updated)
        if (.not. associated(self%root)) return
        if (.not. (self%updates > 0 .and. t == self%updated_time .and. seen /= self%updates)) then
            call self%root%update(t)
            call self%root%late_update(t)                   ! (all frames at their positions for t)
            call self%root%sync()
            self%updates = self%updates + 1
            self%updated_time = t
        end if
        seen = self%updates
    end subroutine fm_update