MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / queueCallback

Method queueCallback

Engine/source/T3D/physics/physicsObject.cpp:41–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void PhysicsObject::queueCallback( U32 ms, Delegate<void()> callback )
42{
43 // Cancel any existing event we may have pending.
44 if ( mQueuedEvent != InvalidEventId )
45 Sim::cancelEvent( mQueuedEvent );
46
47 // Fire off a new event.
48 SimDelegateEvent *event_ = new SimDelegateEvent();
49 event_->mCallback = callback;
50 event_->mEventId = &mQueuedEvent;
51 mQueuedEvent = Sim::postEvent( Sim::getRootGroup(), event_, Sim::getCurrentTime() + ms );
52}

Callers 2

updateGridMethod · 0.80
onScaleChangedMethod · 0.80

Calls 4

cancelEventFunction · 0.85
getRootGroupFunction · 0.85
postEventFunction · 0.50
getCurrentTimeFunction · 0.50

Tested by

no test coverage detected