Handles (not in OpenFrames): things in the scene the mouse drags, to design graphically, e.g. a trajectory's initial position and velocity.
A DragHandle is a frame with a point the mouse can grab (handle_point,
in the frame's coordinates) and move (move_handle_point); extensions say
what the point is and how they are drawn. Windows drive them (WindowProxy,
see vkf_window): the handle under the cursor is hovered (drawn brighter); a
left button press on it grabs it (the camera stays where it is: the
trackball doesn't see the press), the mouse's moves drag it, and the
release lets it go. The window's event handler is told (handle_drag,
with DRAG_START, DRAG_MOVE and DRAG_END), e.g. to compute a trajectory again
from the new state while the handle is dragged. Handles can also be moved
by the program (set_vector), and dragged by it (grab,
drag and release, given the cursor's ray).
Where the point goes is where the cursor's ray (cursor_ray) meets the handle's constraint (set_constraint), as it was when the handle was grabbed, plus the point's offset from the cursor then (so the point doesn't jump to the cursor): * HANDLE_FREE (the default): the plane through the point facing the camera; * HANDLE_PLANE: the plane through the point with the normal given; * HANDLE_LINE: the line through the point along the direction given; * HANDLE_RADIAL: the line from the frame's origin through the point (e.g. a vector's length only); * HANDLE_SPHERE: the sphere about the frame's origin through the point (e.g. a vector's direction only), on the side (near or far, from the camera) where it was grabbed; where the ray misses it, its edge nearest the ray. Normals and directions are in the frame's coordinates. A ray parallel to a plane or a line doesn't move the point. Positions go through the frames' first parents to the root (world_matrix).
Handles on the same spot of the screen (e.g. a trajectory's end marker on its state's arrow): the window hovers the one nearest the cursor on the screen; within a few pixels of each other, the one of the highest priority (set_priority; markers, TimeHandle, 1 by default, before arrows, 0), then the nearest to the eye.
A VectorHandle is an arrow from its frame's origin to its tip, the tip being the handle: a vector (set_vector, in the frame's coordinates) times a display scale (set_display_scale: e.g. 1000 s to draw a velocity in km/s as km). Dragging the tip changes the vector. The arrow is in the frame's color, lit as frames' axes (by how it faces the viewer); its head is set_head_size long (scene units; default 0.2 of the arrow, at most half of it). It is built once, as a unit shaft and head scaled and turned by two transforms: a new vector only sets them (cheap enough for every frame of a drag).
A TimeHandle is a marker at a time along a path (a TimePath: a position for any time, in the coordinates of the handle's parent frame, e.g. a propagator's), dragged along the path to change the time: e.g. a trajectory's end, dragged to make it longer or shorter in time. The path needn't be drawn where the handle goes (beyond a trajectory's last point, the program propagates further). The frame is placed at the path's position for the time (set_time), so its name label (e.g. the time, set_name) goes with it; the marker is the size of MarkerArtist's markers (window units, not shrinking with distance). A drag takes the time within set_time_range whose point is nearest the cursor's ray (as seen from the eye): among the path's points sampled at the grab, then refined between them; where the path passes near itself (orbits), the match nearest in time to the handle's time is taken, so it doesn't jump to another revolution. A TrajectoryPath follows a Trajectory's points (interpolated linearly), within its times.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | HANDLE_FREE | = | 0 |
A handle's constraint (set_constraint; see the module documentation). the plane facing the camera |
| integer, | public, | parameter | :: | HANDLE_LINE | = | 2 |
a line (its direction given) |
| integer, | public, | parameter | :: | HANDLE_PLANE | = | 1 |
a plane (its normal given) |
| integer, | public, | parameter | :: | HANDLE_RADIAL | = | 3 |
the line from the frame's origin through the point |
| integer, | public, | parameter | :: | HANDLE_SPHERE | = | 4 |
the sphere about the frame's origin through the point |
| integer, | private, | save | :: | n_shown | = | 0 |
handles shown in a window (so far) |
| integer, | private, | parameter | :: | path_samples | = | 600 |
a TimeHandle's path sampled at a grab |
The TimeHandle constructor: TimeHandle(...) makes one (see new_time_handle for its
arguments).
A time handle (see the module documentation) on path (which must stay
alive while used), at time time (default 0) within t_min to t_max
(default: the time), in color ([r, g, b] or [r, g, b, a]). Its axes
and labels are hidden (its name label can be shown: e.g. the time).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
the frame's name |
||
| class(TimePath), | intent(in), | target | :: | path |
the path it moves along |
|
| real(kind=wp), | intent(in), | optional | :: | time |
its time |
|
| real(kind=wp), | intent(in), | optional | :: | t_min |
the times a drag may reach |
|
| real(kind=wp), | intent(in), | optional | :: | t_max |
the times a drag may reach |
|
| real(kind=wp), | intent(in), | optional | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
The TrajectoryPath constructor: TrajectoryPath(...) makes one (see new_trajectory_path for its
arguments).
A path along traj (which must stay alive while used).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Trajectory), | intent(in), | target | :: | traj |
the trajectory followed |
The VectorHandle constructor: VectorHandle(...) makes one (see new_vector_handle for its
arguments).
A vector handle (see the module documentation): vector in its frame's
coordinates (default [1, 0, 0]), drawn scale times as long (default 1),
in color ([r, g, b] or [r, g, b, a]). Its axes and labels are hidden.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
the frame's name |
||
| real(kind=wp), | intent(in), | optional | :: | vector(3) |
frame coordinates |
|
| real(kind=wp), | intent(in), | optional | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
|
| real(kind=wp), | intent(in), | optional | :: | scale |
display scale (scene units per vector unit; > 0) |
The point the mouse grabs (frame coordinates).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(in) | :: | self |
Move the point to p (frame coordinates), and the drawing with it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | p(3) |
the new point (frame coordinates) |
The position at time t (the handle's parent's coordinates).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimePath), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the time |
Draw the handle as hovered, dragged or neither (hovered, dragged).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self |
A handle the mouse drags (see the module documentation): extensions give its point and draw it.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private | :: | axis_(3) | = | [0.0_wp, 0.0_wp, 1.0_wp] |
the plane's normal or the line's direction (frame coordinates) |
|
| integer, | private | :: | constraint_ | = | HANDLE_FREE |
HANDLE_* |
|
| logical, | private | :: | draggable_ | = | .true. |
the mouse may grab it |
|
| logical, | private | :: | dragged_ | = | .false. |
grabbed, until released |
|
| logical, | private | :: | far_side | = | .false. |
(HANDLE_SPHERE) grabbed on the far side |
|
| logical, | private | :: | hovered_ | = | .false. |
under the cursor |
|
| real(kind=wp), | private | :: | offset(3) | = | 0.0_wp |
the point's offset from the cursor's |
|
| integer, | private | :: | priority_ | = | 0 |
over other handles on the same spot (higher first) |
|
| real(kind=wp), | private | :: | radius | = | 0.0_wp |
(HANDLE_SPHERE) the sphere's radius |
|
| real(kind=wp), | private | :: | ref_axis(3) | = | 0.0_wp |
the plane's normal or the line's direction then |
|
| real(kind=wp), | private | :: | ref_point(3) | = | 0.0_wp |
the point when grabbed |
| procedure, public :: add_child | |
| procedure, public :: attitude | |
| procedure, public :: axes_labels_shown | |
| procedure, public :: axes_shown | |
| procedure, public :: axis_label | |
| procedure, public :: bound | |
| procedure, public :: build_contents | |
| procedure, public :: child | |
| procedure, public :: child_index | |
| procedure, public :: color | |
| procedure, public :: constraint | |
| procedure, public :: constraint_axis | |
| procedure, public :: contents_shown | |
| procedure, public :: detach | |
| procedure, public :: drag | |
| procedure, public :: draggable | |
| procedure, public :: dragged | |
| procedure, public :: follow | |
| procedure, public :: follow_frame | |
| procedure, public :: follower | |
| procedure, public :: frame_info | |
| procedure, public :: frame_string | |
| procedure, public :: grab | |
| procedure(handle_point_interface), public, deferred :: handle_point | |
| procedure, public :: has_light_source | |
| procedure, public :: hovered | |
| procedure, public :: is_following | |
| procedure, public :: label_alignment | |
| procedure, public :: label_font | |
| procedure, public :: label_size | |
| procedure, public :: late_update | |
| procedure, public :: light_ambient | |
| procedure, public :: light_diffuse | |
| procedure, public :: light_source_enabled | |
| procedure, public :: light_specular | |
| procedure, public :: local_matrix | |
| procedure, public :: local_matrix_at | |
| procedure, public :: motion_key | |
| procedure(move_handle_point_interface), public, deferred :: move_handle_point | |
| procedure, public :: move_x_axis | |
| procedure, public :: move_y_axis | |
| procedure, public :: move_z_axis | |
| procedure, public :: name | |
| procedure, public :: name_label_on_top | |
| procedure, public :: name_label_shown | |
| procedure, public :: node | |
| procedure, public :: num_children | |
| procedure, public :: num_parents | |
| procedure, public :: parent | |
| procedure, public :: parent_index | |
| procedure, public :: pick | |
| procedure, public :: pickable | |
| procedure, public :: position | |
| procedure, public :: position_of | |
| procedure, public :: priority | |
| procedure, public :: realize | |
| procedure, public :: release | |
| procedure, public :: remove_child | |
| procedure, public :: reposition_axes | |
| procedure, public :: set_attitude | |
| procedure, public :: set_color | |
| procedure, public :: set_constraint | |
| procedure, public :: set_draggable | |
| procedure, public :: set_hovered | |
| procedure, public :: set_label_alignment | |
| procedure, public :: set_label_font | |
| procedure, public :: set_label_size | |
| procedure, public :: set_light_ambient | |
| procedure, public :: set_light_diffuse | |
| procedure, public :: set_light_source_enabled | |
| procedure, public :: set_light_specular | |
| procedure, public :: set_name | |
| procedure, public :: set_name_label_on_top | |
| procedure, public :: set_pickable | |
| procedure, public :: set_position | |
| procedure, public :: set_priority | |
| procedure, public :: set_x_label | |
| procedure, public :: set_y_label | |
| procedure, public :: set_z_label | |
| procedure, public :: show_axes | |
| procedure, public :: show_axes_labels | |
| procedure, public :: show_contents | |
| procedure, public :: show_decorations | |
| procedure, public :: show_name_label | |
| procedure(show_state_interface), public, deferred :: show_state | |
| procedure, public :: sync | |
| procedure, public :: unfollow | |
| procedure, public :: update | |
| procedure, public :: world_matrix | |
| procedure, public :: world_matrix_at |
A marker dragged along a path to change its time (see the module documentation).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | private | :: | marker | = | c_null_ptr |
the marker node (at the frame's origin) |
|
| class(TimePath), | private, | pointer | :: | path_ | => | null() |
the path (not owned) |
| real(kind=wp), | private, | allocatable | :: | sample_p(:,:) | |||
| real(kind=wp), | private, | allocatable | :: | sample_t(:) | |||
| integer, | private | :: | shape_ | = | MARKER_DISK |
a MARKER_* shape |
|
| real(kind=wp), | private | :: | size_ | = | 14.0_wp |
the marker's size (window units) |
|
| real(kind=wp), | private | :: | t_max | = | 1.0_wp |
the times a drag may reach |
|
| real(kind=wp), | private | :: | t_min | = | 0.0_wp |
the times a drag may reach |
|
| real(kind=wp), | private | :: | time_ | = | 0.0_wp |
the time (its point: the frame's position) |
The TimeHandle constructor: TimeHandle(...) makes one (see new_time_handle for its
arguments).
| private function new_time_handle (name, path, time, t_min, t_max, color) | A time handle (see the module documentation) on |
| procedure, public :: add_child | |
| procedure, public :: attitude | |
| procedure, public :: axes_labels_shown | |
| procedure, public :: axes_shown | |
| procedure, public :: axis_label | |
| procedure, public :: bound => time_bound | |
| procedure, public :: build_contents => time_build_contents | |
| procedure, public :: child | |
| procedure, public :: child_index | |
| procedure, public :: color | |
| procedure, public :: constraint | |
| procedure, public :: constraint_axis | |
| procedure, public :: contents_shown | |
| procedure, public :: detach | |
| procedure, public :: drag => time_drag | |
| procedure, public :: draggable | |
| procedure, public :: dragged | |
| procedure, public :: follow | |
| procedure, public :: follow_frame | |
| procedure, public :: follower | |
| procedure, public :: frame_info => time_frame_info | |
| procedure, public :: frame_string | |
| procedure, public :: grab => time_grab | |
| procedure, public :: handle_point => time_handle_point | |
| procedure, public :: has_light_source | |
| procedure, public :: hovered | |
| procedure, public :: is_following | |
| procedure, public :: label_alignment | |
| procedure, public :: label_font | |
| procedure, public :: label_size | |
| procedure, public :: late_update | |
| procedure, public :: light_ambient | |
| procedure, public :: light_diffuse | |
| procedure, public :: light_source_enabled | |
| procedure, public :: light_specular | |
| procedure, public :: local_matrix | |
| procedure, public :: local_matrix_at | |
| procedure, public :: marker_shape | |
| procedure, public :: marker_size | |
| procedure, public :: motion_key | |
| procedure, public :: move_handle_point => time_move_handle_point | |
| procedure, public :: move_x_axis | |
| procedure, public :: move_y_axis | |
| procedure, public :: move_z_axis | |
| procedure, public :: name | |
| procedure, public :: name_label_on_top | |
| procedure, public :: name_label_shown | |
| procedure, public :: node | |
| procedure, public :: num_children | |
| procedure, public :: num_parents | |
| procedure, public :: parent | |
| procedure, public :: parent_index | |
| procedure, public :: pick => time_pick | |
| procedure, public :: pickable | |
| procedure, public :: position | |
| procedure, public :: position_of | |
| procedure, public :: priority | |
| procedure, public :: realize | |
| procedure, public :: release | |
| procedure, public :: remove_child | |
| procedure, public :: reposition_axes | |
| procedure, public :: set_attitude | |
| procedure, public :: set_color => time_set_color | |
| procedure, public :: set_constraint | |
| procedure, public :: set_draggable | |
| procedure, public :: set_hovered | |
| procedure, public :: set_label_alignment | |
| procedure, public :: set_label_font | |
| procedure, public :: set_label_size | |
| procedure, public :: set_light_ambient | |
| procedure, public :: set_light_diffuse | |
| procedure, public :: set_light_source_enabled | |
| procedure, public :: set_light_specular | |
| procedure, public :: set_marker_shape | |
| procedure, public :: set_marker_size | |
| procedure, public :: set_name | |
| procedure, public :: set_name_label_on_top | |
| procedure, public :: set_path | |
| procedure, public :: set_pickable | |
| procedure, public :: set_position | |
| procedure, public :: set_priority | |
| procedure, public :: set_time | |
| procedure, public :: set_time_range | |
| procedure, public :: set_x_label | |
| procedure, public :: set_y_label | |
| procedure, public :: set_z_label | |
| procedure, public :: show_axes | |
| procedure, public :: show_axes_labels | |
| procedure, public :: show_contents | |
| procedure, public :: show_decorations | |
| procedure, public :: show_name_label | |
| procedure, public :: show_state => time_show_state | |
| procedure, public :: sync | |
| procedure, public :: time | |
| procedure, public :: time_range | |
| procedure, public :: unfollow | |
| procedure, public :: update | |
| procedure, public :: world_matrix | |
| procedure, public :: world_matrix_at |
A path for a TimeHandle (see the module documentation): a position for any time.
| procedure(path_position_interface), public, deferred :: position |
A TimePath along a Trajectory's points, interpolated linearly (before its first time: its first point; after its last: its last).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(Trajectory), | public, | pointer | :: | trajectory | => | null() |
the trajectory followed (not owned) |
The TrajectoryPath constructor: TrajectoryPath(...) makes one (see new_trajectory_path for its
arguments).
| private function new_trajectory_path (traj) | A path along |
| procedure, public :: position => trajectory_path_position |
An arrow whose tip the mouse drags (see the module documentation).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(c_ptr), | private | :: | head | = | c_null_ptr |
the transforms of the unit shaft and head |
|
| type(c_ptr), | private | :: | head_mesh | = | c_null_ptr |
the unit shaft and head (colored by their materials) |
|
| real(kind=wp), | private | :: | head_size_ | = | 0.0_wp |
the head's length (scene units; 0: 0.2 of the arrow) |
|
| real(kind=wp), | private | :: | scale_ | = | 1.0_wp |
drawn as scale * vector (scene units) |
|
| type(c_ptr), | private | :: | shaft | = | c_null_ptr |
the transforms of the unit shaft and head |
|
| type(c_ptr), | private | :: | shaft_mesh | = | c_null_ptr |
the unit shaft and head (colored by their materials) |
|
| type(c_ptr), | private | :: | switch | = | c_null_ptr |
shows the arrow (not when the vector is 0) |
|
| real(kind=wp), | private | :: | vector_(3) | = | [1.0_wp, 0.0_wp, 0.0_wp] |
the vector (frame coordinates) |
The VectorHandle constructor: VectorHandle(...) makes one (see new_vector_handle for its
arguments).
| private function new_vector_handle (name, vector, color, scale) | A vector handle (see the module documentation): |
| procedure, public :: add_child | |
| procedure, public :: attitude | |
| procedure, public :: axes_labels_shown | |
| procedure, public :: axes_shown | |
| procedure, public :: axis_label | |
| procedure, public :: bound => vector_bound | |
| procedure, public :: build_contents => vector_build_contents | |
| procedure, public :: child | |
| procedure, public :: child_index | |
| procedure, public :: color | |
| procedure, public :: constraint | |
| procedure, public :: constraint_axis | |
| procedure, public :: contents_shown | |
| procedure, public :: detach | |
| procedure, public :: display_scale | |
| procedure, public :: drag | |
| procedure, public :: draggable | |
| procedure, public :: dragged | |
| procedure, public :: follow | |
| procedure, public :: follow_frame | |
| procedure, public :: follower | |
| procedure, public :: frame_info => vector_frame_info | |
| procedure, public :: frame_string | |
| procedure, public :: grab | |
| procedure, public :: handle_point => vector_handle_point | |
| procedure, public :: has_light_source | |
| procedure, public :: head_size | |
| procedure, public :: hovered | |
| procedure, public :: is_following | |
| procedure, public :: label_alignment | |
| procedure, public :: label_font | |
| procedure, public :: label_size | |
| procedure, public :: late_update | |
| procedure, public :: light_ambient | |
| procedure, public :: light_diffuse | |
| procedure, public :: light_source_enabled | |
| procedure, public :: light_specular | |
| procedure, public :: local_matrix | |
| procedure, public :: local_matrix_at | |
| procedure, public :: motion_key | |
| procedure, public :: move_handle_point => vector_move_handle_point | |
| procedure, public :: move_x_axis | |
| procedure, public :: move_y_axis | |
| procedure, public :: move_z_axis | |
| procedure, public :: name | |
| procedure, public :: name_label_on_top | |
| procedure, public :: name_label_shown | |
| procedure, public :: node | |
| procedure, public :: num_children | |
| procedure, public :: num_parents | |
| procedure, public :: parent | |
| procedure, public :: parent_index | |
| procedure, public :: pick => vector_pick | |
| procedure, public :: pickable | |
| procedure, public :: position | |
| procedure, public :: position_of | |
| procedure, public :: priority | |
| procedure, public :: realize | |
| procedure, public :: release | |
| procedure, public :: remove_child | |
| procedure, public :: reposition_axes | |
| procedure, public :: set_attitude | |
| procedure, public :: set_color => vector_set_color | |
| procedure, public :: set_constraint | |
| procedure, public :: set_display_scale | |
| procedure, public :: set_draggable | |
| procedure, public :: set_head_size | |
| procedure, public :: set_hovered | |
| procedure, public :: set_label_alignment | |
| procedure, public :: set_label_font | |
| procedure, public :: set_label_size | |
| procedure, public :: set_light_ambient | |
| procedure, public :: set_light_diffuse | |
| procedure, public :: set_light_source_enabled | |
| procedure, public :: set_light_specular | |
| procedure, public :: set_name | |
| procedure, public :: set_name_label_on_top | |
| procedure, public :: set_pickable | |
| procedure, public :: set_position | |
| procedure, public :: set_priority | |
| procedure, public :: set_vector | |
| procedure, public :: set_x_label | |
| procedure, public :: set_y_label | |
| procedure, public :: set_z_label | |
| procedure, public :: show_axes | |
| procedure, public :: show_axes_labels | |
| procedure, public :: show_contents | |
| procedure, public :: show_decorations | |
| procedure, public :: show_name_label | |
| procedure, public :: show_state => vector_show_state | |
| procedure, public :: sync | |
| procedure, public :: tip | |
| procedure, public :: unfollow | |
| procedure, public :: update | |
| procedure, public :: vector | |
| procedure, public :: world_matrix | |
| procedure, public :: world_matrix_at |
Where the ray (origin, unit dir; root frame) meets the constraint taken
at the grab, the frame at transform m to the root: h, in the frame's
coordinates. False if it doesn't.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | origin(3) |
the cursor's ray: its origin (root frame) |
||
| real(kind=wp), | intent(in) | :: | dir(3) |
its direction (a unit vector) |
||
| real(kind=wp), | intent(in) | :: | m(4,4) |
the frame's transform to the root |
||
| real(kind=wp), | intent(out) | :: | h(3) |
where it meets the constraint (frame coordinates) |
The handle's constraint (HANDLE_*).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(in) | :: | self |
The constraint's normal or direction (unit vector, frame coordinates).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(in) | :: | self |
The display scale.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in) | :: | self |
Drag the grabbed handle to the cursor's ray (origin, unit dir; root frame), held to its constraint. False (and not moved) if it isn't grabbed or the ray doesn't meet the constraint.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | origin(3) |
the cursor's ray (root frame) |
||
| real(kind=wp), | intent(in) | :: | dir(3) |
the cursor's ray (root frame) |
Whether the mouse may grab the handle.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(in) | :: | self |
The handle is grabbed (until released).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(in) | :: | self |
Grab the handle with the cursor's ray (origin, unit dir; root frame): its constraint is taken as it is now, and the point's offset from where the ray meets it. False if it isn't draggable.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | origin(3) |
the cursor's ray (root frame) |
||
| real(kind=wp), | intent(in) | :: | dir(3) |
the cursor's ray (root frame) |
Whether any handle has been shown in a window (so windows look for handles under the cursor).
The head's length set (0: 0.2 of the arrow's).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in) | :: | self |
The handle is under the cursor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(in) | :: | self |
The marker's shape (MARKER_*).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(in) | :: | self |
The marker's size (window units).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(in) | :: | self |
A time handle (see the module documentation) on path (which must stay
alive while used), at time time (default 0) within t_min to t_max
(default: the time), in color ([r, g, b] or [r, g, b, a]). Its axes
and labels are hidden (its name label can be shown: e.g. the time).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
the frame's name |
||
| class(TimePath), | intent(in), | target | :: | path |
the path it moves along |
|
| real(kind=wp), | intent(in), | optional | :: | time |
its time |
|
| real(kind=wp), | intent(in), | optional | :: | t_min |
the times a drag may reach |
|
| real(kind=wp), | intent(in), | optional | :: | t_max |
the times a drag may reach |
|
| real(kind=wp), | intent(in), | optional | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
A path along traj (which must stay alive while used).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Trajectory), | intent(in), | target | :: | traj |
the trajectory followed |
A vector handle (see the module documentation): vector in its frame's
coordinates (default [1, 0, 0]), drawn scale times as long (default 1),
in color ([r, g, b] or [r, g, b, a]). Its axes and labels are hidden.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
the frame's name |
||
| real(kind=wp), | intent(in), | optional | :: | vector(3) |
frame coordinates |
|
| real(kind=wp), | intent(in), | optional | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
|
| real(kind=wp), | intent(in), | optional | :: | scale |
display scale (scene units per vector unit; > 0) |
The handle's priority over others on the same spot.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(in) | :: | self |
The handle's time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(in) | :: | self |
Drag the grabbed handle to the cursor's ray (origin, unit dir; root frame): its time where the path is nearest the ray (see the module documentation). False (not moved) if it isn't grabbed or the path is all behind the eye.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | origin(3) |
the cursor's ray (root frame) |
||
| real(kind=wp), | intent(in) | :: | dir(3) |
the cursor's ray (root frame) |
What kind of frame this is: 'TimeHandle'.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(in) | :: | self |
Grab the handle with the cursor's ray (origin, unit dir; root frame): the path sampled over the time range. False if it isn't draggable or has no path.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | origin(3) |
the cursor's ray (root frame) |
||
| real(kind=wp), | intent(in) | :: | dir(3) |
the cursor's ray (root frame) |
The point the mouse grabs: the marker, at the frame's origin.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(in) | :: | self |
The arrow's tip: the display scale times the vector (frame coordinates).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in) | :: | self |
The trajectory's position at time t (point_at: linear
between its points, its first or last point outside its times; 0 if
it has none).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TrajectoryPath), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the time |
A unit part of an arrow along z from the origin (vkf_geometry's arrow: body and head lengths and radii), white (colored by its material), lit as frames' axes. Null on failure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=c_double), | intent(in) | :: | body_length |
the shaft's length (0: none) |
||
| real(kind=c_double), | intent(in) | :: | head_length |
the head's length (0: a flat top) |
||
| real(kind=c_double), | intent(in) | :: | body_radius |
the shaft's radius |
||
| real(kind=c_double), | intent(in) | :: | head_radius |
the head's radius at its base |
The vector (frame coordinates).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in) | :: | self |
What kind of frame this is: 'VectorHandle'.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in) | :: | self |
The point the mouse grabs: the tip.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in) | :: | self |
The arrow's length, its head's length and radius (scene units).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out) | :: | len |
the arrow's length (the tip's distance) |
||
| real(kind=wp), | intent(out) | :: | head_len |
its head's length |
||
| real(kind=wp), | intent(out) | :: | head_radius |
its head's radius |
Let the handle go.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self |
Where the handle can be dragged (HANDLE_*; see the module documentation),
with axis: the plane's normal (HANDLE_PLANE) or the line's direction
(HANDLE_LINE), in the frame's coordinates. Taken when the handle is
next grabbed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | constraint |
HANDLE_* |
||
| real(kind=wp), | intent(in), | optional | :: | axis(3) |
(frame coordinates; any length but 0) |
Scene units per unit of the vector (> 0; default 1): the arrow is
scale * vector.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | scale |
scene units per vector unit (> 0; else ignored) |
Whether the mouse may grab the handle (default true).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self | |||
| logical, | intent(in) | :: | draggable |
true: the mouse may grab it |
The head's length (scene units; at most half the arrow); 0 (the default): 0.2 of the arrow's length.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | size |
the head's length (scene units; 0: 0.2 of the arrow) |
The handle is under the cursor (set by the window), or not.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self | |||
| logical, | intent(in) | :: | hovered |
true: under the cursor |
The marker's shape (a MARKER_* shape of vkf_artists but MARKER_IMAGE; default MARKER_DISK).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | shape |
a MARKER_* shape |
The marker's size (window units, > 0; default 14).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | size |
window units |
The path the handle moves along (which must stay alive while used); its time kept (the frame placed on the new path).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| class(TimePath), | intent(in), | target | :: | path |
the path |
The handle's priority over others on the same spot of the screen (higher first; default 0, a TimeHandle's 1; see the module documentation).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DragHandle), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | priority |
higher: hovered first |
The handle's time (kept within its time range): the frame placed at the path's point for it.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | time |
the time |
The times a drag may reach (t_min <= t_max; else swapped); the handle's time brought within them. Taken at the next grab.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t_min |
the earliest and latest times |
||
| real(kind=wp), | intent(in) | :: | t_max |
the earliest and latest times |
The vector (frame coordinates); can change at any time.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | vector(3) |
frame coordinates |
The marker's bounding sphere: the frame's origin.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out) | :: | center(3) |
the bound's center (frame coordinates) |
||
| real(kind=wp), | intent(out) | :: | radius |
its radius (scene units: 0, the marker sized on the screen) |
The marker: one point at the frame's origin.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| type(c_ptr), | intent(in) | :: | viewer |
a window's viewer (null: headless) |
||
| type(c_ptr), | intent(in) | :: | group |
the frame's contents group |
The handle moved to the sampled point of the path nearest p (frame
coordinates; after a grab: the path's points are sampled then).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | p(3) |
the point (frame coordinates) |
Picked at its marker (within the tolerance plus half its size), as PICK_HANDLE; else the frame's origin.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(in), | target | :: | self | ||
| type(PickCamera), | intent(in) | :: | cam |
the camera and cursor of the pick |
||
| real(kind=wp), | intent(in) | :: | to_root(4,4) |
the frame's transform to the root frame |
||
| type(PickHit), | intent(inout), | allocatable | :: | hits(:) |
hits so far, in hits(1:n); added to |
|
| integer, | intent(inout) | :: | n |
number of hits |
The times a drag may reach.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out) | :: | t_min |
the earliest and latest times |
||
| real(kind=wp), | intent(out) | :: | t_max |
the earliest and latest times |
The marker's color; [r, g, b] or [r, g, b, a].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
The marker's color and size: brighter and larger when hovered, more when dragged.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TimeHandle), | intent(inout) | :: | self |
The shaft and head placed for the vector (hidden if it is 0).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self |
The arrow's bounding sphere (frame coordinates).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out) | :: | center(3) |
the bound's center (frame coordinates) |
||
| real(kind=wp), | intent(out) | :: | radius |
its radius (scene units) |
The arrow: a unit shaft and head under their transforms, in a switch.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self | |||
| type(c_ptr), | intent(in) | :: | viewer |
a window's viewer (null: headless) |
||
| type(c_ptr), | intent(in) | :: | group |
the frame's contents group |
The tip dragged to p: the vector p / the display scale.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | p(3) |
the tip's new place (frame coordinates) |
Picked at its tip and along its head (within the tolerance, plus a few pixels), as PICK_HANDLE; else the frame's origin.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(in), | target | :: | self | ||
| type(PickCamera), | intent(in) | :: | cam |
the camera and cursor of the pick |
||
| real(kind=wp), | intent(in) | :: | to_root(4,4) |
the frame's transform to the root frame |
||
| type(PickHit), | intent(inout), | allocatable | :: | hits(:) |
hits so far, in hits(1:n); added to |
|
| integer, | intent(inout) | :: | n |
number of hits |
The arrow's color; [r, g, b] or [r, g, b, a].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
The arrow's color, brighter when hovered and more when dragged.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self |