Metadata-Version: 2.1
Name: PolygonCollision
Version: 0.0.1
Summary: A simple python collision dectection tool
Author: made-up
Project-URL: Homepage, https://github.com/vertmit/PolygonCollision
Project-URL: Bug Tracker, https://github.com/vertmit/PolygonCollision/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=2.7
Description-Content-Type: text/markdown

PolygonCollision is a Python module designed for efficient collision detection between 2D polygons. Using the Separating Axis Theorem (SAT), this library enables precise detection of intersections between polygons, making it an essential tool for game developers, simulations, and applications requiring accurate collision detection between shapes.

# Features:
Polygon Collision Detection: Determine whether two 2D polygons overlap with accurate collision detection algorithms.
Customizable Shapes: Define custom 2D shapes by specifying their vertices as Vector objects.
Efficient Algorithm: Implementing the Separating Axis Theorem (SAT) ensures fast and reliable collision detection for complex polygons.

# How It Works:
The library checks for collisions by projecting the shapes onto various axes and checking if the projections overlap. If there is no axis along which the projections of the two shapes do not overlap, they are colliding.

# Code Examples:
```Python
from PolygonCollision import shape

#Create 2 squares
polygon1=shape.Shape(vertices=[(0,0),(0,20),(20,20),(20,0)]) #x:0 y:0, size 20
polygon2=shape.Shape(vertices=[(10,10),(10,30),(30,30),(30,10)], fill=False) #x:10 y:10, size 20, outline shape

#Create circle
circle=shape.Shape(vertices=[(30,30)],radius=10) #x:30 y:30, radius 10

if polygon1.collide(polygon2): #Check if polygon2 is touching polygon1 (True)
    print("POLYGON COLLISION!!!")
else:
    print("no polygon collision")

if polygon1.collide(circle): #Check if circle is touching polygon1 (False)
    print("CIRCLE COLLISION!!!")
else:
    print("no circle collision")
```
Output
```Output
POLYGON COLLISION!!!
no circle collision
```
# License:
This Collision Detection Library is licensed under the MIT License - see the LICENSE file for details.
