Universe.Physics.BulletSPlugin.BSShapeHull.TryGetHullByPtr C# (CSharp) Method

TryGetHullByPtr() public static method

public static TryGetHullByPtr ( BulletShape pShape, BSShapeHull &outHull ) : bool
pShape BulletShape
outHull BSShapeHull
return bool
        public static bool TryGetHullByPtr(BulletShape pShape, out BSShapeHull outHull)
        {
            bool ret = false;
            BSShapeHull foundDesc = null;
            lock (Hulls)
            {
                foreach (BSShapeHull sh in Hulls.Values)
                {
                    if (sh.physShapeInfo.ReferenceSame(pShape))
                    {
                        foundDesc = sh;
                        ret = true;
                        break;
                    }
                }
            }
            outHull = foundDesc;
            return ret;
        }
    }