Loading...
Searching...
No Matches
Gfx::pointer_addresses Struct Reference
Detailed Description
The pointer addresses the window devices publish next to cursor/scaled, cursor/gl and cursor/absolute (Window/WindowDevice.hpp, Window/OffscreenDevice.hpp):
cursor/clip: the mouse in clip space, x and y in [-1, 1], y up: themouseof vertexshaderart (greggman/vertexshaderart src/js/main.js recordMouseMove,x * 2 - 1,y * -2 + 1).touch/points: the pointers, a list of 32 [x, y, pressure] in the same space. Slot 0 is the mouse or the first finger, then one slot per finger in the order they came down; a released slot keeps its position, its pressure drops to 0 (main.js addTouchPosition / addTouchPressure / getTouchIndex). Writable: anything that writes it moves the pointers.touch/history: a texture, vertexshaderart'stouch– the last 240 frames of touch/points, 32x240 (score::gfx::TouchHistoryNode).
A shader input named mouse or touch is bound to these by default (ISFProcess.hpp), as any other address, and can be rebound or cabled.
Public Member Functions | |
| void | add_clip (ossia::net::device_base &dev, ossia::net::node_base &cursor) |
| cursor/clip, under an existing cursor node. | |
| void | add_touch (ossia::net::device_base &dev, ossia::net::node_base &root, GfxExecutionAction *context) |
touch/points and touch/history, under root. | |
| void | publish (const score::gfx::PointerState &state) |
| Publish the window's decoded pointers on touch/points. | |
| void | move_slot (int slot, float x, float y) |
| void | set_clip (float x, float y) |
Static Public Member Functions | |
| static ossia::value | to_value (const std::array< score::gfx::PointerState::Slot, score::gfx::PointerState::slots > &s) |
| static void | from_value (score::gfx::PointerState &state, const ossia::value &v) |
Public Attributes | |
| ossia::net::parameter_base * | clip {} |
| ossia::net::parameter_base * | points {} |
| std::shared_ptr< score::gfx::PointerState > | pointers = std::make_shared<score::gfx::PointerState>() |
| What touch/history records; touch/points writes it. | |
Member Function Documentation
◆ move_slot()
|
inline |
Move slot slot of touch/points, keeping its pressure, for outputs that see the mouse but decode no touch events.
The documentation for this struct was generated from the following file: