Runtime/SpatialHash.cs
/// <summary>
/// Remove method used for move or scale an item;
/// </summary>
/// <param name="itemID"></param>
Remove method used for move or scale an item.
Remove method used for move or scale an item .
public void RemoveFast(int itemID)
        {
#if ENABLE_UNITY_COLLECTIONS_CHECKS
            AtomicSafetyHandle.CheckWriteAndThrow(_safety);
#endif
            var success = _itemIDToBounds.TryGetValue(itemID, out var bounds);
            Assert.IsTrue(success);
            CalculStartEndIterationInternal(_data, bounds, out var start, out var end);
            var hashPosition = new int3(0F);
            for (int x = start.x; x < end.x; ++x)
            {
                hashPosition.x = x;
                for (int y = start.y; y < end.y; ++y)
                {
                    hashPosition.y = y;
                    for (int z = start.z; z < end.z; ++z)
                    {
                        hashPosition.z = z;
                        RemoveInternal(hashPosition, itemID);
                    }
                }
            }
        }
public void RemoveFast ( int itemID ) { if ENABLE_UNITY_COLLECTIONS_CHECKS AtomicSafetyHandle . CheckWriteAndThrow ( _safety ) ; endif var success = _itemIDToBounds . TryGetValue ( itemID , out var bounds ) ; Assert . IsTrue ( success ) ; CalculStartEndIterationInternal ( _data , bounds , out var start , out var end ) ; var hashPosition = new int3 ( 0F ) ; for ( int x = start . x ; x < end . x ; ++ x ) { hashPosition . x = x ; for ( int y = start . y ; y < end . y ; ++ y ) { hashPosition . y = y ; for ( int z = start . z ; z < end . z ; ++ z ) { hashPosition . z = z ; RemoveInternal ( hashPosition , itemID ) ; } } } }
Remove method used for move or scale an item;
Remove method used for move or scale an item ;
itemID
int
None