extractMobjectFamilyMembers method

List<Mobject> extractMobjectFamilyMembers(
  1. List<Mobject> mobjects, {
  2. bool onlyThoseWithPoints = false,
})

Implementation

List<Mobject> extractMobjectFamilyMembers(List<Mobject> mobjects,
    {bool onlyThoseWithPoints = false}) {
  var method = onlyThoseWithPoints
      ? (Mobject m) => m.getFamilyWithPoints()
      : (Mobject m) => m.getFamily();

  return withoutRedundancies([
    for (var mob in mobjects) ...method(mob),
  ]);
}