diff --git a/BlazeSudio/collisions/generated/collisions.cpython-312-x86_64-linux-gnu.so b/BlazeSudio/collisions/generated/collisions.cpython-312-x86_64-linux-gnu.so index 0b22dbb0..fb75cbbf 100755 Binary files a/BlazeSudio/collisions/generated/collisions.cpython-312-x86_64-linux-gnu.so and b/BlazeSudio/collisions/generated/collisions.cpython-312-x86_64-linux-gnu.so differ diff --git a/BlazeSudio/collisions/generated/collisions.pyi b/BlazeSudio/collisions/generated/collisions.pyi index 568d04e3..36e20515 100644 --- a/BlazeSudio/collisions/generated/collisions.pyi +++ b/BlazeSudio/collisions/generated/collisions.pyi @@ -3,7 +3,7 @@ from _typeshed import Incomplete from enum import Enum from typing import Any, Dict, Iterable, Type -__all__ = ['rotate', 'rotateBy0', 'direction', 'pointOnUnitCircle', 'shapelyToColl', 'collToShapely', 'drawShape', 'ShpGroups', 'checkShpType', 'ClosedShape', 'Shape', 'NoShape', 'Shapes', 'Point', 'Line', 'Circle', 'Arc', 'Rect', 'RotatedRect', 'Polygon', 'ShapeCombiner'] +__all__ = ['rotate', 'rotateBy0', 'direction', 'pointOnCircle', 'shapelyToColl', 'collToShapely', 'drawShape', 'ShpGroups', 'checkShpType', 'ClosedShape', 'Shape', 'NoShape', 'Shapes', 'Point', 'Line', 'Circle', 'Arc', 'Rect', 'RotatedRect', 'Polygon', 'ShapeCombiner'] Number = int | float verboseOutput = Iterable[Any] | None @@ -45,7 +45,7 @@ def direction(fromPoint: pointLike, toPoint: pointLike) -> Number: Returns: Number: The direction in radians OF `toPoint` FROM `fromPoint` """ -def pointOnUnitCircle(angle: Number, strength: Number = 1) -> pointLike: +def pointOnCircle(angle: Number, strength: Number = 1) -> pointLike: """ Finds the point on the unit circle at a given angle with a given strength @@ -1056,7 +1056,7 @@ Instead you just run things like `ShapeCombiner.combineRects(rect1, rect2, rect3 Shapes: A Shapes object with the rectangles from the input shapes combined """ @staticmethod - def Union(*shapes: Shape) -> Shapes: + def union(*shapes: Shape) -> Shapes: """ Combine all the input shapes with a unary union. Still in progress and doesn't work too well. @@ -1097,7 +1097,7 @@ Instead you just run things like `ShapeCombiner.combineRects(rect1, rect2, rect3 Shape | Shapes: A Shapes object containing one polygon with the points from the input. """ @staticmethod - def ShapelyUnion(*shapes: Shape) -> Shape: + def shapelyUnion(*shapes: Shape) -> Shape: """ Combine all the input shapes with shapely to be a union. If the shapes are not all touching, they will *still* be combined into one shape. diff --git a/BlazeSudio/collisions/lib/collisions.c b/BlazeSudio/collisions/lib/collisions.c index 5bdc6083..bb312734 100644 --- a/BlazeSudio/collisions/lib/collisions.c +++ b/BlazeSudio/collisions/lib/collisions.c @@ -1522,7 +1522,7 @@ struct __pyx_obj_10collisions___pyx_scope_struct_26_genexpr; struct __pyx_obj_10collisions___pyx_scope_struct_27_genexpr; struct __pyx_obj_10collisions___pyx_scope_struct_28_genexpr; struct __pyx_obj_10collisions___pyx_scope_struct_29_genexpr; -struct __pyx_obj_10collisions___pyx_scope_struct_30_Union; +struct __pyx_obj_10collisions___pyx_scope_struct_30_union; struct __pyx_obj_10collisions___pyx_scope_struct_31_genexpr; struct __pyx_defaults; typedef struct __pyx_defaults __pyx_defaults; @@ -2068,10 +2068,10 @@ struct __pyx_obj_10collisions___pyx_scope_struct_29_genexpr { * return Shapes(*shapes, *others) * * @staticmethod # <<<<<<<<<<<<<< - * def Union(*shapes: Shape) -> Shapes: # FIXME + * def union(*shapes: Shape) -> Shapes: # FIXME * """ */ -struct __pyx_obj_10collisions___pyx_scope_struct_30_Union { +struct __pyx_obj_10collisions___pyx_scope_struct_30_union { PyObject_HEAD PyObject *__pyx_9genexpr78__pyx_v_j; PyObject *__pyx_v_p1; @@ -2088,7 +2088,7 @@ struct __pyx_obj_10collisions___pyx_scope_struct_30_Union { */ struct __pyx_obj_10collisions___pyx_scope_struct_31_genexpr { PyObject_HEAD - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *__pyx_outer_scope; + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *__pyx_outer_scope; PyObject *__pyx_genexpr_arg_0; PyObject *__pyx_v_k; }; @@ -3557,6 +3557,7 @@ static const char __pyx_k_thisr[] = "thisr"; static const char __pyx_k_throw[] = "throw"; static const char __pyx_k_toDeg[] = "toDeg"; static const char __pyx_k_tries[] = "tries"; +static const char __pyx_k_union[] = "union"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_where[] = "_where"; static const char __pyx_k_width[] = "width"; @@ -3789,7 +3790,6 @@ static const char __pyx_k_Shape___init[] = "Shape.__init__"; static const char __pyx_k_Shape___iter[] = "Shape.__iter__"; static const char __pyx_k_Shape___repr[] = "Shape.__repr__"; static const char __pyx_k_Shape__where[] = "Shape._where"; -static const char __pyx_k_ShapelyUnion[] = "ShapelyUnion"; static const char __pyx_k_Shapes___str[] = "Shapes.__str__"; static const char __pyx_k_ThisClosestP[] = "ThisClosestP"; static const char __pyx_k_angleInRange[] = "angleInRange"; @@ -3804,6 +3804,7 @@ static const char __pyx_k_is_coroutine[] = "_is_coroutine"; static const char __pyx_k_pointsToPoly[] = "pointsToPoly"; static const char __pyx_k_remove_shape[] = "remove_shape"; static const char __pyx_k_shapelyShape[] = "shapelyShape"; +static const char __pyx_k_shapelyUnion[] = "shapelyUnion"; static const char __pyx_k_staticmethod[] = "staticmethod"; static const char __pyx_k_tuple_Number[] = "tuple[Number]"; static const char __pyx_k_Arc___getitem[] = "Arc.__getitem__"; @@ -3837,6 +3838,7 @@ static const char __pyx_k_dist_to_start[] = "dist_to_start"; static const char __pyx_k_init_subclass[] = "__init_subclass__"; static const char __pyx_k_intersections[] = "intersections"; static const char __pyx_k_otherLnNormal[] = "otherLnNormal"; +static const char __pyx_k_pointOnCircle[] = "pointOnCircle"; static const char __pyx_k_pointsToShape[] = "pointsToShape"; static const char __pyx_k_remove_shapes[] = "remove_shapes"; static const char __pyx_k_shapelyToColl[] = "shapelyToColl"; @@ -3906,7 +3908,6 @@ static const char __pyx_k_cacheRequirements[] = "cacheRequirements"; static const char __pyx_k_copy_leave_shapes[] = "copy_leave_shapes"; static const char __pyx_k_degrees_to_vector[] = "degrees_to_vector"; static const char __pyx_k_lib_collisions_py[] = "lib/collisions.py"; -static const char __pyx_k_pointOnUnitCircle[] = "pointOnUnitCircle"; static const char __pyx_k_tuple_int_int_int[] = "tuple[int, int, int]"; static const char __pyx_k_with_dimensions_2[] = "), with dimensions "; static const char __pyx_k_Arc_closestPointTo[] = "Arc.closestPointTo"; @@ -3924,7 +3925,7 @@ static const char __pyx_k_ClosedShape_toLines[] = "ClosedShape.toLines"; static const char __pyx_k_Line_closestPointTo[] = "Line.closestPointTo"; static const char __pyx_k_Polygon_with_points[] = "__pyx_type_10collisions___pyx_scope_struct_28_genexpr); Py_CLEAR(clear_module_state->__pyx_ptype_10collisions___pyx_scope_struct_29_genexpr); Py_CLEAR(clear_module_state->__pyx_type_10collisions___pyx_scope_struct_29_genexpr); - Py_CLEAR(clear_module_state->__pyx_ptype_10collisions___pyx_scope_struct_30_Union); - Py_CLEAR(clear_module_state->__pyx_type_10collisions___pyx_scope_struct_30_Union); + Py_CLEAR(clear_module_state->__pyx_ptype_10collisions___pyx_scope_struct_30_union); + Py_CLEAR(clear_module_state->__pyx_type_10collisions___pyx_scope_struct_30_union); Py_CLEAR(clear_module_state->__pyx_ptype_10collisions___pyx_scope_struct_31_genexpr); Py_CLEAR(clear_module_state->__pyx_type_10collisions___pyx_scope_struct_31_genexpr); Py_CLEAR(clear_module_state->__pyx_n_s_A); @@ -5769,17 +5771,17 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_u_Shape); Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner); Py_CLEAR(clear_module_state->__pyx_n_u_ShapeCombiner); - Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_ShapelyUnion); - Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_Union); - Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_Union_locals_genex); - Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_Union_locals_lambd); - Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_Union_locals_refor); Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_boundingBox); Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_boundingBox_locals); Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_combineRects); Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_combineRects_local); Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_pointsToPoly); Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_pointsToShape); + Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_shapelyUnion); + Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_union); + Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_union_locals_genex); + Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_union_locals_lambd); + Py_CLEAR(clear_module_state->__pyx_n_s_ShapeCombiner_union_locals_refor); Py_CLEAR(clear_module_state->__pyx_kp_u_Shape_2); Py_CLEAR(clear_module_state->__pyx_kp_s_Shape_3); Py_CLEAR(clear_module_state->__pyx_n_s_Shape___getitem); @@ -5804,7 +5806,6 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_Shape_toLines); Py_CLEAR(clear_module_state->__pyx_n_s_Shape_toPoints); Py_CLEAR(clear_module_state->__pyx_n_s_Shape_whereCollides); - Py_CLEAR(clear_module_state->__pyx_n_s_ShapelyUnion); Py_CLEAR(clear_module_state->__pyx_n_s_Shapes); Py_CLEAR(clear_module_state->__pyx_n_u_Shapes); Py_CLEAR(clear_module_state->__pyx_kp_s_Shapes_2); @@ -6087,8 +6088,8 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_point); Py_CLEAR(clear_module_state->__pyx_n_s_pointLike); Py_CLEAR(clear_module_state->__pyx_kp_s_pointLike_Iterable_pointLike); - Py_CLEAR(clear_module_state->__pyx_n_s_pointOnUnitCircle); - Py_CLEAR(clear_module_state->__pyx_n_u_pointOnUnitCircle); + Py_CLEAR(clear_module_state->__pyx_n_s_pointOnCircle); + Py_CLEAR(clear_module_state->__pyx_n_u_pointOnCircle); Py_CLEAR(clear_module_state->__pyx_kp_u_points); Py_CLEAR(clear_module_state->__pyx_n_s_pointsToPoly); Py_CLEAR(clear_module_state->__pyx_n_s_pointsToShape); @@ -6148,6 +6149,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_shapelyShape); Py_CLEAR(clear_module_state->__pyx_n_s_shapelyToColl); Py_CLEAR(clear_module_state->__pyx_n_u_shapelyToColl); + Py_CLEAR(clear_module_state->__pyx_n_s_shapelyUnion); Py_CLEAR(clear_module_state->__pyx_n_s_shapely_geometry); Py_CLEAR(clear_module_state->__pyx_n_s_shapely_ops); Py_CLEAR(clear_module_state->__pyx_n_s_shapes); @@ -6201,6 +6203,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_typs); Py_CLEAR(clear_module_state->__pyx_n_s_u); Py_CLEAR(clear_module_state->__pyx_n_s_unary_union); + Py_CLEAR(clear_module_state->__pyx_n_s_union); Py_CLEAR(clear_module_state->__pyx_n_s_value); Py_CLEAR(clear_module_state->__pyx_n_s_vel); Py_CLEAR(clear_module_state->__pyx_n_s_velDiff); @@ -6631,8 +6634,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_type_10collisions___pyx_scope_struct_28_genexpr); Py_VISIT(traverse_module_state->__pyx_ptype_10collisions___pyx_scope_struct_29_genexpr); Py_VISIT(traverse_module_state->__pyx_type_10collisions___pyx_scope_struct_29_genexpr); - Py_VISIT(traverse_module_state->__pyx_ptype_10collisions___pyx_scope_struct_30_Union); - Py_VISIT(traverse_module_state->__pyx_type_10collisions___pyx_scope_struct_30_Union); + Py_VISIT(traverse_module_state->__pyx_ptype_10collisions___pyx_scope_struct_30_union); + Py_VISIT(traverse_module_state->__pyx_type_10collisions___pyx_scope_struct_30_union); Py_VISIT(traverse_module_state->__pyx_ptype_10collisions___pyx_scope_struct_31_genexpr); Py_VISIT(traverse_module_state->__pyx_type_10collisions___pyx_scope_struct_31_genexpr); Py_VISIT(traverse_module_state->__pyx_n_s_A); @@ -6869,17 +6872,17 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_u_Shape); Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner); Py_VISIT(traverse_module_state->__pyx_n_u_ShapeCombiner); - Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_ShapelyUnion); - Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_Union); - Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_Union_locals_genex); - Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_Union_locals_lambd); - Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_Union_locals_refor); Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_boundingBox); Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_boundingBox_locals); Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_combineRects); Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_combineRects_local); Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_pointsToPoly); Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_pointsToShape); + Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_shapelyUnion); + Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_union); + Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_union_locals_genex); + Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_union_locals_lambd); + Py_VISIT(traverse_module_state->__pyx_n_s_ShapeCombiner_union_locals_refor); Py_VISIT(traverse_module_state->__pyx_kp_u_Shape_2); Py_VISIT(traverse_module_state->__pyx_kp_s_Shape_3); Py_VISIT(traverse_module_state->__pyx_n_s_Shape___getitem); @@ -6904,7 +6907,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_Shape_toLines); Py_VISIT(traverse_module_state->__pyx_n_s_Shape_toPoints); Py_VISIT(traverse_module_state->__pyx_n_s_Shape_whereCollides); - Py_VISIT(traverse_module_state->__pyx_n_s_ShapelyUnion); Py_VISIT(traverse_module_state->__pyx_n_s_Shapes); Py_VISIT(traverse_module_state->__pyx_n_u_Shapes); Py_VISIT(traverse_module_state->__pyx_kp_s_Shapes_2); @@ -7187,8 +7189,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_point); Py_VISIT(traverse_module_state->__pyx_n_s_pointLike); Py_VISIT(traverse_module_state->__pyx_kp_s_pointLike_Iterable_pointLike); - Py_VISIT(traverse_module_state->__pyx_n_s_pointOnUnitCircle); - Py_VISIT(traverse_module_state->__pyx_n_u_pointOnUnitCircle); + Py_VISIT(traverse_module_state->__pyx_n_s_pointOnCircle); + Py_VISIT(traverse_module_state->__pyx_n_u_pointOnCircle); Py_VISIT(traverse_module_state->__pyx_kp_u_points); Py_VISIT(traverse_module_state->__pyx_n_s_pointsToPoly); Py_VISIT(traverse_module_state->__pyx_n_s_pointsToShape); @@ -7248,6 +7250,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_shapelyShape); Py_VISIT(traverse_module_state->__pyx_n_s_shapelyToColl); Py_VISIT(traverse_module_state->__pyx_n_u_shapelyToColl); + Py_VISIT(traverse_module_state->__pyx_n_s_shapelyUnion); Py_VISIT(traverse_module_state->__pyx_n_s_shapely_geometry); Py_VISIT(traverse_module_state->__pyx_n_s_shapely_ops); Py_VISIT(traverse_module_state->__pyx_n_s_shapes); @@ -7301,6 +7304,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_typs); Py_VISIT(traverse_module_state->__pyx_n_s_u); Py_VISIT(traverse_module_state->__pyx_n_s_unary_union); + Py_VISIT(traverse_module_state->__pyx_n_s_union); Py_VISIT(traverse_module_state->__pyx_n_s_value); Py_VISIT(traverse_module_state->__pyx_n_s_vel); Py_VISIT(traverse_module_state->__pyx_n_s_velDiff); @@ -7710,7 +7714,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_type_10collisions___pyx_scope_struct_27_genexpr __pyx_mstate_global->__pyx_type_10collisions___pyx_scope_struct_27_genexpr #define __pyx_type_10collisions___pyx_scope_struct_28_genexpr __pyx_mstate_global->__pyx_type_10collisions___pyx_scope_struct_28_genexpr #define __pyx_type_10collisions___pyx_scope_struct_29_genexpr __pyx_mstate_global->__pyx_type_10collisions___pyx_scope_struct_29_genexpr -#define __pyx_type_10collisions___pyx_scope_struct_30_Union __pyx_mstate_global->__pyx_type_10collisions___pyx_scope_struct_30_Union +#define __pyx_type_10collisions___pyx_scope_struct_30_union __pyx_mstate_global->__pyx_type_10collisions___pyx_scope_struct_30_union #define __pyx_type_10collisions___pyx_scope_struct_31_genexpr __pyx_mstate_global->__pyx_type_10collisions___pyx_scope_struct_31_genexpr #endif #define __pyx_ptype_10collisions___pyx_scope_struct__genexpr __pyx_mstate_global->__pyx_ptype_10collisions___pyx_scope_struct__genexpr @@ -7743,7 +7747,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_ptype_10collisions___pyx_scope_struct_27_genexpr __pyx_mstate_global->__pyx_ptype_10collisions___pyx_scope_struct_27_genexpr #define __pyx_ptype_10collisions___pyx_scope_struct_28_genexpr __pyx_mstate_global->__pyx_ptype_10collisions___pyx_scope_struct_28_genexpr #define __pyx_ptype_10collisions___pyx_scope_struct_29_genexpr __pyx_mstate_global->__pyx_ptype_10collisions___pyx_scope_struct_29_genexpr -#define __pyx_ptype_10collisions___pyx_scope_struct_30_Union __pyx_mstate_global->__pyx_ptype_10collisions___pyx_scope_struct_30_Union +#define __pyx_ptype_10collisions___pyx_scope_struct_30_union __pyx_mstate_global->__pyx_ptype_10collisions___pyx_scope_struct_30_union #define __pyx_ptype_10collisions___pyx_scope_struct_31_genexpr __pyx_mstate_global->__pyx_ptype_10collisions___pyx_scope_struct_31_genexpr #define __pyx_n_s_A __pyx_mstate_global->__pyx_n_s_A #define __pyx_n_s_AVERYSMALLNUMBER __pyx_mstate_global->__pyx_n_s_AVERYSMALLNUMBER @@ -7979,17 +7983,17 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_u_Shape __pyx_mstate_global->__pyx_n_u_Shape #define __pyx_n_s_ShapeCombiner __pyx_mstate_global->__pyx_n_s_ShapeCombiner #define __pyx_n_u_ShapeCombiner __pyx_mstate_global->__pyx_n_u_ShapeCombiner -#define __pyx_n_s_ShapeCombiner_ShapelyUnion __pyx_mstate_global->__pyx_n_s_ShapeCombiner_ShapelyUnion -#define __pyx_n_s_ShapeCombiner_Union __pyx_mstate_global->__pyx_n_s_ShapeCombiner_Union -#define __pyx_n_s_ShapeCombiner_Union_locals_genex __pyx_mstate_global->__pyx_n_s_ShapeCombiner_Union_locals_genex -#define __pyx_n_s_ShapeCombiner_Union_locals_lambd __pyx_mstate_global->__pyx_n_s_ShapeCombiner_Union_locals_lambd -#define __pyx_n_s_ShapeCombiner_Union_locals_refor __pyx_mstate_global->__pyx_n_s_ShapeCombiner_Union_locals_refor #define __pyx_n_s_ShapeCombiner_boundingBox __pyx_mstate_global->__pyx_n_s_ShapeCombiner_boundingBox #define __pyx_n_s_ShapeCombiner_boundingBox_locals __pyx_mstate_global->__pyx_n_s_ShapeCombiner_boundingBox_locals #define __pyx_n_s_ShapeCombiner_combineRects __pyx_mstate_global->__pyx_n_s_ShapeCombiner_combineRects #define __pyx_n_s_ShapeCombiner_combineRects_local __pyx_mstate_global->__pyx_n_s_ShapeCombiner_combineRects_local #define __pyx_n_s_ShapeCombiner_pointsToPoly __pyx_mstate_global->__pyx_n_s_ShapeCombiner_pointsToPoly #define __pyx_n_s_ShapeCombiner_pointsToShape __pyx_mstate_global->__pyx_n_s_ShapeCombiner_pointsToShape +#define __pyx_n_s_ShapeCombiner_shapelyUnion __pyx_mstate_global->__pyx_n_s_ShapeCombiner_shapelyUnion +#define __pyx_n_s_ShapeCombiner_union __pyx_mstate_global->__pyx_n_s_ShapeCombiner_union +#define __pyx_n_s_ShapeCombiner_union_locals_genex __pyx_mstate_global->__pyx_n_s_ShapeCombiner_union_locals_genex +#define __pyx_n_s_ShapeCombiner_union_locals_lambd __pyx_mstate_global->__pyx_n_s_ShapeCombiner_union_locals_lambd +#define __pyx_n_s_ShapeCombiner_union_locals_refor __pyx_mstate_global->__pyx_n_s_ShapeCombiner_union_locals_refor #define __pyx_kp_u_Shape_2 __pyx_mstate_global->__pyx_kp_u_Shape_2 #define __pyx_kp_s_Shape_3 __pyx_mstate_global->__pyx_kp_s_Shape_3 #define __pyx_n_s_Shape___getitem __pyx_mstate_global->__pyx_n_s_Shape___getitem @@ -8014,7 +8018,6 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_Shape_toLines __pyx_mstate_global->__pyx_n_s_Shape_toLines #define __pyx_n_s_Shape_toPoints __pyx_mstate_global->__pyx_n_s_Shape_toPoints #define __pyx_n_s_Shape_whereCollides __pyx_mstate_global->__pyx_n_s_Shape_whereCollides -#define __pyx_n_s_ShapelyUnion __pyx_mstate_global->__pyx_n_s_ShapelyUnion #define __pyx_n_s_Shapes __pyx_mstate_global->__pyx_n_s_Shapes #define __pyx_n_u_Shapes __pyx_mstate_global->__pyx_n_u_Shapes #define __pyx_kp_s_Shapes_2 __pyx_mstate_global->__pyx_kp_s_Shapes_2 @@ -8297,8 +8300,8 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_point __pyx_mstate_global->__pyx_n_s_point #define __pyx_n_s_pointLike __pyx_mstate_global->__pyx_n_s_pointLike #define __pyx_kp_s_pointLike_Iterable_pointLike __pyx_mstate_global->__pyx_kp_s_pointLike_Iterable_pointLike -#define __pyx_n_s_pointOnUnitCircle __pyx_mstate_global->__pyx_n_s_pointOnUnitCircle -#define __pyx_n_u_pointOnUnitCircle __pyx_mstate_global->__pyx_n_u_pointOnUnitCircle +#define __pyx_n_s_pointOnCircle __pyx_mstate_global->__pyx_n_s_pointOnCircle +#define __pyx_n_u_pointOnCircle __pyx_mstate_global->__pyx_n_u_pointOnCircle #define __pyx_kp_u_points __pyx_mstate_global->__pyx_kp_u_points #define __pyx_n_s_pointsToPoly __pyx_mstate_global->__pyx_n_s_pointsToPoly #define __pyx_n_s_pointsToShape __pyx_mstate_global->__pyx_n_s_pointsToShape @@ -8358,6 +8361,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_shapelyShape __pyx_mstate_global->__pyx_n_s_shapelyShape #define __pyx_n_s_shapelyToColl __pyx_mstate_global->__pyx_n_s_shapelyToColl #define __pyx_n_u_shapelyToColl __pyx_mstate_global->__pyx_n_u_shapelyToColl +#define __pyx_n_s_shapelyUnion __pyx_mstate_global->__pyx_n_s_shapelyUnion #define __pyx_n_s_shapely_geometry __pyx_mstate_global->__pyx_n_s_shapely_geometry #define __pyx_n_s_shapely_ops __pyx_mstate_global->__pyx_n_s_shapely_ops #define __pyx_n_s_shapes __pyx_mstate_global->__pyx_n_s_shapes @@ -8411,6 +8415,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_typs __pyx_mstate_global->__pyx_n_s_typs #define __pyx_n_s_u __pyx_mstate_global->__pyx_n_s_u #define __pyx_n_s_unary_union __pyx_mstate_global->__pyx_n_s_unary_union +#define __pyx_n_s_union __pyx_mstate_global->__pyx_n_s_union #define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value #define __pyx_n_s_vel __pyx_mstate_global->__pyx_n_s_vel #define __pyx_n_s_velDiff __pyx_mstate_global->__pyx_n_s_velDiff @@ -9732,7 +9737,7 @@ static PyObject *__pyx_pf_10collisions_6direction(CYTHON_UNUSED PyObject *__pyx_ * """ * return math.atan2(toPoint[1]-fromPoint[1], toPoint[0]-fromPoint[0]) # <<<<<<<<<<<<<< * - * def pointOnUnitCircle(angle: Number, strength: Number=1) -> pointLike: + * def pointOnCircle(angle: Number, strength: Number=1) -> pointLike: */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_math); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error) @@ -9811,22 +9816,22 @@ static PyObject *__pyx_pf_10collisions_6direction(CYTHON_UNUSED PyObject *__pyx_ /* "collisions.py":109 * return math.atan2(toPoint[1]-fromPoint[1], toPoint[0]-fromPoint[0]) * - * def pointOnUnitCircle(angle: Number, strength: Number=1) -> pointLike: # <<<<<<<<<<<<<< + * def pointOnCircle(angle: Number, strength: Number=1) -> pointLike: # <<<<<<<<<<<<<< * """ * Finds the point on the unit circle at a given angle with a given strength */ /* Python wrapper */ -static PyObject *__pyx_pw_10collisions_9pointOnUnitCircle(PyObject *__pyx_self, +static PyObject *__pyx_pw_10collisions_9pointOnCircle(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10collisions_8pointOnUnitCircle, "\n Finds the point on the unit circle at a given angle with a given strength\n\n Args:\n angle (Number): The angle in radians\n strength (Number): The distance from the origin. Defaults to 1.\n\n Returns:\n pointLike: The point on the unit circle at angle `angle` * strength\n "); -static PyMethodDef __pyx_mdef_10collisions_9pointOnUnitCircle = {"pointOnUnitCircle", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10collisions_9pointOnUnitCircle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10collisions_8pointOnUnitCircle}; -static PyObject *__pyx_pw_10collisions_9pointOnUnitCircle(PyObject *__pyx_self, +PyDoc_STRVAR(__pyx_doc_10collisions_8pointOnCircle, "\n Finds the point on the unit circle at a given angle with a given strength\n\n Args:\n angle (Number): The angle in radians\n strength (Number): The distance from the origin. Defaults to 1.\n\n Returns:\n pointLike: The point on the unit circle at angle `angle` * strength\n "); +static PyMethodDef __pyx_mdef_10collisions_9pointOnCircle = {"pointOnCircle", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10collisions_9pointOnCircle, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_10collisions_8pointOnCircle}; +static PyObject *__pyx_pw_10collisions_9pointOnCircle(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9845,7 +9850,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("pointOnUnitCircle (wrapper)", 0); + __Pyx_RefNannySetupContext("pointOnCircle (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); @@ -9886,7 +9891,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pointOnUnitCircle") < 0)) __PYX_ERR(0, 109, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "pointOnCircle") < 0)) __PYX_ERR(0, 109, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -9902,7 +9907,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pointOnUnitCircle", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 109, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pointOnCircle", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 109, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9912,11 +9917,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } - __Pyx_AddTraceback("collisions.pointOnUnitCircle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.pointOnCircle", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_10collisions_8pointOnUnitCircle(__pyx_self, __pyx_v_angle, __pyx_v_strength); + __pyx_r = __pyx_pf_10collisions_8pointOnCircle(__pyx_self, __pyx_v_angle, __pyx_v_strength); /* function exit code */ { @@ -9929,7 +9934,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_10collisions_8pointOnUnitCircle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_angle, PyObject *__pyx_v_strength) { +static PyObject *__pyx_pf_10collisions_8pointOnCircle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_angle, PyObject *__pyx_v_strength) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -9940,7 +9945,7 @@ static PyObject *__pyx_pf_10collisions_8pointOnUnitCircle(CYTHON_UNUSED PyObject int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("pointOnUnitCircle", 1); + __Pyx_RefNannySetupContext("pointOnCircle", 1); /* "collisions.py":120 * pointLike: The point on the unit circle at angle `angle` * strength @@ -10025,7 +10030,7 @@ static PyObject *__pyx_pf_10collisions_8pointOnUnitCircle(CYTHON_UNUSED PyObject /* "collisions.py":109 * return math.atan2(toPoint[1]-fromPoint[1], toPoint[0]-fromPoint[0]) * - * def pointOnUnitCircle(angle: Number, strength: Number=1) -> pointLike: # <<<<<<<<<<<<<< + * def pointOnCircle(angle: Number, strength: Number=1) -> pointLike: # <<<<<<<<<<<<<< * """ * Finds the point on the unit circle at a given angle with a given strength */ @@ -10036,7 +10041,7 @@ static PyObject *__pyx_pf_10collisions_8pointOnUnitCircle(CYTHON_UNUSED PyObject __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("collisions.pointOnUnitCircle", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.pointOnCircle", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -93629,31 +93634,31 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_2combineRects(CYTHON_UNUS * return Shapes(*shapes, *others) * * @staticmethod # <<<<<<<<<<<<<< - * def Union(*shapes: Shape) -> Shapes: # FIXME + * def union(*shapes: Shape) -> Shapes: # FIXME * """ */ /* Python wrapper */ -static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5Union(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10collisions_13ShapeCombiner_4Union, "\n Combine all the input shapes with a unary union. Still in progress and doesn't work too well.\n\n Returns:\n Shapes: The union of all the shapes.\n "); -static PyMethodDef __pyx_mdef_10collisions_13ShapeCombiner_5Union = {"Union", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10collisions_13ShapeCombiner_5Union, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10collisions_13ShapeCombiner_4Union}; -static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5Union(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5union(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_10collisions_13ShapeCombiner_4union, "\n Combine all the input shapes with a unary union. Still in progress and doesn't work too well.\n\n Returns:\n Shapes: The union of all the shapes.\n "); +static PyMethodDef __pyx_mdef_10collisions_13ShapeCombiner_5union = {"union", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10collisions_13ShapeCombiner_5union, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10collisions_13ShapeCombiner_4union}; +static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5union(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_shapes = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("Union (wrapper)", 0); + __Pyx_RefNannySetupContext("union (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "Union", 0))) return NULL; + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "union", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_shapes = __pyx_args; - __pyx_r = __pyx_pf_10collisions_13ShapeCombiner_4Union(__pyx_self, __pyx_v_shapes); + __pyx_r = __pyx_pf_10collisions_13ShapeCombiner_4union(__pyx_self, __pyx_v_shapes); /* function exit code */ __Pyx_DECREF(__pyx_v_shapes); @@ -93670,15 +93675,15 @@ static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5Union(PyObject *__pyx_se */ /* Python wrapper */ -static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5Union_1reformat(PyObject *__pyx_self, +static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5union_1reformat(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_10collisions_13ShapeCombiner_5Union_1reformat = {"reformat", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10collisions_13ShapeCombiner_5Union_1reformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5Union_1reformat(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_10collisions_13ShapeCombiner_5union_1reformat = {"reformat", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10collisions_13ShapeCombiner_5union_1reformat, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5union_1reformat(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -93748,11 +93753,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } - __Pyx_AddTraceback("collisions.ShapeCombiner.Union.reformat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.ShapeCombiner.union.reformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_10collisions_13ShapeCombiner_5Union_reformat(__pyx_self, __pyx_v_obj); + __pyx_r = __pyx_pf_10collisions_13ShapeCombiner_5union_reformat(__pyx_self, __pyx_v_obj); /* function exit code */ { @@ -93765,9 +93770,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5Union_reformat(PyObject *__pyx_self, PyObject *__pyx_v_obj) { - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *__pyx_cur_scope; - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *__pyx_outer_scope; +static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5union_reformat(PyObject *__pyx_self, PyObject *__pyx_v_obj) { + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *__pyx_cur_scope; + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -93783,7 +93788,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5Union_reformat(PyObject const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reformat", 1); - __pyx_outer_scope = (struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_outer_scope = (struct __pyx_obj_10collisions___pyx_scope_struct_30_union *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; /* "collisions.py":2784 @@ -93963,14 +93968,14 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5Union_reformat(PyObject __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_AddTraceback("collisions.ShapeCombiner.Union.reformat", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.ShapeCombiner.union.reformat", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_10collisions_13ShapeCombiner_5Union_9genexpr78_2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_10collisions_13ShapeCombiner_5union_9genexpr78_2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "collisions.py":2805 * checked = [] @@ -93980,7 +93985,7 @@ static PyObject *__pyx_gb_10collisions_13ShapeCombiner_5Union_9genexpr78_2genera * while True: */ -static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5Union_9genexpr78_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { +static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5union_9genexpr78_genexpr(PyObject *__pyx_self, PyObject *__pyx_genexpr_arg_0) { struct __pyx_obj_10collisions___pyx_scope_struct_31_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -93996,14 +94001,14 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5Union_9genexpr78_genexpr } else { __Pyx_GOTREF((PyObject *)__pyx_cur_scope); } - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_10collisions___pyx_scope_struct_30_union *) __pyx_self; __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_outer_scope); __pyx_cur_scope->__pyx_genexpr_arg_0 = __pyx_genexpr_arg_0; __Pyx_INCREF(__pyx_cur_scope->__pyx_genexpr_arg_0); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_genexpr_arg_0); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10collisions_13ShapeCombiner_5Union_9genexpr78_2generator15, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_ShapeCombiner_Union_locals_genex, __pyx_n_s_collisions); if (unlikely(!gen)) __PYX_ERR(0, 2805, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_10collisions_13ShapeCombiner_5union_9genexpr78_2generator15, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_ShapeCombiner_union_locals_genex, __pyx_n_s_collisions); if (unlikely(!gen)) __PYX_ERR(0, 2805, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -94011,7 +94016,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5Union_9genexpr78_genexpr /* function exit code */ __pyx_L1_error:; - __Pyx_AddTraceback("collisions.ShapeCombiner.Union.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.ShapeCombiner.union.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __Pyx_DECREF((PyObject *)__pyx_cur_scope); __Pyx_XGIVEREF(__pyx_r); @@ -94019,7 +94024,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_5Union_9genexpr78_genexpr return __pyx_r; } -static PyObject *__pyx_gb_10collisions_13ShapeCombiner_5Union_9genexpr78_2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_10collisions_13ShapeCombiner_5union_9genexpr78_2generator15(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_10collisions___pyx_scope_struct_31_genexpr *__pyx_cur_scope = ((struct __pyx_obj_10collisions___pyx_scope_struct_31_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; @@ -94156,15 +94161,15 @@ static PyObject *__pyx_gb_10collisions_13ShapeCombiner_5Union_9genexpr78_2genera */ /* Python wrapper */ -static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5Union_2lambda39(PyObject *__pyx_self, +static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5union_2lambda39(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -static PyMethodDef __pyx_mdef_10collisions_13ShapeCombiner_5Union_2lambda39 = {"lambda39", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10collisions_13ShapeCombiner_5Union_2lambda39, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; -static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5Union_2lambda39(PyObject *__pyx_self, +static PyMethodDef __pyx_mdef_10collisions_13ShapeCombiner_5union_2lambda39 = {"lambda39", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_10collisions_13ShapeCombiner_5union_2lambda39, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0}; +static PyObject *__pyx_pw_10collisions_13ShapeCombiner_5union_2lambda39(PyObject *__pyx_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -94234,7 +94239,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } - __Pyx_AddTraceback("collisions.ShapeCombiner.Union.lambda39", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.ShapeCombiner.union.lambda39", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; @@ -94252,8 +94257,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } static PyObject *__pyx_lambda_funcdef_lambda39(PyObject *__pyx_self, PyObject *__pyx_v_x) { - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *__pyx_cur_scope; - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *__pyx_outer_scope; + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *__pyx_cur_scope; + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *__pyx_outer_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -94264,7 +94269,7 @@ static PyObject *__pyx_lambda_funcdef_lambda39(PyObject *__pyx_self, PyObject *_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda39", 1); - __pyx_outer_scope = (struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_outer_scope = (struct __pyx_obj_10collisions___pyx_scope_struct_30_union *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2823, __pyx_L1_error) @@ -94311,7 +94316,7 @@ static PyObject *__pyx_lambda_funcdef_lambda39(PyObject *__pyx_self, PyObject *_ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("collisions.ShapeCombiner.Union.lambda39", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.ShapeCombiner.union.lambda39", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -94323,12 +94328,12 @@ static PyObject *__pyx_lambda_funcdef_lambda39(PyObject *__pyx_self, PyObject *_ * return Shapes(*shapes, *others) * * @staticmethod # <<<<<<<<<<<<<< - * def Union(*shapes: Shape) -> Shapes: # FIXME + * def union(*shapes: Shape) -> Shapes: # FIXME * """ */ -static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4Union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shapes) { - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *__pyx_cur_scope; +static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4union(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shapes) { + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *__pyx_cur_scope; PyObject *__pyx_v_reformat = 0; PyObject *__pyx_v_reform = NULL; PyObject *__pyx_v_outshps = NULL; @@ -94382,10 +94387,10 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4Union(CYTHON_UNUSED PyOb int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("Union", 0); - __pyx_cur_scope = (struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *)__pyx_tp_new_10collisions___pyx_scope_struct_30_Union(__pyx_ptype_10collisions___pyx_scope_struct_30_Union, __pyx_empty_tuple, NULL); + __Pyx_RefNannySetupContext("union", 0); + __pyx_cur_scope = (struct __pyx_obj_10collisions___pyx_scope_struct_30_union *)__pyx_tp_new_10collisions___pyx_scope_struct_30_union(__pyx_ptype_10collisions___pyx_scope_struct_30_union, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { - __pyx_cur_scope = ((struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *)Py_None); + __pyx_cur_scope = ((struct __pyx_obj_10collisions___pyx_scope_struct_30_union *)Py_None); __Pyx_INCREF(Py_None); __PYX_ERR(0, 2773, __pyx_L1_error) } else { @@ -94456,7 +94461,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4Union(CYTHON_UNUSED PyOb * if checkShpType(obj, ShpGroups.CLOSED): * return obj */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_13ShapeCombiner_5Union_1reformat, 0, __pyx_n_s_ShapeCombiner_Union_locals_refor, ((PyObject*)__pyx_cur_scope), __pyx_n_s_collisions, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2783, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_13ShapeCombiner_5union_1reformat, 0, __pyx_n_s_ShapeCombiner_union_locals_refor, ((PyObject*)__pyx_cur_scope), __pyx_n_s_collisions, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_reformat = __pyx_t_3; __pyx_t_3 = 0; @@ -94525,7 +94530,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4Union(CYTHON_UNUSED PyOb } __Pyx_XDECREF_SET(__pyx_9genexpr74__pyx_v_s, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __pyx_pf_10collisions_13ShapeCombiner_5Union_reformat(__pyx_v_reformat, __pyx_9genexpr74__pyx_v_s); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2789, __pyx_L6_error) + __pyx_t_5 = __pyx_pf_10collisions_13ShapeCombiner_5union_reformat(__pyx_v_reformat, __pyx_9genexpr74__pyx_v_s); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2789, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 2789, __pyx_L6_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -94932,7 +94937,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4Union(CYTHON_UNUSED PyOb __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_9genexpr78__pyx_v_j, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __pyx_pf_10collisions_13ShapeCombiner_5Union_9genexpr78_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_oshps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1_error) + __pyx_t_3 = __pyx_pf_10collisions_13ShapeCombiner_5union_9genexpr78_genexpr(((PyObject*)__pyx_cur_scope), __pyx_v_oshps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_Generator_Next(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); @@ -95348,7 +95353,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4Union(CYTHON_UNUSED PyOb __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_13ShapeCombiner_5Union_2lambda39, 0, __pyx_n_s_ShapeCombiner_Union_locals_lambd, ((PyObject*)__pyx_cur_scope), __pyx_n_s_collisions, __pyx_d, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2823, __pyx_L1_error) + __pyx_t_11 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_13ShapeCombiner_5union_2lambda39, 0, __pyx_n_s_ShapeCombiner_union_locals_lambd, ((PyObject*)__pyx_cur_scope), __pyx_n_s_collisions, __pyx_d, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_key, __pyx_t_11) < 0) __PYX_ERR(0, 2823, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -95662,7 +95667,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4Union(CYTHON_UNUSED PyOb * return Shapes(*shapes, *others) * * @staticmethod # <<<<<<<<<<<<<< - * def Union(*shapes: Shape) -> Shapes: # FIXME + * def union(*shapes: Shape) -> Shapes: # FIXME * """ */ @@ -95674,7 +95679,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_4Union(CYTHON_UNUSED PyOb __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_23); - __Pyx_AddTraceback("collisions.ShapeCombiner.Union", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.ShapeCombiner.union", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_shapes); @@ -96526,31 +96531,31 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_8pointsToPoly(CYTHON_UNUS * return shapelyToColl(shapely.concave_hull(shapelyGeom.MultiPoint([tuple(i) for i in points]), ratio=ratio)) * * @staticmethod # <<<<<<<<<<<<<< - * def ShapelyUnion(*shapes: Shape) -> Shape: + * def shapelyUnion(*shapes: Shape) -> Shape: * """ */ /* Python wrapper */ -static PyObject *__pyx_pw_10collisions_13ShapeCombiner_11ShapelyUnion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -PyDoc_STRVAR(__pyx_doc_10collisions_13ShapeCombiner_10ShapelyUnion, "\n Combine all the input shapes with shapely to be a union.\n If the shapes are not all touching, they will *still* be combined into one shape.\n If you need to combine shapes but don't like the result of this, try the `ShapeCombiner.Union` method.\n\n Args:\n shapes (list[Shape]): The shapes to combine.\n\n Returns:\n Shape: A Shape which is the union of all the input shapes.\n "); -static PyMethodDef __pyx_mdef_10collisions_13ShapeCombiner_11ShapelyUnion = {"ShapelyUnion", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10collisions_13ShapeCombiner_11ShapelyUnion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10collisions_13ShapeCombiner_10ShapelyUnion}; -static PyObject *__pyx_pw_10collisions_13ShapeCombiner_11ShapelyUnion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_10collisions_13ShapeCombiner_11shapelyUnion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +PyDoc_STRVAR(__pyx_doc_10collisions_13ShapeCombiner_10shapelyUnion, "\n Combine all the input shapes with shapely to be a union.\n If the shapes are not all touching, they will *still* be combined into one shape.\n If you need to combine shapes but don't like the result of this, try the `ShapeCombiner.Union` method.\n\n Args:\n shapes (list[Shape]): The shapes to combine.\n\n Returns:\n Shape: A Shape which is the union of all the input shapes.\n "); +static PyMethodDef __pyx_mdef_10collisions_13ShapeCombiner_11shapelyUnion = {"shapelyUnion", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10collisions_13ShapeCombiner_11shapelyUnion, METH_VARARGS|METH_KEYWORDS, __pyx_doc_10collisions_13ShapeCombiner_10shapelyUnion}; +static PyObject *__pyx_pw_10collisions_13ShapeCombiner_11shapelyUnion(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_shapes = 0; CYTHON_UNUSED Py_ssize_t __pyx_nargs; CYTHON_UNUSED PyObject *const *__pyx_kwvalues; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("ShapelyUnion (wrapper)", 0); + __Pyx_RefNannySetupContext("shapelyUnion (wrapper)", 0); #if CYTHON_ASSUME_SAFE_MACROS __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); #else __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; #endif __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs); - if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "ShapelyUnion", 0))) return NULL; + if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "shapelyUnion", 0))) return NULL; __Pyx_INCREF(__pyx_args); __pyx_v_shapes = __pyx_args; - __pyx_r = __pyx_pf_10collisions_13ShapeCombiner_10ShapelyUnion(__pyx_self, __pyx_v_shapes); + __pyx_r = __pyx_pf_10collisions_13ShapeCombiner_10shapelyUnion(__pyx_self, __pyx_v_shapes); /* function exit code */ __Pyx_DECREF(__pyx_v_shapes); @@ -96558,7 +96563,7 @@ static PyObject *__pyx_pw_10collisions_13ShapeCombiner_11ShapelyUnion(PyObject * return __pyx_r; } -static PyObject *__pyx_pf_10collisions_13ShapeCombiner_10ShapelyUnion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shapes) { +static PyObject *__pyx_pf_10collisions_13ShapeCombiner_10shapelyUnion(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_shapes) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -96573,7 +96578,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_10ShapelyUnion(CYTHON_UNU int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("ShapelyUnion", 1); + __Pyx_RefNannySetupContext("shapelyUnion", 1); /* "collisions.py":2910 * Shape: A Shape which is the union of all the input shapes. @@ -96674,7 +96679,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_10ShapelyUnion(CYTHON_UNU * return shapelyToColl(shapely.concave_hull(shapelyGeom.MultiPoint([tuple(i) for i in points]), ratio=ratio)) * * @staticmethod # <<<<<<<<<<<<<< - * def ShapelyUnion(*shapes: Shape) -> Shape: + * def shapelyUnion(*shapes: Shape) -> Shape: * """ */ @@ -96688,7 +96693,7 @@ static PyObject *__pyx_pf_10collisions_13ShapeCombiner_10ShapelyUnion(CYTHON_UNU __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("collisions.ShapeCombiner.ShapelyUnion", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("collisions.ShapeCombiner.shapelyUnion", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); @@ -101912,20 +101917,20 @@ static PyTypeObject __pyx_type_10collisions___pyx_scope_struct_29_genexpr = { #endif #if CYTHON_USE_FREELISTS -static struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *__pyx_freelist_10collisions___pyx_scope_struct_30_Union[8]; -static int __pyx_freecount_10collisions___pyx_scope_struct_30_Union = 0; +static struct __pyx_obj_10collisions___pyx_scope_struct_30_union *__pyx_freelist_10collisions___pyx_scope_struct_30_union[8]; +static int __pyx_freecount_10collisions___pyx_scope_struct_30_union = 0; #endif -static PyObject *__pyx_tp_new_10collisions___pyx_scope_struct_30_Union(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_10collisions___pyx_scope_struct_30_union(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; #if CYTHON_COMPILING_IN_LIMITED_API allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc); o = alloc_func(t, 0); #else #if CYTHON_USE_FREELISTS - if (likely((int)(__pyx_freecount_10collisions___pyx_scope_struct_30_Union > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_Union)))) { - o = (PyObject*)__pyx_freelist_10collisions___pyx_scope_struct_30_Union[--__pyx_freecount_10collisions___pyx_scope_struct_30_Union]; - memset(o, 0, sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_Union)); + if (likely((int)(__pyx_freecount_10collisions___pyx_scope_struct_30_union > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_union)))) { + o = (PyObject*)__pyx_freelist_10collisions___pyx_scope_struct_30_union[--__pyx_freecount_10collisions___pyx_scope_struct_30_union]; + memset(o, 0, sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_union)); (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else @@ -101938,11 +101943,11 @@ static PyObject *__pyx_tp_new_10collisions___pyx_scope_struct_30_Union(PyTypeObj return o; } -static void __pyx_tp_dealloc_10collisions___pyx_scope_struct_30_Union(PyObject *o) { - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *p = (struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *)o; +static void __pyx_tp_dealloc_10collisions___pyx_scope_struct_30_union(PyObject *o) { + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *p = (struct __pyx_obj_10collisions___pyx_scope_struct_30_union *)o; #if CYTHON_USE_TP_FINALIZE if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) { - if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10collisions___pyx_scope_struct_30_Union) { + if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_10collisions___pyx_scope_struct_30_union) { if (PyObject_CallFinalizerFromDealloc(o)) return; } } @@ -101952,8 +101957,8 @@ static void __pyx_tp_dealloc_10collisions___pyx_scope_struct_30_Union(PyObject * Py_CLEAR(p->__pyx_v_p1); Py_CLEAR(p->__pyx_v_s); #if CYTHON_USE_FREELISTS - if (((int)(__pyx_freecount_10collisions___pyx_scope_struct_30_Union < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_Union)))) { - __pyx_freelist_10collisions___pyx_scope_struct_30_Union[__pyx_freecount_10collisions___pyx_scope_struct_30_Union++] = ((struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *)o); + if (((int)(__pyx_freecount_10collisions___pyx_scope_struct_30_union < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_union)))) { + __pyx_freelist_10collisions___pyx_scope_struct_30_union[__pyx_freecount_10collisions___pyx_scope_struct_30_union++] = ((struct __pyx_obj_10collisions___pyx_scope_struct_30_union *)o); } else #endif { @@ -101968,9 +101973,9 @@ static void __pyx_tp_dealloc_10collisions___pyx_scope_struct_30_Union(PyObject * } } -static int __pyx_tp_traverse_10collisions___pyx_scope_struct_30_Union(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_10collisions___pyx_scope_struct_30_union(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *p = (struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *)o; + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *p = (struct __pyx_obj_10collisions___pyx_scope_struct_30_union *)o; if (p->__pyx_9genexpr78__pyx_v_j) { e = (*v)(p->__pyx_9genexpr78__pyx_v_j, a); if (e) return e; } @@ -101983,9 +101988,9 @@ static int __pyx_tp_traverse_10collisions___pyx_scope_struct_30_Union(PyObject * return 0; } -static int __pyx_tp_clear_10collisions___pyx_scope_struct_30_Union(PyObject *o) { +static int __pyx_tp_clear_10collisions___pyx_scope_struct_30_union(PyObject *o) { PyObject* tmp; - struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *p = (struct __pyx_obj_10collisions___pyx_scope_struct_30_Union *)o; + struct __pyx_obj_10collisions___pyx_scope_struct_30_union *p = (struct __pyx_obj_10collisions___pyx_scope_struct_30_union *)o; tmp = ((PyObject*)p->__pyx_9genexpr78__pyx_v_j); p->__pyx_9genexpr78__pyx_v_j = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); @@ -101998,28 +102003,28 @@ static int __pyx_tp_clear_10collisions___pyx_scope_struct_30_Union(PyObject *o) return 0; } #if CYTHON_USE_TYPE_SPECS -static PyType_Slot __pyx_type_10collisions___pyx_scope_struct_30_Union_slots[] = { - {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10collisions___pyx_scope_struct_30_Union}, - {Py_tp_traverse, (void *)__pyx_tp_traverse_10collisions___pyx_scope_struct_30_Union}, - {Py_tp_clear, (void *)__pyx_tp_clear_10collisions___pyx_scope_struct_30_Union}, - {Py_tp_new, (void *)__pyx_tp_new_10collisions___pyx_scope_struct_30_Union}, +static PyType_Slot __pyx_type_10collisions___pyx_scope_struct_30_union_slots[] = { + {Py_tp_dealloc, (void *)__pyx_tp_dealloc_10collisions___pyx_scope_struct_30_union}, + {Py_tp_traverse, (void *)__pyx_tp_traverse_10collisions___pyx_scope_struct_30_union}, + {Py_tp_clear, (void *)__pyx_tp_clear_10collisions___pyx_scope_struct_30_union}, + {Py_tp_new, (void *)__pyx_tp_new_10collisions___pyx_scope_struct_30_union}, {0, 0}, }; -static PyType_Spec __pyx_type_10collisions___pyx_scope_struct_30_Union_spec = { - "collisions.__pyx_scope_struct_30_Union", - sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_Union), +static PyType_Spec __pyx_type_10collisions___pyx_scope_struct_30_union_spec = { + "collisions.__pyx_scope_struct_30_union", + sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_union), 0, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, - __pyx_type_10collisions___pyx_scope_struct_30_Union_slots, + __pyx_type_10collisions___pyx_scope_struct_30_union_slots, }; #else -static PyTypeObject __pyx_type_10collisions___pyx_scope_struct_30_Union = { +static PyTypeObject __pyx_type_10collisions___pyx_scope_struct_30_union = { PyVarObject_HEAD_INIT(0, 0) - "collisions.""__pyx_scope_struct_30_Union", /*tp_name*/ - sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_Union), /*tp_basicsize*/ + "collisions.""__pyx_scope_struct_30_union", /*tp_name*/ + sizeof(struct __pyx_obj_10collisions___pyx_scope_struct_30_union), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_10collisions___pyx_scope_struct_30_Union, /*tp_dealloc*/ + __pyx_tp_dealloc_10collisions___pyx_scope_struct_30_union, /*tp_dealloc*/ #if PY_VERSION_HEX < 0x030800b4 0, /*tp_print*/ #endif @@ -102046,8 +102051,8 @@ static PyTypeObject __pyx_type_10collisions___pyx_scope_struct_30_Union = { 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_10collisions___pyx_scope_struct_30_Union, /*tp_traverse*/ - __pyx_tp_clear_10collisions___pyx_scope_struct_30_Union, /*tp_clear*/ + __pyx_tp_traverse_10collisions___pyx_scope_struct_30_union, /*tp_traverse*/ + __pyx_tp_clear_10collisions___pyx_scope_struct_30_union, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -102064,7 +102069,7 @@ static PyTypeObject __pyx_type_10collisions___pyx_scope_struct_30_Union = { #endif 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_10collisions___pyx_scope_struct_30_Union, /*tp_new*/ + __pyx_tp_new_10collisions___pyx_scope_struct_30_union, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -102521,17 +102526,17 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_u_Shape, __pyx_k_Shape, sizeof(__pyx_k_Shape), 0, 1, 0, 1}, {&__pyx_n_s_ShapeCombiner, __pyx_k_ShapeCombiner, sizeof(__pyx_k_ShapeCombiner), 0, 0, 1, 1}, {&__pyx_n_u_ShapeCombiner, __pyx_k_ShapeCombiner, sizeof(__pyx_k_ShapeCombiner), 0, 1, 0, 1}, - {&__pyx_n_s_ShapeCombiner_ShapelyUnion, __pyx_k_ShapeCombiner_ShapelyUnion, sizeof(__pyx_k_ShapeCombiner_ShapelyUnion), 0, 0, 1, 1}, - {&__pyx_n_s_ShapeCombiner_Union, __pyx_k_ShapeCombiner_Union, sizeof(__pyx_k_ShapeCombiner_Union), 0, 0, 1, 1}, - {&__pyx_n_s_ShapeCombiner_Union_locals_genex, __pyx_k_ShapeCombiner_Union_locals_genex, sizeof(__pyx_k_ShapeCombiner_Union_locals_genex), 0, 0, 1, 1}, - {&__pyx_n_s_ShapeCombiner_Union_locals_lambd, __pyx_k_ShapeCombiner_Union_locals_lambd, sizeof(__pyx_k_ShapeCombiner_Union_locals_lambd), 0, 0, 1, 1}, - {&__pyx_n_s_ShapeCombiner_Union_locals_refor, __pyx_k_ShapeCombiner_Union_locals_refor, sizeof(__pyx_k_ShapeCombiner_Union_locals_refor), 0, 0, 1, 1}, {&__pyx_n_s_ShapeCombiner_boundingBox, __pyx_k_ShapeCombiner_boundingBox, sizeof(__pyx_k_ShapeCombiner_boundingBox), 0, 0, 1, 1}, {&__pyx_n_s_ShapeCombiner_boundingBox_locals, __pyx_k_ShapeCombiner_boundingBox_locals, sizeof(__pyx_k_ShapeCombiner_boundingBox_locals), 0, 0, 1, 1}, {&__pyx_n_s_ShapeCombiner_combineRects, __pyx_k_ShapeCombiner_combineRects, sizeof(__pyx_k_ShapeCombiner_combineRects), 0, 0, 1, 1}, {&__pyx_n_s_ShapeCombiner_combineRects_local, __pyx_k_ShapeCombiner_combineRects_local, sizeof(__pyx_k_ShapeCombiner_combineRects_local), 0, 0, 1, 1}, {&__pyx_n_s_ShapeCombiner_pointsToPoly, __pyx_k_ShapeCombiner_pointsToPoly, sizeof(__pyx_k_ShapeCombiner_pointsToPoly), 0, 0, 1, 1}, {&__pyx_n_s_ShapeCombiner_pointsToShape, __pyx_k_ShapeCombiner_pointsToShape, sizeof(__pyx_k_ShapeCombiner_pointsToShape), 0, 0, 1, 1}, + {&__pyx_n_s_ShapeCombiner_shapelyUnion, __pyx_k_ShapeCombiner_shapelyUnion, sizeof(__pyx_k_ShapeCombiner_shapelyUnion), 0, 0, 1, 1}, + {&__pyx_n_s_ShapeCombiner_union, __pyx_k_ShapeCombiner_union, sizeof(__pyx_k_ShapeCombiner_union), 0, 0, 1, 1}, + {&__pyx_n_s_ShapeCombiner_union_locals_genex, __pyx_k_ShapeCombiner_union_locals_genex, sizeof(__pyx_k_ShapeCombiner_union_locals_genex), 0, 0, 1, 1}, + {&__pyx_n_s_ShapeCombiner_union_locals_lambd, __pyx_k_ShapeCombiner_union_locals_lambd, sizeof(__pyx_k_ShapeCombiner_union_locals_lambd), 0, 0, 1, 1}, + {&__pyx_n_s_ShapeCombiner_union_locals_refor, __pyx_k_ShapeCombiner_union_locals_refor, sizeof(__pyx_k_ShapeCombiner_union_locals_refor), 0, 0, 1, 1}, {&__pyx_kp_u_Shape_2, __pyx_k_Shape_2, sizeof(__pyx_k_Shape_2), 0, 1, 0, 0}, {&__pyx_kp_s_Shape_3, __pyx_k_Shape_3, sizeof(__pyx_k_Shape_3), 0, 0, 1, 0}, {&__pyx_n_s_Shape___getitem, __pyx_k_Shape___getitem, sizeof(__pyx_k_Shape___getitem), 0, 0, 1, 1}, @@ -102556,7 +102561,6 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_Shape_toLines, __pyx_k_Shape_toLines, sizeof(__pyx_k_Shape_toLines), 0, 0, 1, 1}, {&__pyx_n_s_Shape_toPoints, __pyx_k_Shape_toPoints, sizeof(__pyx_k_Shape_toPoints), 0, 0, 1, 1}, {&__pyx_n_s_Shape_whereCollides, __pyx_k_Shape_whereCollides, sizeof(__pyx_k_Shape_whereCollides), 0, 0, 1, 1}, - {&__pyx_n_s_ShapelyUnion, __pyx_k_ShapelyUnion, sizeof(__pyx_k_ShapelyUnion), 0, 0, 1, 1}, {&__pyx_n_s_Shapes, __pyx_k_Shapes, sizeof(__pyx_k_Shapes), 0, 0, 1, 1}, {&__pyx_n_u_Shapes, __pyx_k_Shapes, sizeof(__pyx_k_Shapes), 0, 1, 0, 1}, {&__pyx_kp_s_Shapes_2, __pyx_k_Shapes_2, sizeof(__pyx_k_Shapes_2), 0, 0, 1, 0}, @@ -102839,8 +102843,8 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_point, __pyx_k_point, sizeof(__pyx_k_point), 0, 0, 1, 1}, {&__pyx_n_s_pointLike, __pyx_k_pointLike, sizeof(__pyx_k_pointLike), 0, 0, 1, 1}, {&__pyx_kp_s_pointLike_Iterable_pointLike, __pyx_k_pointLike_Iterable_pointLike, sizeof(__pyx_k_pointLike_Iterable_pointLike), 0, 0, 1, 0}, - {&__pyx_n_s_pointOnUnitCircle, __pyx_k_pointOnUnitCircle, sizeof(__pyx_k_pointOnUnitCircle), 0, 0, 1, 1}, - {&__pyx_n_u_pointOnUnitCircle, __pyx_k_pointOnUnitCircle, sizeof(__pyx_k_pointOnUnitCircle), 0, 1, 0, 1}, + {&__pyx_n_s_pointOnCircle, __pyx_k_pointOnCircle, sizeof(__pyx_k_pointOnCircle), 0, 0, 1, 1}, + {&__pyx_n_u_pointOnCircle, __pyx_k_pointOnCircle, sizeof(__pyx_k_pointOnCircle), 0, 1, 0, 1}, {&__pyx_kp_u_points, __pyx_k_points, sizeof(__pyx_k_points), 0, 1, 0, 0}, {&__pyx_n_s_pointsToPoly, __pyx_k_pointsToPoly, sizeof(__pyx_k_pointsToPoly), 0, 0, 1, 1}, {&__pyx_n_s_pointsToShape, __pyx_k_pointsToShape, sizeof(__pyx_k_pointsToShape), 0, 0, 1, 1}, @@ -102900,6 +102904,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_shapelyShape, __pyx_k_shapelyShape, sizeof(__pyx_k_shapelyShape), 0, 0, 1, 1}, {&__pyx_n_s_shapelyToColl, __pyx_k_shapelyToColl, sizeof(__pyx_k_shapelyToColl), 0, 0, 1, 1}, {&__pyx_n_u_shapelyToColl, __pyx_k_shapelyToColl, sizeof(__pyx_k_shapelyToColl), 0, 1, 0, 1}, + {&__pyx_n_s_shapelyUnion, __pyx_k_shapelyUnion, sizeof(__pyx_k_shapelyUnion), 0, 0, 1, 1}, {&__pyx_n_s_shapely_geometry, __pyx_k_shapely_geometry, sizeof(__pyx_k_shapely_geometry), 0, 0, 1, 1}, {&__pyx_n_s_shapely_ops, __pyx_k_shapely_ops, sizeof(__pyx_k_shapely_ops), 0, 0, 1, 1}, {&__pyx_n_s_shapes, __pyx_k_shapes, sizeof(__pyx_k_shapes), 0, 0, 1, 1}, @@ -102953,6 +102958,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_typs, __pyx_k_typs, sizeof(__pyx_k_typs), 0, 0, 1, 1}, {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1}, {&__pyx_n_s_unary_union, __pyx_k_unary_union, sizeof(__pyx_k_unary_union), 0, 0, 1, 1}, + {&__pyx_n_s_union, __pyx_k_union, sizeof(__pyx_k_union), 0, 0, 1, 1}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_vel, __pyx_k_vel, sizeof(__pyx_k_vel), 0, 0, 1, 1}, {&__pyx_n_s_velDiff, __pyx_k_velDiff, sizeof(__pyx_k_velDiff), 0, 0, 1, 1}, @@ -103288,14 +103294,14 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { /* "collisions.py":109 * return math.atan2(toPoint[1]-fromPoint[1], toPoint[0]-fromPoint[0]) * - * def pointOnUnitCircle(angle: Number, strength: Number=1) -> pointLike: # <<<<<<<<<<<<<< + * def pointOnCircle(angle: Number, strength: Number=1) -> pointLike: # <<<<<<<<<<<<<< * """ * Finds the point on the unit circle at a given angle with a given strength */ __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_s_angle, __pyx_n_s_strength); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_collisions_py, __pyx_n_s_pointOnUnitCircle, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_collisions_py, __pyx_n_s_pointOnCircle, 109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 109, __pyx_L1_error) __pyx_tuple__47 = PyTuple_Pack(1, ((PyObject *)__pyx_int_1)); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); @@ -105008,13 +105014,13 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * return Shapes(*shapes, *others) * * @staticmethod # <<<<<<<<<<<<<< - * def Union(*shapes: Shape) -> Shapes: # FIXME + * def union(*shapes: Shape) -> Shapes: # FIXME * """ */ __pyx_tuple__291 = PyTuple_Pack(31, __pyx_n_s_shapes, __pyx_n_s_reformat, __pyx_n_s_reformat, __pyx_n_s_reform, __pyx_n_s_outshps, __pyx_n_s_s, __pyx_n_s_colls, __pyx_n_s_i, __pyx_n_s_newpts, __pyx_n_s_oshps, __pyx_n_s_lns, __pyx_n_s_direc, __pyx_n_s_check, __pyx_n_s_checked, __pyx_n_s_ps, __pyx_n_s_j, __pyx_n_s_ln, __pyx_n_s_p1, __pyx_n_s_p2, __pyx_n_s_wheres, __pyx_n_s_other, __pyx_n_s_k, __pyx_n_s_ws, __pyx_n_s_s, __pyx_n_s_i, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_j, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s__138); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 2773, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__291); __Pyx_GIVEREF(__pyx_tuple__291); - __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 31, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_collisions_py, __pyx_n_s_Union, 2773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 2773, __pyx_L1_error) + __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 31, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_collisions_py, __pyx_n_s_union, 2773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 2773, __pyx_L1_error) /* "collisions.py":2842 * return Shapes(*outshps) @@ -105044,13 +105050,13 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * return shapelyToColl(shapely.concave_hull(shapelyGeom.MultiPoint([tuple(i) for i in points]), ratio=ratio)) * * @staticmethod # <<<<<<<<<<<<<< - * def ShapelyUnion(*shapes: Shape) -> Shape: + * def shapelyUnion(*shapes: Shape) -> Shape: * """ */ __pyx_tuple__297 = PyTuple_Pack(1, __pyx_n_s_shapes); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__297); __Pyx_GIVEREF(__pyx_tuple__297); - __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_collisions_py, __pyx_n_s_ShapelyUnion, 2897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(0, 2897, __pyx_L1_error) + __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_lib_collisions_py, __pyx_n_s_shapelyUnion, 2897, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(0, 2897, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -105701,22 +105707,22 @@ static int __Pyx_modinit_type_init_code(void) { } #endif #if CYTHON_USE_TYPE_SPECS - __pyx_ptype_10collisions___pyx_scope_struct_30_Union = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10collisions___pyx_scope_struct_30_Union_spec, NULL); if (unlikely(!__pyx_ptype_10collisions___pyx_scope_struct_30_Union)) __PYX_ERR(0, 2773, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10collisions___pyx_scope_struct_30_Union_spec, __pyx_ptype_10collisions___pyx_scope_struct_30_Union) < 0) __PYX_ERR(0, 2773, __pyx_L1_error) + __pyx_ptype_10collisions___pyx_scope_struct_30_union = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_10collisions___pyx_scope_struct_30_union_spec, NULL); if (unlikely(!__pyx_ptype_10collisions___pyx_scope_struct_30_union)) __PYX_ERR(0, 2773, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_10collisions___pyx_scope_struct_30_union_spec, __pyx_ptype_10collisions___pyx_scope_struct_30_union) < 0) __PYX_ERR(0, 2773, __pyx_L1_error) #else - __pyx_ptype_10collisions___pyx_scope_struct_30_Union = &__pyx_type_10collisions___pyx_scope_struct_30_Union; + __pyx_ptype_10collisions___pyx_scope_struct_30_union = &__pyx_type_10collisions___pyx_scope_struct_30_union; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_ptype_10collisions___pyx_scope_struct_30_Union) < 0) __PYX_ERR(0, 2773, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_ptype_10collisions___pyx_scope_struct_30_union) < 0) __PYX_ERR(0, 2773, __pyx_L1_error) #endif #if PY_MAJOR_VERSION < 3 - __pyx_ptype_10collisions___pyx_scope_struct_30_Union->tp_print = 0; + __pyx_ptype_10collisions___pyx_scope_struct_30_union->tp_print = 0; #endif #if !CYTHON_COMPILING_IN_LIMITED_API - if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_10collisions___pyx_scope_struct_30_Union->tp_dictoffset && __pyx_ptype_10collisions___pyx_scope_struct_30_Union->tp_getattro == PyObject_GenericGetAttr)) { - __pyx_ptype_10collisions___pyx_scope_struct_30_Union->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_10collisions___pyx_scope_struct_30_union->tp_dictoffset && __pyx_ptype_10collisions___pyx_scope_struct_30_union->tp_getattro == PyObject_GenericGetAttr)) { + __pyx_ptype_10collisions___pyx_scope_struct_30_union->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } #endif #if CYTHON_USE_TYPE_SPECS @@ -106388,9 +106394,9 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_u_direction); __Pyx_GIVEREF(__pyx_n_u_direction); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_direction)) __PYX_ERR(0, 21, __pyx_L1_error); - __Pyx_INCREF(__pyx_n_u_pointOnUnitCircle); - __Pyx_GIVEREF(__pyx_n_u_pointOnUnitCircle); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_pointOnUnitCircle)) __PYX_ERR(0, 21, __pyx_L1_error); + __Pyx_INCREF(__pyx_n_u_pointOnCircle); + __Pyx_GIVEREF(__pyx_n_u_pointOnCircle); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_pointOnCircle)) __PYX_ERR(0, 21, __pyx_L1_error); __Pyx_INCREF(__pyx_n_u_shapelyToColl); __Pyx_GIVEREF(__pyx_n_u_shapelyToColl); if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_shapelyToColl)) __PYX_ERR(0, 21, __pyx_L1_error); @@ -106518,7 +106524,7 @@ if (!__Pyx_RefNanny) { /* "collisions.py":109 * return math.atan2(toPoint[1]-fromPoint[1], toPoint[0]-fromPoint[0]) * - * def pointOnUnitCircle(angle: Number, strength: Number=1) -> pointLike: # <<<<<<<<<<<<<< + * def pointOnCircle(angle: Number, strength: Number=1) -> pointLike: # <<<<<<<<<<<<<< * """ * Finds the point on the unit circle at a given angle with a given strength */ @@ -106527,12 +106533,12 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_angle, __pyx_n_s_Number) < 0) __PYX_ERR(0, 109, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_strength, __pyx_n_s_Number) < 0) __PYX_ERR(0, 109, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_return, __pyx_n_s_pointLike) < 0) __PYX_ERR(0, 109, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_9pointOnUnitCircle, 0, __pyx_n_s_pointOnUnitCircle, NULL, __pyx_n_s_collisions, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_9pointOnCircle, 0, __pyx_n_s_pointOnCircle, NULL, __pyx_n_s_collisions, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__47); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pointOnUnitCircle, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pointOnCircle, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "collisions.py":122 @@ -110487,21 +110493,21 @@ if (!__Pyx_RefNanny) { * return Shapes(*shapes, *others) * * @staticmethod # <<<<<<<<<<<<<< - * def Union(*shapes: Shape) -> Shapes: # FIXME + * def union(*shapes: Shape) -> Shapes: # FIXME * """ */ __pyx_t_12 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_shapes, __pyx_n_s_Shape) < 0) __PYX_ERR(0, 2773, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_12, __pyx_n_s_return, __pyx_n_s_Shapes) < 0) __PYX_ERR(0, 2773, __pyx_L1_error) - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_13ShapeCombiner_5Union, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_ShapeCombiner_Union, NULL, __pyx_n_s_collisions, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2773, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_13ShapeCombiner_5union, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_ShapeCombiner_union, NULL, __pyx_n_s_collisions, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_12); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_Union, __pyx_t_12) < 0) __PYX_ERR(0, 2773, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_union, __pyx_t_12) < 0) __PYX_ERR(0, 2773, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; /* "collisions.py":2842 @@ -110580,21 +110586,21 @@ if (!__Pyx_RefNanny) { * return shapelyToColl(shapely.concave_hull(shapelyGeom.MultiPoint([tuple(i) for i in points]), ratio=ratio)) * * @staticmethod # <<<<<<<<<<<<<< - * def ShapelyUnion(*shapes: Shape) -> Shape: + * def shapelyUnion(*shapes: Shape) -> Shape: * """ */ __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_shapes, __pyx_n_s_Shape) < 0) __PYX_ERR(0, 2897, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_return, __pyx_n_s_Shape) < 0) __PYX_ERR(0, 2897, __pyx_L1_error) - __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_13ShapeCombiner_11ShapelyUnion, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_ShapeCombiner_ShapelyUnion, NULL, __pyx_n_s_collisions, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2897, __pyx_L1_error) + __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_10collisions_13ShapeCombiner_11shapelyUnion, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_ShapeCombiner_shapelyUnion, NULL, __pyx_n_s_collisions, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_ShapelyUnion, __pyx_t_7) < 0) __PYX_ERR(0, 2897, __pyx_L1_error) + if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_shapelyUnion, __pyx_t_7) < 0) __PYX_ERR(0, 2897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "collisions.py":2692 diff --git a/BlazeSudio/collisions/lib/collisions.py b/BlazeSudio/collisions/lib/collisions.py index c79cc198..afdc0bb0 100644 --- a/BlazeSudio/collisions/lib/collisions.py +++ b/BlazeSudio/collisions/lib/collisions.py @@ -22,7 +22,7 @@ 'rotate', 'rotateBy0', 'direction', - 'pointOnUnitCircle', + 'pointOnCircle', 'shapelyToColl', 'collToShapely', 'drawShape', @@ -106,7 +106,7 @@ def direction(fromPoint: pointLike, toPoint: pointLike) -> Number: """ return math.atan2(toPoint[1]-fromPoint[1], toPoint[0]-fromPoint[0]) -def pointOnUnitCircle(angle: Number, strength: Number=1) -> pointLike: +def pointOnCircle(angle: Number, strength: Number=1) -> pointLike: """ Finds the point on the unit circle at a given angle with a given strength