7#include <PhosphorPointer/phosphorpointer_export.h>
72 std::array<QVector4D, PointerShaderContract::kMaxTrailPoints>
trail{};
89 [[nodiscard]]
const QVector4D&
trailAt(
int index)
const
91 return trail[
static_cast<size_t>(index)];
constexpr double kNeverSeconds
The "none this session" sentinel for the seconds-since lanes of uPointerPress.z, uPointerRelease....
Definition PointerShaderContract.h:214
Definition PointerFrameState.h:16
Plain-data snapshot of everything the pointer contract's tail carries for one frame.
Definition PointerFrameState.h:27
QRectF cursorRect
Cursor sprite rect in canvas px, hotspot applied. Null when unknown.
Definition PointerFrameState.h:61
double filteredSpeed
Pointer speed with the per-sample jitter filtered out, in device px/s: an exponential filter walked o...
Definition PointerFrameState.h:38
int trailSize() const
Definition PointerFrameState.h:79
double scale
Logical-to-device scale of the canvas.
Definition PointerFrameState.h:58
double releaseSecondsSince
Definition PointerFrameState.h:48
int buttons
Pressed-button bitmask (1 left, 2 right, 4 middle).
Definition PointerFrameState.h:52
bool hasSprite
Whether uCursorSprite is bound this frame.
Definition PointerFrameState.h:64
int pressButton
Definition PointerFrameState.h:44
std::array< QVector4D, PointerShaderContract::kMaxTrailPoints > trail
Trail samples, newest first: .xy canvas px, .z age seconds, .w speed at the sample (device px/s).
Definition PointerFrameState.h:72
double idleSeconds
Seconds since the last motion (kNeverSeconds when none).
Definition PointerFrameState.h:55
int releaseButton
Definition PointerFrameState.h:49
int trailCount
Definition PointerFrameState.h:73
const QVector4D & trailAt(int index) const
Definition PointerFrameState.h:89
QVector2D velocity
Pointer velocity in device px/s.
Definition PointerFrameState.h:29
const QVector4D & newestTrail() const
The newest sample, which is the pointer itself.
Definition PointerFrameState.h:85
QPointF pressPos
Last press: position, seconds since (kNeverSeconds when none), button code (1 left,...
Definition PointerFrameState.h:42
QPointF releasePos
Last release, same shape.
Definition PointerFrameState.h:47
double pressSecondsSince
Definition PointerFrameState.h:43
bool trailIsEmpty() const
Definition PointerFrameState.h:75