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); } } } }
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);//删除选择的点 } }
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()); }
public abstract void AddCellId(vtkIdTypeArray ids, ePickBollean boolean);
public abstract void AddCellId(int id, ePickBollean boolean);
public abstract void AddPointId(int id, ePickBollean boolean);
public override void AddCellId(vtkIdTypeArray ids, ePickBollean boolean) { // throw new NotImplementedException(); }
public override void AddCellId(int id, ePickBollean boolean) { //throw new NotImplementedException(); }