MCPcopy Create free account
hub / github.com/Snapchat/Valdi / fillEvent

Function fillEvent

valdi_core/src/valdi_core/cpp/Events/TouchEvents.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void fillEvent(ValueMap& map, Valdi::TouchEventState state, double x, double y, double absoluteX, double absoluteY) {
47 static auto absoluteXKey = STRING_LITERAL("absoluteX");
48 static auto absoluteYKey = STRING_LITERAL("absoluteY");
49 static auto stateKey = STRING_LITERAL("state");
50
51 map.reserve(6);
52 fillEventTime(map);
53 fillPosition(map, x, y);
54 map[absoluteXKey] = Value(absoluteX);
55 map[absoluteYKey] = Value(absoluteY);
56 map[stateKey] = Value(static_cast<int32_t>(state));
57}
58
59void fillPointerData(ValueMap& map, int pointerCount, Valdi::TouchEvents::PointerLocations& pointerLocations) {
60 static auto pointerCountKey = STRING_LITERAL("pointerCount");

Callers 4

makeDragEventMethod · 0.85
makePinchEventMethod · 0.85
makeRotationEventMethod · 0.85
makeTapEventMethod · 0.85

Calls 4

fillEventTimeFunction · 0.85
fillPositionFunction · 0.85
ValueClass · 0.50
reserveMethod · 0.45

Tested by

no test coverage detected