Exemple #1
0
        protected override void OnPopulateMesh(Mesh m)
        {
            if (mMesh == null)
            {
                mMesh = new WorldSpaceChartMesh(1);
            }
            else
            {
                mMesh.Clear();
            }
            int vPos = 0;

            mMinModifyIndex = 0; // not supported here
            foreach (UIVertex v in getVerices())
            {
                mTmpVerts[vPos++] = v;
                if (vPos == 4)
                {
                    vPos = 0;
                    mMesh.AddQuad(mTmpVerts[0], mTmpVerts[1], mTmpVerts[2], mTmpVerts[3]);
                }
            }

            mMesh.ApplyToMesh(m);
        }
#pragma warning disable 0672

        protected override void OnPopulateMesh(Mesh m)
        {
            WorldSpaceChartMesh mesh = new WorldSpaceChartMesh(1);
            int vPos = 0;

            foreach (UIVertex v in getVerices())
            {
                mTmpVerts[vPos++] = v;
                if (vPos == 4)
                {
                    vPos = 0;

                    mesh.AddQuad(mTmpVerts[0], mTmpVerts[1], mTmpVerts[2], mTmpVerts[3]);
                }
            }
            mesh.ApplyToMesh(m);
        }