// update all the localIDs specified
        // If the local ID is APPLY_TO_NONE, just change the default value
        // If the localID is APPLY_TO_ALL change the default value and apply the new value to all the lIDs
        // If the localID is a specific object, apply the parameter change to only that object
        private void UpdateParameterSet(List <uint> lIDs, ref float defaultLoc, string parm, uint localID, float val)
        {
            switch (localID)
            {
            case PhysParameterEntry.APPLY_TO_NONE:
                defaultLoc = val;   // setting only the default value
                break;

            case PhysParameterEntry.APPLY_TO_ALL:
                defaultLoc = val;  // setting ALL also sets the default value
                List <uint> objectIDs = lIDs;
                string      xparm     = parm.ToLower();
                float       xval      = val;
                TaintedObject(delegate() {
                    foreach (uint lID in objectIDs)
                    {
                        BulletSimAPI.UpdateParameter(m_worldID, lID, xparm, xval);
                    }
                });
                break;

            default:
                // setting only one localID
                TaintedUpdateParameter(parm, localID, val);
                break;
            }
        }
        // schedule the actual updating of the paramter to when the phys engine is not busy
        private void TaintedUpdateParameter(string parm, uint localID, float val)
        {
            uint   xlocalID = localID;
            string xparm    = parm.ToLower();
            float  xval     = val;

            TaintedObject(delegate() {
                BulletSimAPI.UpdateParameter(m_worldID, xlocalID, xparm, xval);
            });
        }