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

Method onAnalogInputEvent

physx/samples/samplebase/InputEventBuffer.cpp:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void InputEventBuffer::onAnalogInputEvent(const SampleFramework::InputEvent& e, float val)
70{
71 checkResetLastInput();
72 if(mLastAnalogInput && mLastAnalogInput->isEqual(e, val))
73 return;
74 if(mRingBuffer.isFull() || (mRingBuffer.size() > MAX_ANALOG_EVENTS))
75 return;
76 AnalogInput& event = mRingBuffer.front().get<AnalogInput>();
77 PX_PLACEMENT_NEW(&event, AnalogInput);
78 event.e = e;
79 event.val = val;
80 mLastAnalogInput = &event;
81 mRingBuffer.incFront(1);
82}
83
84void InputEventBuffer::onDigitalInputEvent(const SampleFramework::InputEvent& e, bool val)
85{

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