-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbolt.pyi
73 lines (65 loc) · 3.13 KB
/
bolt.pyi
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
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 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 get_random_circle_coords_inside(self, radius: float, rng: 'Rng') -> Tuple[float, float]: ...
def copy(self) -> 'Rectangle': ...
class Rng:
def __init__(self) -> None: ...
def seed_rng(self, seed: int) -> None: ...
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 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_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_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) -> 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]]: ...