Exemplo n.º 1
0
 /// <summary>
 /// Produces an enumerable of classifiers by given extraction.
 /// </summary>
 /// <param name="model">The model</param>
 /// <param name="extractor">The extractor</param>
 /// <returns>Dictionary referencing from ID to classifier</returns>
 public static Dictionary <Component, Qualifier> ClassifyBy(this SceneModel model, ComponentQualifierDelegate extractor)
 {
     return(model.Components.ToDictionary(c => c, c => extractor(c)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Produces a cluster lookup by given classifier extraction
 /// </summary>
 /// <param name="model">The scene</param>
 /// <param name="extractor">The extraction delegate</param>
 /// <returns>A lookup by classifier</returns>
 public static ILookup <Qualifier, Component> ClusterBy(this SceneModel model, ComponentQualifierDelegate extractor)
 {
     return(model.Components.ToLookup(c => extractor(c)));
 }