The frame of the scene its trajectories' data are in (see the module
documentation): each point drawn where it is in this frame at the
point's own time. Absent: this frame's own coordinates (the default).
frame must be in the same tree (else the data are drawn as they are,
with a warning) and stay alive while set. The frames' poses at the
points' times are as the scene would place them then, follow modes
included: a frame following with FOLLOW_LOOP (the default) wraps the
points' times into its data's range too (at its data's last time, the
first), so a frame following an ephemeris usually wants FOLLOW_LIMIT.
A lunar flyby computed in Earth-centered inertial coordinates, drawn in
the Moon's body-fixed frame (moon following the Moon's ephemeris,
with its attitude) and, from the same Trajectory, in the inertial frame:
call fixed_path%add_artist(CurveArtist(flyby)) ! (artists declared target, as usual)
call fixed_path%set_data_frame(eci)
if (.not. moon%add_child(fixed_path)) error stop 'add_child failed'
if (.not. eci%add_child(inertial_path)) error stop 'add_child failed'
call craft%follow(flyby, data_frame=eci) ! (craft under moon: on the curve)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DrawableTrajectory), | intent(inout) | :: | self | |||
| class(ReferenceFrame), | intent(in), | optional, | target | :: | frame |
the frame the data are in (absent: this one's) |
subroutine set_data_frame(self, frame) class(DrawableTrajectory), intent(inout) :: self class(ReferenceFrame), intent(in), target, optional :: frame !! the frame the data are in (absent: this one's) self%data_frame_ => null() if (present(frame)) self%data_frame_ => frame self%warned = .false. end subroutine set_data_frame