FrameManager Derived Type

type, public :: FrameManager

The root frame of a scene (OpenFrames' FrameManager). The frame is not owned: it must stay alive while managed.


Inherits

type~~framemanager~~InheritsGraph type~framemanager FrameManager type~referenceframe ReferenceFrame type~framemanager->type~referenceframe root type~referenceframe->type~referenceframe follow_frame_ c_ptr c_ptr type~referenceframe->c_ptr light_node, light_switch, node_, contents_node, axis_node, axis_label_node, axis_arrow, axis_text, name_label_node, name_text type~framepointer FramePointer type~referenceframe->type~framepointer children, parents type~trajectoryfollower TrajectoryFollower type~referenceframe->type~trajectoryfollower follower_ type~framepointer->type~referenceframe p type~datasource DataSource type~trajectoryfollower->type~datasource sources_ type~trajectorypointer TrajectoryPointer type~trajectoryfollower->type~trajectorypointer trajs type~trajectory Trajectory type~trajectorypointer->type~trajectory p

Inherited by

type~~framemanager~~InheritedByGraph type~framemanager FrameManager type~windowproxy WindowProxy type~windowproxy->type~framemanager scene

Components

Type Visibility Attributes Name Initial
class(ReferenceFrame), private, pointer :: root => null()

the scene's root frame (not owned)

real(kind=wp), private :: updated_time = 0.0_wp

the time of the last one

integer, private :: updates = 0

scene updates so far


Constructor

public interface FrameManager

The FrameManager constructor: FrameManager(...) makes one (see new_frame_manager for its arguments).

  • private function new_frame_manager(frame) result(fm)

    A frame manager for the scene with root frame (optional).

    Arguments

    Type IntentOptional Attributes Name
    class(ReferenceFrame), intent(in), optional, target :: frame

    the root frame (not owned)

    Return Value type(FrameManager)


Type-Bound Procedures

procedure, public :: frame => fm_frame

  • private function fm_frame(self) result(root)

    The root frame (null if none).

    Arguments

    Type IntentOptional Attributes Name
    class(FrameManager), intent(in) :: self

    Return Value class(ReferenceFrame), pointer

procedure, public :: num_updates => fm_num_updates

  • private pure function fm_num_updates(self) result(n)

    Number of scene updates so far (update).

    Arguments

    Type IntentOptional Attributes Name
    class(FrameManager), intent(in) :: self

    Return Value integer

procedure, public :: set_frame => fm_set_frame

  • private subroutine fm_set_frame(self, frame)

    Set the root frame of the scene (not owned: it must stay alive while managed). (The scene is for a window: this also starts loading the Vulkan driver for the first one, in the background, which can take a few tenths of a second.)

    Arguments

    Type IntentOptional Attributes Name
    class(FrameManager), intent(inout) :: self
    class(ReferenceFrame), intent(in), target :: frame

    the root frame (not owned)

procedure, public :: update => fm_update

  • 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.

    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)

Source Code

    type, public :: FrameManager
        private
        class(ReferenceFrame), pointer :: root => null()    !! the scene's root frame (not owned)
        integer :: updates = 0                              !! scene updates so far
        real(wp) :: updated_time = 0.0_wp                   !! the time of the last one
    contains
        procedure :: set_frame => fm_set_frame
        procedure :: frame => fm_frame
        procedure :: update => fm_update, num_updates => fm_num_updates
    end type FrameManager