37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
"""Pygame-freie 2D-Physik-Engine.
|
||
|
||
Die Physik verwendet ausschließlich das Standardmodul ``math`` (plus ``typing`` und
|
||
``dataclasses`` für Typangaben und Datenstrukturen). Ein Architektur-Test stellt sicher,
|
||
dass hier nie pygame oder eine andere Bibliothek importiert wird.
|
||
|
||
Wichtigste Bausteine:
|
||
|
||
* :class:`Vector2` – eigene Vektorklasse.
|
||
* :class:`Circle`, :class:`Box`, :class:`HalfPlane` – Formen.
|
||
* :class:`Body`, :class:`Material` – starre Körper.
|
||
* :class:`World` – verwaltet Körper und führt Simulationsschritte aus.
|
||
* :class:`FixedTimestep` – übersetzt Frame-Zeiten in feste Physikschritte.
|
||
"""
|
||
|
||
from sandbox.physics.body import Body, Material
|
||
from sandbox.physics.collision import Contact, collide
|
||
from sandbox.physics.shapes import Box, Circle, HalfPlane, Shape
|
||
from sandbox.physics.timestep import FixedTimestep
|
||
from sandbox.physics.vector import ZERO, Vector2
|
||
from sandbox.physics.world import World
|
||
|
||
__all__ = [
|
||
"ZERO",
|
||
"Body",
|
||
"Box",
|
||
"Circle",
|
||
"Contact",
|
||
"FixedTimestep",
|
||
"HalfPlane",
|
||
"Material",
|
||
"Shape",
|
||
"Vector2",
|
||
"World",
|
||
"collide",
|
||
]
|