R/processing_movement_functions.R
reorient_movement.RdApplies rotation given by R followed by a translation given by offset in
rotated coordinates, to a position coordinate tibble.
A movement data frame or positional list with position coordinates in the form _x,
_y, _z (uppercase or lowercase)
A 3 x 3 rotation matrix (default: no rotation)
A 3-element translation vector rotated coordinates (default: no translation), it can be a positional list too
A scenario object (optional; default: do not use scenario coordinates)
Either "apply" or "undo"
The same movement tibble with all position columns reoriented in a
list, to be used by mutate across rows of a trial_results tibble
This function can also apply or undo the scenario position/rotation given by unity.
In Unity, tracker information is stored in GLOBAL coordinates, not in LOCAL
scene coordinates. If scenarios were globally translated/rotated, the same physical tracker position
would have different global coordinates across trials, or in other words, the tracker data are in
different coordinate systems across trials. For "apply", the scenario transformation is applied last, after
the user-supplied affine transformation is applied. For "undo", the scenario transformation is undone first,
before the user-supplied affine transformation is applied