示例#1
0
    public static void Free(SurfExtractReqMC req)
    {
        int n = req._outDatas.Count;

        if (n > 0)
        {
            // If mesh data not been filled
            for (int i = 0; i < n; i++)
            {
                MCOutputData.Free(req._outDatas [i]);
            }
            req._outDatas.Clear();
        }
        s_reqPool.Free(req);
    }
示例#2
0
    public int  FillMesh(Mesh mesh)
    {
        int n = _outDatas.Count;

        if (mesh == null)
        {
            return(n);
        }

        --n;
        //mesh.name       = "ocl_mesh";
        mesh.triangles = null;

        _outDatas [n].SetToMesh(mesh);
        //mesh.SetIndices(splitMeshesData[n].indice,MeshTopology.Points,0); // point sprites
        //mesh.Optimize(); --- this will down 7~8fps
        MCOutputData.Free(_outDatas[n]);
        _outDatas.RemoveAt(n);
        return(n);
    }