Universe.Physics.BulletSPlugin.BSShapeMesh.TryGetMeshByPtr C# (CSharp) Method

TryGetMeshByPtr() public static method

public static TryGetMeshByPtr ( BulletShape pShape, BSShapeMesh &outMesh ) : bool
pShape BulletShape
outMesh BSShapeMesh
return bool
        public static bool TryGetMeshByPtr(BulletShape pShape, out BSShapeMesh outMesh)
        {
            bool ret = false;
            BSShapeMesh foundDesc = null;
            lock (Meshes)
            {
                foreach (BSShapeMesh sm in Meshes.Values)
                {
                    if (sm.physShapeInfo.ReferenceSame(pShape))
                    {
                        foundDesc = sm;
                        ret = true;
                        break;
                    }
                }
            }
            outMesh = foundDesc;
            return ret;
        }