Esempio n. 1
0
            private VFLst m_vfLst;       //the list of virtual face containing this vvert

            #endregion "data"

            #region "public method"
            // public method

            public VVert(int rvidx)
            {
                m_rvLst       = new RVLst();
                m_veLst       = new VELst();
                m_activeVELst = new VELst();
                m_vfLst       = new VFLst();

                AddRVert(rvidx); //make sure we VVert is not empty
            }
        public void DelVert(int vidx)
        {
            RVLst vlst = m_Verts.Data;

            RVLst newLst = new RVLst(vlst);

            newLst.Remove(vidx);

            m_Verts.SetData(newLst, true, "Remove Selection Verts");
            Dirty = true;
        }
 // fill the `lst' using the currently selected elements
 public void GetSelectionInVLst(RVLst lst)
 {
     switch (m_PrimType)
     {
     case MeshTopology.Points:
     {
         lst.Clear();
         lst.AddRange(m_Verts.Data);
     }
     break;
     }
 }
        public void AddVert(int[] vindices)
        {
            RVLst vlst = m_Verts.Data;

            RVLst newLst = new RVLst(vlst);

            newLst.AddRange(vindices);
            newLst.Sort();
            newLst = newLst.Distinct().ToList();
            m_Verts.SetData(newLst, true, "Add Selection Verts");

            Dirty = true; //SetDirty
        }
        // "edge"

        #endregion "edge"

        #region "tri"
        // "tri"

        #endregion "tri"

        public void Clear()
        {
            if (m_Verts.Data.Count > 0)
            {
                RVLst emptyLst = new RVLst();
                m_Verts.SetData(emptyLst, true, "Clear selection");
                Dirty = true;//SetDirty
            }
            else if (m_Edges.Data.Count > 0)
            {
                VELst emptyLst = new VELst();
                m_Edges.SetData(emptyLst, true, "Clear selection");
                Dirty = true;//SetDirty
            }
            else if (m_Tris.Data.Count > 0)
            {
                VFLst emptyLst = new VFLst();
                m_Tris.SetData(emptyLst, true, "Clear selection");
                Dirty = true;//SetDirty
            }
        }
        public void DelVVert(VVert vvert)
        {
            RVLst vLst = vvert.GetRVerts();

            DelVert(vLst.ToArray());
        }
        public void AddVVert(VVert vvert)
        {
            RVLst vLst = vvert.GetRVerts();

            AddVert(vLst.ToArray());
        }