// Sometimes a potentially tainted operation can be used in and out of taint time. // This routine executes the command immediately if in taint-time otherwise it is queued. public void TaintedObject(bool inTaintTime, string ident, TaintCallback callback) { if (inTaintTime) { callback(); } else { TaintedObject(ident, callback); } }
// Schedule an update to happen after all the regular taints are processed. // Note that new requests for the same operation ("ident") for the same object ("ID") // will replace any previous operation by the same object. public void PostTaintObject(String ident, uint ID, TaintCallback callback) { string uniqueIdent = ident + "-" + ID.ToString(); lock (_taintLock) { _postTaintOperations[uniqueIdent] = new TaintCallbackEntry(uniqueIdent, callback); } return; }
// The simulation execution order is: // Simulate() // DoOneTimeTaints // TriggerPreStepEvent // DoOneTimeTaints // Step() // ProcessAndSendToSimulatorCollisions // ProcessAndSendToSimulatorPropertyUpdates // TriggerPostStepEvent // Calls to the PhysicsActors can't directly call into the physics engine // because it might be busy. We delay changes to a known time. // We rely on C#'s closure to save and restore the context for the delegate. public void TaintedObject(String ident, TaintCallback callback) { if (!m_initialized) { return; } lock (_taintLock) { _taintOperations.Add(new TaintCallbackEntry(ident, callback)); } return; }
public TaintCallbackEntry(string pOrigin, string pIdent, TaintCallback pCallBack) { originator = pOrigin; ident = pIdent; callback = pCallBack; }
// The simulation execution order is: // Simulate() // DoOneTimeTaints // TriggerPreStepEvent // DoOneTimeTaints // Step() // ProcessAndSendToSimulatorCollisions // ProcessAndSendToSimulatorPropertyUpdates // TriggerPostStepEvent // Calls to the PhysicsActors can't directly call into the physics engine // because it might be busy. We delay changes to a known time. // We rely on C#'s closure to save and restore the context for the delegate. public void TaintedObject(string pOriginator, string pIdent, TaintCallback pCallback) { TaintedObject(false /*inTaintTime*/, pOriginator, pIdent, pCallback); }
// Sometimes a potentially tainted operation can be used in and out of taint time. // This routine executes the command immediately if in taint-time otherwise it is queued. public void TaintedObject(bool inTaintTime, string ident, TaintCallback callback) { if (inTaintTime) callback(); else TaintedObject(ident, callback); }
public TaintCallbackEntry(string pIdent, TaintCallback pCallBack) { originator = BSScene.DetailLogZero; ident = pIdent; callback = pCallBack; }
public TaintCallbackEntry(string i, TaintCallback c) { ident = i; callback = c; }
// The simulation execution order is: // Simulate() // DoOneTimeTaints // TriggerPreStepEvent // DoOneTimeTaints // Step() // ProcessAndSendToSimulatorCollisions // ProcessAndSendToSimulatorPropertyUpdates // TriggerPostStepEvent // Calls to the PhysicsActors can't directly call into the physics engine // because it might be busy. We delay changes to a known time. // We rely on C#'s closure to save and restore the context for the delegate. public void TaintedObject(String ident, TaintCallback callback) { if (!m_initialized) return; lock (_taintLock) { _taintOperations.Add(new TaintCallbackEntry(ident, callback)); } return; }
// Sometimes a potentially tainted operation can be used in and out of taint time. // This routine executes the command immediately if in taint-time otherwise it is queued. public void TaintedObject(bool inTaintTime, string pOriginator, string pIdent, TaintCallback pCallback) { if (!m_initialized) return; if (inTaintTime) pCallback(); else { lock (_taintLock) { _taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback)); } } }
public void TaintedObject(bool inTaintTime, String pIdent, TaintCallback pCallback) { TaintedObject(inTaintTime, BSScene.DetailLogZero, pIdent, pCallback); }
// The calls to the PhysicsActors can't directly call into the physics engine // because it might be busy. We we delay changes to a known time. // We rely on C#'s closure to save and restore the context for the delegate. public void TaintedObject(TaintCallback callback) { lock (_taintLock) _taintedObjects.Add(callback); return; }
// Sometimes a potentially tainted operation can be used in and out of taint time. // This routine executes the command immediately if in taint-time otherwise it is queued. public void TaintedObject(bool inTaintTime, string pOriginator, string pIdent, TaintCallback pCallback) { if (!m_initialized) { return; } if (inTaintTime) { pCallback(); } else { lock (_taintLock) { _taintOperations.Add(new TaintCallbackEntry(pOriginator, pIdent, pCallback)); } } }
public void TaintedObject(bool inTaintTime, uint pOriginator, String pIdent, TaintCallback pCallback) { TaintedObject(inTaintTime, m_physicsLoggingEnabled ? pOriginator.ToString() : BSScene.DetailLogZero, pIdent, pCallback); }
// Schedule an update to happen after all the regular taints are processed. // Note that new requests for the same operation ("ident") for the same object ("ID") // will replace any previous operation by the same object. public void PostTaintObject(String ident, uint ID, TaintCallback callback) { string IDAsString = ID.ToString(); string uniqueIdent = ident + "-" + IDAsString; lock (_taintLock) { _postTaintOperations[uniqueIdent] = new TaintCallbackEntry(IDAsString, uniqueIdent, callback); } return; }