Ejemplo n.º 1
0
 public override void AddCellId(Kitware.VTK.vtkIdTypeArray ids, ePickBollean boolean)
 {
     Debug.Assert(m_selectedCellsIds != null, "请先初始化m_selectedCellsIds数组");
     Debug.WriteLine(ids.GetNumberOfTuples());
     if (boolean == ePickBollean.Add)
     {
         for (int i = 0; i < ids.GetNumberOfTuples(); i++)
         {
             int  intid    = ids.GetValue(i);
             bool hasPoint = m_selectedCellsIds.ContainsKey(intid);
             if (!hasPoint)
             {
                 m_selectedCellsIds.Add(intid, true);
             }
         }
     }
     else if (boolean == ePickBollean.Sub)
     {
         for (int i = 0; i < ids.GetNumberOfTuples(); i++)
         {
             int  intid    = ids.GetValue(i);
             bool hasPoint = m_selectedCellsIds.ContainsKey(intid);
             if (hasPoint)
             {
                 m_selectedCellsIds.Remove(intid);
             }
         }
     }
 }
Ejemplo n.º 2
0
        public override void AddPointId(int id, ePickBollean boolean)
        {
            Debug.Assert(m_selectedPointsIds != null, "请先初始化m_selectedIds数组");
            bool hasPoint = m_selectedPointsIds.ContainsKey(id);

            if (boolean == ePickBollean.Add && !hasPoint)
            {
                m_selectedPointsIds.Add(id, true);//添加选择的点
            }
            else if (boolean == ePickBollean.Sub && hasPoint)
            {
                m_selectedPointsIds.Remove(id);//删除选择的点
            }
        }
Ejemplo n.º 3
0
        public override void AddCellId(int id, ePickBollean boolean)
        {
            Debug.Assert(m_selectedCellsIds != null, "请先初始化m_selectedCellsIds数组");
            bool hasCell = m_selectedCellsIds.ContainsKey(id);

            if (boolean == ePickBollean.Add && !hasCell)
            {
                m_selectedCellsIds.Add(id, true);//
            }
            else if (boolean == ePickBollean.Sub && hasCell)
            {
                m_selectedCellsIds.Remove(id);//
            }
            Debug.WriteLine(id.ToString());
        }
Ejemplo n.º 4
0
 public abstract void AddCellId(vtkIdTypeArray ids, ePickBollean boolean);
Ejemplo n.º 5
0
 public abstract void AddCellId(int id, ePickBollean boolean);
Ejemplo n.º 6
0
 public abstract void  AddPointId(int id, ePickBollean boolean);
Ejemplo n.º 7
0
 public override void AddCellId(vtkIdTypeArray ids, ePickBollean boolean)
 {
     // throw new NotImplementedException();
 }
Ejemplo n.º 8
0
 public override void AddCellId(int id, ePickBollean boolean)
 {
     //throw new NotImplementedException();
 }