Ejemplo n.º 1
0
 // 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);
     }
 }
Ejemplo n.º 2
0
        // 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;
        }
Ejemplo n.º 3
0
        // 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;
        }
Ejemplo n.º 4
0
 public TaintCallbackEntry(string pOrigin, string pIdent, TaintCallback pCallBack)
 {
     originator = pOrigin;
     ident = pIdent;
     callback = pCallBack;
 }
Ejemplo n.º 5
0
    // 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);
    }
Ejemplo n.º 6
0
 // 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);
 }
Ejemplo n.º 7
0
 public TaintCallbackEntry(string pIdent, TaintCallback pCallBack)
 {
     originator = BSScene.DetailLogZero;
     ident = pIdent;
     callback = pCallBack;
 }
Ejemplo n.º 8
0
 public TaintCallbackEntry(string i, TaintCallback c)
 {
     ident = i;
     callback = c;
 }
Ejemplo n.º 9
0
    // 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;
    }
Ejemplo n.º 10
0
    // 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));
            }
        }
    }
Ejemplo n.º 11
0
 public TaintCallbackEntry(string pOrigin, string pIdent, TaintCallback pCallBack)
 {
     originator = pOrigin;
     ident      = pIdent;
     callback   = pCallBack;
 }
Ejemplo n.º 12
0
        // 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);
        }
Ejemplo n.º 13
0
 public void TaintedObject(bool inTaintTime, String pIdent, TaintCallback pCallback)
 {
     TaintedObject(inTaintTime, BSScene.DetailLogZero, pIdent, pCallback);
 }
Ejemplo n.º 14
0
 // 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;
 }
Ejemplo n.º 15
0
 // 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;
 }
Ejemplo n.º 16
0
        // 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));
                }
            }
        }
Ejemplo n.º 17
0
 public void TaintedObject(bool inTaintTime, uint pOriginator, String pIdent, TaintCallback pCallback)
 {
     TaintedObject(inTaintTime, m_physicsLoggingEnabled ? pOriginator.ToString() : BSScene.DetailLogZero, pIdent, pCallback);
 }
Ejemplo n.º 18
0
 public void TaintedObject(bool inTaintTime, String pIdent, TaintCallback pCallback)
 {
     TaintedObject(inTaintTime, BSScene.DetailLogZero, pIdent, pCallback);
 }
Ejemplo n.º 19
0
 public void TaintedObject(bool inTaintTime, uint pOriginator, String pIdent, TaintCallback pCallback)
 {
     TaintedObject(inTaintTime, m_physicsLoggingEnabled ? pOriginator.ToString() : BSScene.DetailLogZero, pIdent, pCallback);
 }
Ejemplo n.º 20
0
 public TaintCallbackEntry(string i, TaintCallback c)
 {
     ident    = i;
     callback = c;
 }
Ejemplo n.º 21
0
    // 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;
    }
Ejemplo n.º 22
0
 public TaintCallbackEntry(string pIdent, TaintCallback pCallBack)
 {
     originator = BSScene.DetailLogZero;
     ident      = pIdent;
     callback   = pCallBack;
 }