Universe.Physics.BulletSPlugin.BSShapeConvexHull.TryGetConvexHullByPtr C# (CSharp) Method

TryGetConvexHullByPtr() public static method

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