private void AddEntity(MEntityPair entityPair) { MEntity entity = entityPair.entity; MObject obj = entityPair.obj; if (entityPair.entity.entityStatus != MEntity.MEntityStatus.SPECIAL) { entityPair.entity.entityStatus = MEntity.MEntityStatus.SELECT; } switch (entity.entityType) { case MEntity.MEntityType.EDGE: selectLengthCount[sceneManager.objects.IndexOf(obj)] += obj.GetEdgeLength((MEdge)entity); break; case MEntity.MEntityType.FACE: selectSurfaceCount[sceneManager.objects.IndexOf(obj)] += obj.GetFaceSurface((MFace)entity); break; } selectedEntity.Add(entityPair); }