The base of the artists drawing a trajectory's points through one chain of buffers (CurveArtist: a line, a chain point per trajectory point; RibbonArtist: a surface, a pair of chain points per trajectory point): the chain and how much of it is written and drawn, the trace tail, the trajectory's colors, and the update (chain_update: the points written as they change, then drawn all or, in trace mode, those passed and the tail to the point at the current time). Each extension says what its chain is (chain_kind), how many points it draws (points), its tail's node (new_tail), its style (apply_style), how its points are written (write_points) and its tail drawn (draw_tail).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(LineChain), | private | :: | chain |
the buffers |
|||
| logical, | private | :: | compile | = | .false. |
(chunks made later are compiled) |
|
| integer, | private | :: | first_drawn_ | = | 1 |
the first of them (trace mode, decreasing times: later) |
|
| type(c_ptr), | private | :: | group | = | c_null_ptr |
the chain's group (to make it again, colored or not) |
|
| integer, | private | :: | n_colored | = | 0 |
points written with the trajectory's own colors |
|
| integer, | private | :: | n_drawn | = | 0 |
trajectory points drawn from it |
|
| integer, | private | :: | n_written | = | 0 |
trajectory points written to the chain |
|
| logical, | private | :: | point_colors_ | = | .true. |
the trajectory's colors, if any (see set_point_colors) |
|
| type(c_ptr), | private | :: | tail | = | c_null_ptr |
to the point at the current time (trace mode) |
|
| logical, | private | :: | tail_shown | = | .false. |
the tail is drawn |
|
| real(kind=wp), | private | :: | tail_time | = | huge(1.0_wp) |
the time the tail was drawn for |
The style (the artist's color, width, ...) given to the chain and the tail.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(inout) | :: | self |
Create the chain of buffers (sized for the points now) and the trace
tail under group.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(inout) | :: | self | |||
| type(c_ptr), | intent(in) | :: | viewer |
compiles what is made later (null: nothing to) |
||
| type(c_ptr), | intent(in) | :: | group |
the artist's group |
The kind of chain (LineChain's CHAIN_STRIP or CHAIN_RIBBON).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(in) | :: | self |
The trace tail: from point k (the latest passed) to the point interpolated at time t toward point k2 (the next in time); none if either isn't a point written.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the current time |
||
| integer, | intent(in) | :: | k |
the tail's ends (0: none) |
||
| integer, | intent(in) | :: | k2 |
the tail's ends (0: none) |
The first point drawn (1, or in trace mode of decreasing times the earliest point passed): points first_drawn .. first_drawn + num_drawn - 1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(in) | :: | self |
The trajectory drawn (null if none).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TrajectoryArtist), | intent(in) | :: | self |
The chain, colored if the trajectory's colors are drawn.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(inout) | :: | self |
The trace tail's node (null on failure), made with the chain.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(in) | :: | self |
Number of buffers the artist is drawn with (0 until built).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(in) | :: | self |
Number of trajectory points drawn now (all of them, or in trace mode those passed).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(in) | :: | self |
Whether pick tests what this artist draws.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TrajectoryArtist), | intent(in) | :: | self |
Whether a trajectory's colors are drawn.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(in) | :: | self |
The number of trajectory points to draw (0 if none).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(in) | :: | self |
Forget the render nodes: the chain and the tail (see artist_release).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(inout) | :: | self |
Whether pick tests what this artist draws (default true; e.g. false for a spacecraft's marker beside its orbit's curve).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TrajectoryArtist), | intent(inout) | :: | self | |||
| logical, | intent(in) | :: | pickable |
true: picked (default) |
Whether a trajectory with colors is drawn in them (default true); points without a color yet (colors arriving after positions) in the artist's color. A curve: each segment blended from its first point's color to its second's (with level of detail, a color lasting fewer points than are skipped may not show from far away); a surface: each point's pair in its color, times the artist's alpha. False: all in the artist's color.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(inout) | :: | self | |||
| logical, | intent(in) | :: | enabled |
true: the trajectory's colors |
Draw only the part up to the current time (see the module documentation).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TrajectoryArtist), | intent(inout) | :: | self | |||
| logical, | intent(in) | :: | enabled |
true: draw only up to the current time |
Draw traj (it must stay alive while drawn).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TrajectoryArtist), | intent(inout) | :: | self | |||
| type(Trajectory), | intent(in), | target | :: | traj |
the trajectory to draw (not owned) |
Whether only the part up to the current time is drawn.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(TrajectoryArtist), | intent(in) | :: | self |
Write the points added (all of them on a redraw), and draw them all or, in trace mode, those passed and the tail to the point at time t.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the current time |
Write trajectory points i1 .. i2 into the chain (and upload the chunks written to).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ChainArtist), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | i1 |
the trajectory points |
||
| integer, | intent(in) | :: | i2 |
the trajectory points |
type, abstract, extends(TrajectoryArtist) :: ChainArtist private logical :: point_colors_ = .true. !! the trajectory's colors, if any (see set_point_colors) ! rendering type(c_ptr) :: group = c_null_ptr !! the chain's group (to make it again, colored or not) logical :: compile = .false. !! (chunks made later are compiled) type(LineChain) :: chain !! the buffers type(c_ptr) :: tail = c_null_ptr !! to the point at the current time (trace mode) integer :: n_written = 0 !! trajectory points written to the chain integer :: n_drawn = 0 !! trajectory points drawn from it integer :: first_drawn_ = 1 !! the first of them (trace mode, decreasing times: later) integer :: n_colored = 0 !! points written with the trajectory's own colors logical :: tail_shown = .false. !! the tail is drawn real(wp) :: tail_time = huge(1.0_wp) !! the time the tail was drawn for contains procedure :: set_point_colors, point_colors procedure :: num_chunks, num_drawn, first_drawn procedure :: build => chain_build procedure :: update => chain_update procedure :: release => chain_release procedure :: init_chain => chain_init procedure(chain_kind_interface), deferred :: chain_kind procedure(chain_points_interface), deferred :: points procedure(new_tail_interface), deferred :: new_tail procedure(apply_style_interface), deferred :: apply_style procedure(write_points_interface), deferred :: write_points procedure(draw_tail_interface), deferred :: draw_tail end type ChainArtist