-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbolt.pyi
More file actions
89 lines (80 loc) · 4.22 KB
/
bolt.pyi
File metadata and controls
89 lines (80 loc) · 4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
from typing import List, Tuple, Optional, Any, Sequence, TypeAlias
from typing_extensions import Protocol
class ShapeProtocol(Protocol):
pass
class Circle(ShapeProtocol):
x: float
y: float
radius: float
def __init__(self, x: float, y: float, radius: float) -> None: ...
class Square(ShapeProtocol):
x: float
y: float
radius: float
angle: float
def __init__(self, x: float, y: float, radius: float, angle: float) -> None: ...
class OrientedRectangle(ShapeProtocol):
x: float
y: float
width: float
height: float
angle: float
def __init__(self, x: float, y: float, width: float, height: float, angle: float) -> None: ...
class Rectangle(ShapeProtocol):
def __init__(self, x: float, y: float, width: float, height: float) -> None: ...
@property
def x(self) -> float: ...
@x.setter
def x(self, value: float) -> None: ...
@property
def y(self) -> float: ...
@y.setter
def y(self, value: float) -> None: ...
@property
def width(self) -> float: ...
@property
def height(self) -> float: ...
def left(self) -> float: ...
def right(self) -> float: ...
def top(self) -> float: ...
def bottom(self) -> float: ...
def top_left(self) -> Tuple[float, float]: ...
def top_right(self) -> Tuple[float, float]: ...
def bottom_left(self) -> Tuple[float, float]: ...
def bottom_right(self) -> Tuple[float, float]: ...
def distance_to_point(self, x: float, y: float) -> float: ...
def contains_circle(self, x: float, y: float, radius: float) -> bool: ...
def contains_point(self, x: float, y: float) -> bool: ...
def expand_to_include(self, other: 'Rectangle') -> None: ...
def copy(self) -> 'Rectangle': ...
class collisions:
@staticmethod
def get_mtv(entity: ShapeProtocol, colliding_polys: Sequence[ShapeProtocol]) -> Optional[Tuple[float, float]]: ...
class QuadTree:
def __init__(self, bounding_box: Rectangle) -> None: ...
@staticmethod
def new_with_config(bounding_box: Rectangle, config: Config) -> QuadTree: ...
def insert(self, value: int, shape: ShapeProtocol, entity_type: Optional[int] = None) -> None: ...
def insert_rect_extent(self, value: int, min_x: float, min_y: float, max_x: float, max_y: float, entity_type: Optional[int] = None) -> None: ...
def insert_circle_raw(self, value: int, x: float, y: float, radius: float, entity_type: Optional[int] = None) -> None: ...
def delete(self, value: int) -> None: ...
def collisions(self, shape: ShapeProtocol) -> List[int]: ...
def collisions_filter(self, shape: ShapeProtocol, entity_types: Optional[List[int]] = None) -> List[int]: ...
def collisions_rect_extent(self, min_x: float, min_y: float, max_x: float, max_y: float) -> List[int]: ...
def collisions_circle_raw(self, x: float, y: float, radius: float) -> List[int]: ...
def collisions_batch(self, shapes: List[ShapeProtocol]) -> List[List[int]]: ...
def collisions_batch_filter(self, shapes: List[ShapeProtocol], entity_types: Optional[List[int]] = None) -> List[List[int]]: ...
def relocate(self, value: int, shape: ShapeProtocol, entity_type: Optional[int] = None) -> None: ...
def relocate_rect_extent(self, value: int, min_x: float, min_y: float, max_x: float, max_y: float, entity_type: Optional[int] = None) -> None: ...
def relocate_circle_raw(self, value: int, x: float, y: float, radius: float, entity_type: Optional[int] = None) -> None: ...
def relocate_batch(self, relocation_requests: List[Tuple[int, ShapeProtocol, Optional[int]]]) -> None: ...
def all_node_bounding_boxes(self) -> List[Tuple[float, float, float, float]]: ...
def all_shapes(self) -> List[ShapeProtocol]: ...
class Config:
def __init__(self, pool_size: int, node_capacity: int, max_depth: int, min_size: Optional[float] = None, looseness: Optional[float] = None, large_entity_threshold_factor: Optional[float] = None, auto_expand_bounds: Optional[bool] = None) -> None: ...
class DiffFieldSet:
def __init__(self, field_types: List[int], field_defaults: List[Any]) -> None: ...
def update(self, updates: List[Any]) -> None: ...
def has_changed(self) -> bool: ...
def get_diff(self) -> List[Tuple[int, Any]]: ...
def get_all(self) -> List[Tuple[int, Any]]: ...