Ejemplo n.º 1
0
        // Token: 0x06000224 RID: 548 RVA: 0x00011A6C File Offset: 0x0000FC6C
        public void NormalizeVertexPinList()
        {
            bool flag = this.VertexPinList.Count > 0;

            if (flag)
            {
                this.SortVertexPinList();
                bool[] array = new bool[this.VertexPinList.Count];
                array[0] = false;
                for (int i = 1; i < this.VertexPinList.Count; i++)
                {
                    PmxSoftBody.VertexPin vertexPin  = this.VertexPinList[i - 1];
                    PmxSoftBody.VertexPin vertexPin2 = this.VertexPinList[i];
                    bool flag2 = vertexPin.Vertex == vertexPin2.Vertex;
                    if (flag2)
                    {
                        array[i] = true;
                    }
                }
                Dictionary <int, int> dictionary = new Dictionary <int, int>();
                foreach (PmxSoftBody.BodyAnchor bodyAnchor in this.BodyAnchorList)
                {
                    dictionary.Add(bodyAnchor.Vertex, 0);
                }
                for (int j = 0; j < this.VertexPinList.Count; j++)
                {
                    int  vertex = this.VertexPinList[j].Vertex;
                    bool flag3  = dictionary.ContainsKey(vertex);
                    if (flag3)
                    {
                        array[j] = true;
                    }
                }
                for (int k = array.Length - 1; k > 0; k--)
                {
                    bool flag4 = array[k];
                    if (flag4)
                    {
                        this.VertexPinList.RemoveAt(k);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        // Token: 0x06000223 RID: 547 RVA: 0x000119A8 File Offset: 0x0000FBA8
        public void SortVertexPinList()
        {
            bool flag = this.VertexPinList.Count > 0;

            if (flag)
            {
                List <int> list = new List <int>(this.VertexPinList.Count);
                for (int i = 0; i < this.VertexPinList.Count; i++)
                {
                    list.Add(this.VertexPinList[i].Vertex);
                }
                list.Sort();
                for (int j = 0; j < this.VertexPinList.Count; j++)
                {
                    PmxSoftBody.VertexPin vertexPin = this.VertexPinList[j];
                    vertexPin.Vertex    = list[j];
                    vertexPin.NodeIndex = -1;
                    vertexPin.RefVertex = null;
                }
            }
        }
Ejemplo n.º 3
0
 // Token: 0x060003CA RID: 970 RVA: 0x0001A0B5 File Offset: 0x000182B5
 public VertexPin(PmxSoftBody.VertexPin pin)
 {
     this.Vertex    = pin.Vertex;
     this.NodeIndex = pin.NodeIndex;
 }