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

Method onDigitalInputEvent

physx/samples/samplebase/InputEventBuffer.cpp:84–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void InputEventBuffer::onDigitalInputEvent(const SampleFramework::InputEvent& e, bool val)
85{
86 checkResetLastInput();
87 if(mLastDigitalInput && mLastDigitalInput->isEqual(e, val))
88 return;
89 if(mRingBuffer.isFull())
90 return;
91 DigitalInput& event = mRingBuffer.front().get<DigitalInput>();
92 PX_PLACEMENT_NEW(&event, DigitalInput);
93 event.e = e;
94 event.val = val;
95 mLastDigitalInput = &event;
96 mRingBuffer.incFront(1);
97}
98
99void InputEventBuffer::onPointerInputEvent(const SampleFramework::InputEvent& e, PxU32 x, PxU32 y, PxReal dx, PxReal dy, bool val)
100{

Callers 1

reportMethod · 0.45

Calls 4

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

Tested by

no test coverage detected