motion_key Subroutine

private recursive subroutine motion_key(self, stamp, data)

What the frame's motion depends on, for drawings that depend on it to know when to redraw: stamp, the latest change of the motion of it and its ancestors (through first parents), and of the frames their followed data are in (poses set, parents changed, what is followed and how); and data, the followed trajectories' revisions summed. Either changes when the frame's motion over time changes.

Type Bound

ReferenceFrame

Arguments

Type IntentOptional Attributes Name
class(ReferenceFrame), intent(in) :: self
integer, intent(out) :: stamp

the latest change; the followed data's revisions

integer, intent(out) :: data

the latest change; the followed data's revisions


Calls

proc~~motion_key~~CallsGraph proc~motion_key ReferenceFrame%motion_key proc~motion_key->proc~motion_key proc~data_revision TrajectoryFollower%data_revision proc~motion_key->proc~data_revision proc~motion_stamp TrajectoryFollower%motion_stamp proc~motion_key->proc~motion_stamp proc~generation Trajectory%generation proc~data_revision->proc~generation proc~revision~2 Trajectory%revision proc~data_revision->proc~revision~2

Called by

proc~~motion_key~~CalledByGraph proc~motion_key ReferenceFrame%motion_key proc~motion_key->proc~motion_key proc~motion_changed motion_changed proc~motion_changed->proc~motion_key proc~data_changed data_changed proc~data_changed->proc~motion_changed proc~marker_update MarkerArtist%marker_update proc~marker_update->proc~data_changed proc~segment_update SegmentArtist%segment_update proc~segment_update->proc~data_changed proc~write_changed write_changed proc~write_changed->proc~data_changed proc~chain_update ChainArtist%chain_update proc~chain_update->proc~write_changed proc~curve_update CurveArtist%curve_update proc~curve_update->proc~write_changed

Source Code

    recursive subroutine motion_key(self, stamp, data)
        class(ReferenceFrame), intent(in) :: self
        integer, intent(out) :: stamp, data                 !! the latest change; the followed data's revisions
        integer :: s, d
        stamp = self%stamp_
        data = 0
        if (self%following) then
            stamp = max(stamp, self%follower_%motion_stamp())
            data = self%follower_%data_revision()
            if (associated(self%follow_frame_)) then
                call self%follow_frame_%motion_key(s, d)
                stamp = max(stamp, s)
                data = data + d
            end if
        end if
        if (self%n_parents > 0) then
            call self%parents(1)%p%motion_key(s, d)
            stamp = max(stamp, s)
            data = data + d
        end if
    end subroutine motion_key