public void AddProvider(BoundingBoxSelectableProvider provider)
 {
     if (providers.Contains(provider))
     {
         return;
     }
     providers.Add(provider);
 }
示例#2
0
        public static BoundingBoxSelectableProvider Create<T>(IEnumerable<T> items, Func<T, BoundingBox> getBoundingBox, Action<T> onClick) where T : class
        {
            var ret = new BoundingBoxSelectableProvider();
            ret.getBoundingBox = o => getBoundingBox((T)o);
            ret.items = items;
            ret.onClick = o => onClick((T)o);

            return ret;
        }