Modules/Graphics/public/PointerSample.hpp
2026-10-15 16:02:24 +03:00

22 lines
529 B
C++

#pragma once
#include "Vec.hpp"
#include <cstdint>
namespace tp {
enum class PointerTool { Mouse, Pen, Eraser, Brush, Pencil, Airbrush, Finger, Lens };
struct PointerSample {
PointerTool tool = PointerTool::Mouse;
halnf pressure = 1;
Vec2F tilt = { 0, 0 };
halnf rotation = 0;
halnf distance = 0;
uint32_t timeMs = 0;
[[nodiscard]] bool isStylus() const { return tool != PointerTool::Mouse && tool != PointerTool::Finger; }
[[nodiscard]] bool operator==(const PointerSample& other) const = default;
};
}