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); } } } }