drawable_update Subroutine

private recursive subroutine drawable_update(self, t)

Update the frame (and its descendants), then its artists.

Type Bound

DrawableTrajectory

Arguments

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

the current time


Calls

proc~~drawable_update~~CallsGraph proc~drawable_update DrawableTrajectory%drawable_update proc~attach_frames attach_frames proc~drawable_update->proc~attach_frames proc~build_artist build_artist proc~drawable_update->proc~build_artist proc~name ReferenceFrame%name proc~drawable_update->proc~name proc~root_of root_of proc~drawable_update->proc~root_of proc~update ReferenceFrame%update proc~drawable_update->proc~update build build proc~build_artist->build interface~vkf_compile_node vkf_compile_node proc~build_artist->interface~vkf_compile_node interface~vkf_node_add_child vkf_node_add_child proc~build_artist->interface~vkf_node_add_child interface~vkf_switch_create vkf_switch_create proc~build_artist->interface~vkf_switch_create interface~vkf_viewer_any vkf_viewer_any proc~build_artist->interface~vkf_viewer_any proc~check_status check_status proc~build_artist->proc~check_status proc~num_parents ReferenceFrame%num_parents proc~root_of->proc~num_parents proc~parent ReferenceFrame%parent proc~root_of->proc~parent 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~update~2->proc~state_at 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~frame_matrix frame_matrix 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~quat_to_matrix quat_to_matrix proc~frame_matrix->proc~quat_to_matrix 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

    recursive subroutine drawable_update(self, t)
        class(DrawableTrajectory), intent(inout), target :: self
        real(wp), intent(in) :: t                           !! the current time
        class(ReferenceFrame), pointer :: r1, r2
        integer :: k
        call self%ReferenceFrame%update(t)
        self%data_frame_ok = .false.
        if (associated(self%data_frame_)) then              ! (in this tree: else drawn as they are)
            r1 => root_of(self)
            r2 => root_of(self%data_frame_)
            self%data_frame_ok = associated(r1, r2)
            if (.not. self%data_frame_ok .and. .not. self%warned) then
                write(*, '(a)') 'vkframes: '//self%name()//': its data frame is not in its tree (data drawn as they are)'
                self%warned = .true.
            end if
        end if
        call attach_frames(self)
        do k = 1, self%n_artists
            if (.not. c_associated(self%artists(k)%group) .and. c_associated(self%contents_group)) &
                call build_artist(self, k, compile=.true.)
            if (c_associated(self%artists(k)%group)) call self%artists(k)%p%update(t)
        end do
    end subroutine drawable_update