static public IEnumerable <Vector3> GetTriangleIntersection(this Bounds item, Triangle3 triangle) { if (triangle.IsDegenerate() == false) { Plane plane = triangle.GetPlane(); if (plane.normal != Vector3.zero) { if (item.FullyContains(triangle)) { return(triangle.GetPoints()); } PlaneSpace plane_space = plane.GetPlaneSpace(); ConvexPolygon plane_polygon = new ConvexPolygon( plane_space.ProjectPoints(item.GetPlaneIntersection(plane)) ); ConvexPolygon triangle_polygon = new ConvexPolygon( plane_space.ProjectPoints(triangle.GetPoints()) ); return(plane_space.InflatePoints( plane_polygon.GetIntersection(triangle_polygon).GetVertexs() ).Narrow(p => item.Contains(p))); } } return(Empty.IEnumerable <Vector3>()); }
static public IEnumerable <ScriptableObject> GetAllSofabs(Type type) { if (type.CanBeTreatedAs <ScriptableObject>()) { return(GetAllAssetInfos(type).Convert(i => i.Resolve <ScriptableObject>())); } return(Empty.IEnumerable <ScriptableObject>()); }
static public IEnumerable <string> GetExternalCustomAssetPathsOfType(Type type) { if (type.CanBeTreatedAs <CustomAsset>()) { return(AssetDatabase.FindAssets("t:" + type.Name) .Convert(g => AssetDatabase.GUIDToAssetPath(g)) .Skip(p => p.StartsWith(Project.GetInternalAssetDirectory()))); } return(Empty.IEnumerable <string>()); }
public override IEnumerable <Type> GetOptions() { Type type; if (type_property.TryGetContentValues(out type)) { return(type.GetTypeAndAllBaseTypes()); } return(Empty.IEnumerable <Type>()); }
public override IEnumerable <Type> GetOptions() { GameObject game_object; if (game_object_property.TryGetContentValues(out game_object)) { return(game_object.GetAllComponents().Convert(c => c.GetType()).Unique()); } return(Empty.IEnumerable <Type>()); }
public override IEnumerable <MethodInfo> GetOptions(string text) { Type type; if (type_property.TryGetContentValues <Type>(out type)) { return(type.GetFilteredInstanceMethods( Filterer_MethodInfo.DoesNameContain(text) ).Convert <MethodInfoEX, MethodInfo>()); } return(Empty.IEnumerable <MethodInfo>()); }
public IEnumerable <T> GetItemsWithin(Predicate <Rect> predicate) { if (predicate.DoesDescribe(rect)) { if (is_subdivided) { return(child_rects.Convert(c => c.GetItemsWithin(predicate)).Flatten()); } return(child_items.Narrow(c => predicate.DoesDescribe(get_rect_operation(c)))); } return(Empty.IEnumerable <T>()); }
public Filterer_ConstructorInfo_CanEffectiveParametersHold() : this(Empty.IEnumerable <Type>()) { }
protected virtual IEnumerable <Attribute> GetAllCustomAttributesInternal(bool inherit) { return(Empty.IEnumerable <Attribute>()); }
public MethodReference() : this(null, "", Empty.IEnumerable <Type>()) { }
public virtual IEnumerable <Filterer <Assembly> > GetAssemblyFilters() { return(Empty.IEnumerable <Filterer <Assembly> >()); }
public virtual IEnumerable <Type> GetTypes() { return(Empty.IEnumerable <Type>()); }
public IEnumerable <GamepadEvent <T> > GetPastEvents(int count) { return(Empty.IEnumerable <GamepadEvent <T> >()); }
public Filterer_MethodInfo_CanTechnicalParametersHold() : this(Empty.IEnumerable <Type>()) { }
static public IEnumerable <DropHandler> GetDropHandlers(this UIElement item) { return(DROP_HANDLER_LIST_FIELD.GetValue(item) ?? Empty.IEnumerable <DropHandler>()); }
public CmlTargetInfo(object t, RepresentationEngine e) : this(t, t, Empty.IEnumerable <object>(), e) { }
public Filterer_MethodInfo_CanEffectiveParametersHold() : this(Empty.IEnumerable <Type>()) { }
public ILValue CompileInstanceSystemObject(TyonCompiler compiler) { return(CompileInstanceSystemObject(compiler, Empty.IEnumerable <ILValue>())); }