Trajectory data: times with positions, attitudes and optional data vectors, as in OpenFrames' Trajectory.
Data are appended: each time may get one position (with num_optionals optional vectors), one attitude and one color, so there may be fewer positions, attitudes or colors than times (data can arrive separately). Colors are optional (not in OpenFrames): a CurveArtist draws a trajectory with colors in them, blended along each segment between its points' colors (see CurveArtist%set_point_colors). No sorting is done; times are expected to be monotonic, increasing or decreasing. Indices are 1-based.
Differences from OpenFrames: * Storage grows by doubling, positions, attitudes and colors separately, so a trajectory without attitudes (colors) holds no attitude (color) memory. reserve sets it for a known size; compact frees what's unused once a trajectory is complete (one copy of each array; storage_bytes says what is held). * Instead of subscriber callbacks, a trajectory counts its changes (revision) and clears (generation): a reader such as an artist compares them with what it last saw and updates only what changed (e.g. uploads only the points appended since). * No locking: vkframes updates and renders on one thread.
Between points, a trajectory is linear in time: point_at(t) is the point
at any time (the first or last point outside its times), and
point_between(k, k2, t) and time_fraction(k, k2, t) the same between
two points already found (followers, trace mode's tail, intermediate
markers and time handles use them).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | SOURCE_ATTITUDE | = | 3 |
an element of the attitude quaternion |
| integer, | public, | parameter | :: | SOURCE_POSOPT | = | 2 |
an element of the position or of an optional |
| integer, | public, | parameter | :: | SOURCE_TIME | = | 1 |
the time |
| integer, | public, | parameter | :: | SOURCE_ZERO | = | 0 |
where a component of a DataSource comes from (OpenFrames' SourceType) 0 |
| integer, | public, | parameter | :: | TIME_AT_BOUND | = | 0 |
index = 1 or num_times (at the first or last time) |
| integer, | public, | parameter | :: | TIME_NOT_FOUND | = | -2 |
results of Trajectory%time_index (as OpenFrames' getTimeIndex) the search did not converge |
| integer, | public, | parameter | :: | TIME_OUT_OF_RANGE | = | -1 |
index = 0 (before the first time) or num_times + 1 (after the last) |
The DataSource constructor: DataSource(...) makes one (see new_data_source for its
arguments).
A data source (see DataSource); element defaults to 1, opt to 0,
scale to 1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | src |
a SOURCE_* constant |
||
| integer, | intent(in), | optional | :: | element |
element (1 to dof, or 1 to 4 for an attitude; default 1) |
|
| integer, | intent(in), | optional | :: | opt |
(0: the position (default), k: optional k) |
|
| real(kind=wp), | intent(in), | optional | :: | scale |
factor the value is multiplied by (default 1) |
The Trajectory constructor: Trajectory(...) makes one (see new_trajectory for its
arguments).
A trajectory with dof (2 or 3, default 3) degrees of freedom and
nopt (default 0) optional vectors per position.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | optional | :: | dof |
degrees of freedom (2 or 3, default 3) |
|
| integer, | intent(in), | optional | :: | nopt |
optional vectors per position (default 0) |
Where one component (x, y or z) of a point is taken from, as OpenFrames'
Trajectory::DataSource: src is a SOURCE_* constant; for SOURCE_POSOPT,
element (1 to dof) of the position (opt = 0) or of optional opt;
for SOURCE_ATTITUDE, element (1 to 4) of the quaternion. The value is
multiplied by scale.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | element | = | 1 |
element (1 to dof, or 1 to 4 for SOURCE_ATTITUDE) |
|
| integer, | public | :: | opt | = | 0 |
(0: the position, k: optional k (SOURCE_POSOPT)) |
|
| real(kind=wp), | public | :: | scale | = | 1.0_wp |
factor the value is multiplied by |
|
| integer, | public | :: | src | = | SOURCE_ZERO |
where the component comes from: a SOURCE_* constant |
The DataSource constructor: DataSource(...) makes one (see new_data_source for its
arguments).
| private pure function new_data_source (src, element, opt, scale) | A data source (see DataSource); |
A trajectory (see the module documentation).
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=wp), | private, | allocatable | :: | att(:,:) |
(4, capacity): quaternions [x, y, z, w] |
||
| real(kind=c_float), | private, | allocatable | :: | col(:,:) |
(4, capacity): colors [r, g, b, a] (as drawn) |
||
| integer, | private | :: | dof_ | = | 3 |
degrees of freedom of positions and optionals (2 or 3) |
|
| integer, | private | :: | generation_ | = | 0 |
incremented when the data are cleared |
|
| integer, | private | :: | n_att | = | 0 |
number of attitudes (<= n_times) |
|
| integer, | private | :: | n_col | = | 0 |
number of colors (<= n_times) |
|
| integer, | private | :: | n_pos | = | 0 |
number of positions (<= n_times) |
|
| integer, | private | :: | n_times | = | 0 |
number of times |
|
| integer, | private | :: | nopt_ | = | 0 |
optionals per position |
|
| real(kind=wp), | private, | allocatable | :: | posopt(:,:,:) |
(3, 0:nopt, capacity): position, then optionals |
||
| integer, | private | :: | revision_ | = | 0 |
incremented on every change |
|
| real(kind=wp), | private, | allocatable | :: | t(:) |
(capacity): times |
The Trajectory constructor: Trajectory(...) makes one (see new_trajectory for its
arguments).
| private function new_trajectory (dof, nopt) | A trajectory with |
| generic, public :: add => add_point, add_points | |
| procedure, public :: add_attitude | |
| procedure, public :: add_color | |
| procedure, private :: add_point | |
| procedure, private :: add_points | |
| procedure, public :: add_position | |
| procedure, public :: add_time | |
| procedure, public :: attitude | |
| procedure, public :: attitudes | |
| procedure, public :: clear | |
| procedure, public :: color | |
| procedure, public :: colors | |
| procedure, public :: compact | |
| procedure, public :: dof | |
| procedure, public :: generation | |
| procedure, public :: is_empty | |
| procedure, public :: num_attitudes | |
| procedure, public :: num_colors | |
| procedure, public :: num_optionals | |
| procedure, public :: num_points | |
| procedure, public :: num_positions | |
| procedure, public :: num_times | |
| procedure, public :: optional | |
| procedure, public :: point | |
| procedure, public :: point_at | |
| procedure, public :: point_between | |
| procedure, public :: points | |
| procedure, public :: position | |
| procedure, public :: positions | |
| procedure, public :: reserve | |
| procedure, public :: revision | |
| procedure, public :: set_dof | |
| procedure, public :: set_num_optionals | |
| procedure, public :: set_optional | |
| procedure, public :: storage_bytes | |
| procedure, public :: time | |
| procedure, public :: time_distance | |
| procedure, public :: time_fraction | |
| procedure, public :: time_index | |
| procedure, public :: time_range | |
| procedure, public :: times | |
| procedure, public :: verify_data |
Attitude i (quaternion [x, y, z, w]).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
the attitude (1 to num_attitudes) |
Color i ([r, g, b, a]).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
the color (1 to num_colors) |
Degrees of freedom (2 or 3) of positions and optionals.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
Number of times the data were cleared (by clear, set_dof or set_num_optionals): while it is unchanged, data were only appended.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
True if the trajectory has no times.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
The capacity to grow to for needed points: twice the current, or what is
needed and a quarter more (so that appending after a large bulk add
doesn't copy everything at once); exact (reserve): what is needed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | current |
current capacity |
||
| integer, | intent(in) | :: | needed |
points needed |
||
| logical, | intent(in), | optional | :: | exact |
(true: what is needed (default false)) |
A data source (see DataSource); element defaults to 1, opt to 0,
scale to 1.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | src |
a SOURCE_* constant |
||
| integer, | intent(in), | optional | :: | element |
element (1 to dof, or 1 to 4 for an attitude; default 1) |
|
| integer, | intent(in), | optional | :: | opt |
(0: the position (default), k: optional k) |
|
| real(kind=wp), | intent(in), | optional | :: | scale |
factor the value is multiplied by (default 1) |
A trajectory with dof (2 or 3, default 3) degrees of freedom and
nopt (default 0) optional vectors per position.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | optional | :: | dof |
degrees of freedom (2 or 3, default 3) |
|
| integer, | intent(in), | optional | :: | nopt |
optional vectors per position (default 0) |
Number of attitudes (at most num_times).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
Number of colors (at most num_times).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
Number of optional vectors per position.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
Number of points available with these sources: the number of times, limited by the positions or attitudes they use; huge() if all are zero.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| type(DataSource), | intent(in) | :: | sources(3) |
where the components come from |
Number of positions (at most num_times).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
Number of times.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
Optional vector k (1 to num_optionals) of position i.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
the position (1 to num_positions); the optional (1 to num_optionals) |
||
| integer, | intent(in) | :: | k |
the position (1 to num_positions); the optional (1 to num_optionals) |
The sources of optional opt's x, y, (z) (zero beyond dof, default
3), each times scale (default 1): e.g. a thrust vector stored per
point, for set_end_data with relative ends.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | opt |
the optional (1 to num_optionals) |
||
| integer, | intent(in), | optional | :: | dof |
degrees of freedom (default 3) |
|
| real(kind=wp), | intent(in), | optional | :: | scale |
factor (default 1) |
Point i with components from sources (OpenFrames' getPoint). No checks:
use verify_data and num_points first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
the point (1 to num_points(sources)) |
||
| type(DataSource), | intent(in) | :: | sources(3) |
where the components come from |
The point at time t (components from sources; default: the
position's), linear in time between the points about it; outside the
times, the first or last point. ok (optional) false, and v 0, if there
is no point (or the search for the time failed).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the time |
||
| type(DataSource), | intent(in), | optional | :: | sources(3) |
where the components come from (default: the position) |
|
| logical, | intent(out), | optional | :: | ok |
a point was found |
The point at time t between points k and k2 (components from
sources): linear in time, within the two (time_fraction). Point k if
k2 isn't a point (beyond the ends, or more times than data).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | k |
a point (1 to num_points(sources)) |
||
| integer, | intent(in) | :: | k2 |
the other point (e.g. k + 1) |
||
| real(kind=wp), | intent(in) | :: | t |
the time |
||
| type(DataSource), | intent(in) | :: | sources(3) |
where the components come from |
Position i (z = 0 for a 2-DOF trajectory).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
the position (1 to num_positions) |
The sources of a trajectory's positions: x, y, (z) of the position, and
zero for components beyond dof.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | dof |
degrees of freedom (2 or 3) |
Number of changes so far (any added, set or cleared data).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
The memory the trajectory's data take (bytes), used or not: its storage's capacity (see reserve, compact).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self |
Time i.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
the time (1 to num_times) |
The "distance" from time t to the time range [t0, tf]: > 0 outside it (to the nearer end), 0 at its ends, < 0 inside; huge() without times. (OpenFrames' getTimeDistance.)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the time |
The fraction of the way in time from point k to point k2 (any two points: e.g. k + 1, or k - 1 with times running backward) at time t, kept within 0 to 1 (0 if their times are the same). No checks: k and k2 must be times.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | k |
the points (1 to num_times) |
||
| integer, | intent(in) | :: | k2 |
the points (1 to num_times) |
||
| real(kind=wp), | intent(in) | :: | t |
the time |
Find the interval of the time list containing t, by bisection (times
increasing or decreasing). Returns a TIME_ code, or the number of
iterations (> 0) when found, with times(index) <= t < times(index+1) for
increasing times (>= and > for decreasing). See the TIME_ constants for
index in the other cases.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the time |
||
| integer, | intent(out) | :: | index |
the interval's first index (see the TIME_* constants) |
The first and last times, ordered (t0 <= tf); false if there are no times.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out) | :: | t0 |
first and last times (t0 <= tf; 0 if no times) |
||
| real(kind=wp), | intent(out) | :: | tf |
first and last times (t0 <= tf; 0 if no times) |
True if the trajectory has the data the sources refer to (elements and optionals in range).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| type(DataSource), | intent(in) | :: | sources(3) |
where the components come from |
Add an attitude quaternion [x, y, z, w] for the next time that has none.
ok is false if every time already has an attitude.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | q(4) |
quaternion [x, y, z, w] |
||
| logical, | intent(out), | optional | :: | ok |
false if not added |
Add a color ([r, g, b], alpha 1, or [r, g, b, a], 0 to 1) for the next
time that has none. ok is false if every time already has a color.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
||
| logical, | intent(out), | optional | :: | ok |
false if not added |
Add a point: a time with an optional position, attitude and color ([r, g, b] or [r, g, b, a]).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
time |
||
| real(kind=wp), | intent(in), | optional | :: | pos(:) |
position (first dof elements used) |
|
| real(kind=wp), | intent(in), | optional | :: | att(4) |
attitude quaternion [x, y, z, w] |
|
| real(kind=wp), | intent(in), | optional | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |
Add points in bulk: times t(n), with optional positions pos(dof, n),
attitudes att(4, n) and colors color(3 or 4, n). Times, positions,
attitudes and colors must all have been complete before (as many of each
as times) for the given ones to line up with t.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t(:) |
(n): times |
||
| real(kind=wp), | intent(in), | optional | :: | pos(:,:) |
(dof, n): positions |
|
| real(kind=wp), | intent(in), | optional | :: | att(:,:) |
(4, n): attitude quaternions [x, y, z, w] |
|
| real(kind=wp), | intent(in), | optional | :: | color(:,:) |
(3 or 4, n): colors [r, g, b(, a)] (0 to 1) |
Add a position (the first dof elements of pos are used) for the next
time that has none. ok is false if every time already has a position.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | pos(:) |
position (first dof elements used) |
||
| logical, | intent(out), | optional | :: | ok |
false if not added |
Add a time at the end of the time list.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | t |
the time |
Pointer to the attitudes (4, num_attitudes), without copying.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in), | target | :: | self | ||
| real(kind=wp), | intent(out), | dimension(:,:), pointer | :: | q |
(4, num_attitudes): quaternions [x, y, z, w] (null if none) |
Remove all points (keeping the memory).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self |
Pointer to the colors (4, num_colors; single precision, as drawn), without copying.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in), | target | :: | self | ||
| real(kind=c_float), | intent(out), | dimension(:,:), pointer | :: | c |
(4, num_colors): colors [r, g, b, a] (null if none) |
Free the storage not used: each array is reallocated to the points it holds (one copy, an array at a time), and arrays holding none are deallocated. For a trajectory that is complete: growing doubles the storage, so up to about half of it can be unused. The data and what is drawn of them don't change; pointers from times, positions, ... must be fetched again. Points can still be added (storage grows again).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self |
Grow the attitudes' storage to hold at least n.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Trajectory), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | n |
attitudes to hold |
||
| logical, | intent(in), | optional | :: | exact |
(true: exactly n (default false)) |
Grow the colors' storage to hold at least n.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Trajectory), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | n |
colors to hold |
||
| logical, | intent(in), | optional | :: | exact |
(true: exactly n (default false)) |
Grow the positions' (and optionals') storage to hold at least n.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Trajectory), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | n |
positions to hold |
||
| logical, | intent(in), | optional | :: | exact |
(true: exactly n (default false)) |
Grow the times' storage to hold at least n (see new_capacity).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(Trajectory), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | n |
times to hold |
||
| logical, | intent(in), | optional | :: | exact |
(true: exactly n (default false)) |
Points i1, i1 + stride, ... (up to i2) with components from sources, into
v(3, :) (as many columns as points; point for a range, a whole array
slice per component). No checks: use verify_data and num_points first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i1 |
first and last points (1 to num_points(sources)) |
||
| integer, | intent(in) | :: | i2 |
first and last points (1 to num_points(sources)) |
||
| type(DataSource), | intent(in) | :: | sources(3) |
where the components come from |
||
| real(kind=wp), | intent(out) | :: | v(:,:) |
(3, number of points) |
||
| integer, | intent(in), | optional | :: | stride |
step between points (default 1) |
Pointer to the positions (3, num_positions), without copying.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in), | target | :: | self | ||
| real(kind=wp), | intent(out), | dimension(:,:), pointer | :: | p |
(3, num_positions): positions (null if none) |
Reserve memory for n points: times, positions (with their optionals)
unless positions is false, and attitudes and colors only if
attitudes / colors is true. Optional: storage grows as needed, but
reserving avoids reallocations for a known size. It never shrinks the
storage (see compact).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | n |
number of points |
||
| logical, | intent(in), | optional | :: | positions |
reserve positions (default true) |
|
| logical, | intent(in), | optional | :: | attitudes |
reserve attitudes (default false) |
|
| logical, | intent(in), | optional | :: | colors |
reserve colors (default false) |
Set the degrees of freedom (2 or 3) of positions and optionals; clears the trajectory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | dof |
degrees of freedom (2 or 3) |
Set the number of optional vectors per position; clears the trajectory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | nopt |
optional vectors per position (>= 0) |
Set optional vector index (1 to num_optionals) of the most recently
added position. ok is false if there is no position or no such optional.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | index |
the optional (1 to num_optionals) |
||
| real(kind=wp), | intent(in) | :: | v(:) |
the vector (its first dof elements are used) |
||
| logical, | intent(out), | optional | :: | ok |
false if not set |
Pointer to the times (num_times), without copying.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in), | target | :: | self | ||
| real(kind=wp), | intent(out), | dimension(:), pointer | :: | t |
(num_times): times (null if none) |
rgba from [r, g, b] (alpha 1) or [r, g, b, a].
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=c_float), | intent(out) | :: | rgba(4) |
[r, g, b, a] |
||
| real(kind=wp), | intent(in) | :: | color(:) |
[r, g, b] or [r, g, b, a] (0 to 1) |