MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / onPointerInputEvent

Method onPointerInputEvent

physx/samples/samplebase/InputEventBuffer.cpp:99–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void InputEventBuffer::onPointerInputEvent(const SampleFramework::InputEvent& e, PxU32 x, PxU32 y, PxReal dx, PxReal dy, bool val)
100{
101 checkResetLastInput();
102 if(mLastPointerInput && mLastPointerInput->isEqual(e, x, y, dx, dy, val))
103 return;
104 if(mRingBuffer.isFull() || (mRingBuffer.size() > MAX_MOUSE_EVENTS))
105 return;
106 PointerInput& event = mRingBuffer.front().get<PointerInput>();
107 PX_PLACEMENT_NEW(&event, PointerInput);
108 event.e = e;
109 event.x = x;
110 event.y = y;
111 event.dx = dx;
112 event.dy = dy;
113 event.val = val;
114 mLastPointerInput = &event;
115 mRingBuffer.incFront(1);
116}
117
118void InputEventBuffer::clear()
119{

Callers 1

reportMethod · 0.45

Calls 5

incFrontMethod · 0.80
isEqualMethod · 0.45
isFullMethod · 0.45
sizeMethod · 0.45
frontMethod · 0.45

Tested by

no test coverage detected