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

Method onPointerInputEvent

physx/samples/samplebase/PhysXSample.cpp:559–583  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// default implemententions for PhysXSample interface

Source from the content-addressed store, hash-verified

557// default implemententions for PhysXSample interface
558//
559void PhysXSample::onPointerInputEvent(const InputEvent& ie, physx::PxU32 x, physx::PxU32 y, physx::PxReal dx, physx::PxReal dy, bool pressed)
560{
561 switch (ie.m_Id)
562 {
563 case CAMERA_MOUSE_LOOK:
564 {
565 if(mPicking)
566 mPicking->moveCursor(x,y);
567 }
568 break;
569 case PICKUP:
570 {
571 if(mPicking)
572 {
573 mPicked = !mPicked;;
574 if(mPicked)
575 mPicking->lazyPick();
576 else
577 mPicking->letGo();
578 }
579 }
580 break;
581 }
582
583}
584
585void PhysXSample::onResize(PxU32 width, PxU32 height)
586{

Callers

nothing calls this directly

Calls 3

moveCursorMethod · 0.80
lazyPickMethod · 0.80
letGoMethod · 0.80

Tested by

no test coverage detected