Exemplo n.º 1
0
        internal void RemoveIndices(RemovedIndices a_RemovedIndices)
        {
            int num  = -1;
            int num2 = 0;

            for (int i = base.m_Vertices.Count - 1; i >= 0; i--)
            {
                bool flag = a_RemovedIndices.IsRemovedIndex(i);
                if (flag)
                {
                    if (num == -1)
                    {
                        num  = i;
                        num2 = 1;
                    }
                    else
                    {
                        num = i;
                        num2++;
                    }
                }
                if ((!flag || (i == 0)) && (num != -1))
                {
                    this.RemoveRange(num, num2);
                    num  = -1;
                    num2 = 0;
                }
            }
            this.ActiveDecalProjector.DecalsMeshUpperVertexIndex = base.m_Vertices.Count - 1;
        }
Exemplo n.º 2
0
 protected GenericDecalsMeshCutter()
 {
     this.m_RelativeVertexLocations = new List <RelativeVertexLocation>();
     this.m_ObsoleteTriangleIndices = new List <int>();
     this.m_CutEdges       = new CutEdges();
     this.m_RemovedIndices = new RemovedIndices();
 }
Exemplo n.º 3
0
 private void AdjustTriangleIndices(int a_LowerTriangleIndex, RemovedIndices a_RemovedIndices)
 {
     for (int i = a_LowerTriangleIndex; i < base.m_Triangles.Count; i++)
     {
         base.m_Triangles[i] = a_RemovedIndices.AdjustedIndex(base.m_Triangles[i]);
     }
     this.ActiveDecalProjector.DecalsMeshUpperTriangleIndex = base.m_Triangles.Count - 1;
 }
Exemplo n.º 4
0
 internal void RemoveAndAdjustIndices(int a_LowerTriangleIndex, RemovedIndices a_RemovedIndices)
 {
     this.AdjustTriangleIndices(a_LowerTriangleIndex, a_RemovedIndices);
     this.RemoveIndices(a_RemovedIndices);
 }