Skip to content

Latest commit

History

114 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Bumpy - 2d geometry intersections library for Nim.

  • nimby install bumpy

Github Actions

API reference

About

Based on the book http://www.jeffreythompson.org/collision-detection/table_of_contents.php

Mostly used for vector 2d intersections checking for Pixie: https://github.com/treeform/pixie

Supported intersections:

ShapePointCircleRectangleSegmentPolygonLineWedge
Point
Circle
Rectangle
Segment
Polygon
Line
Wedge

All shapes support overlaps.

ifoverlaps(circle, point):
echo"Circle and point overlap"
ifcontains(circle, point):
echo"Circle contains point"

And some shapes support intersects functions.

var at: Vec2ifintersects(circle, segment, at):
echo"Circle and segment intersect at ", at
var at: Vec2ifintersects(circle, polygon, at):
echo"Circle and polygon intersect at ", at

About

2d collision library for Nim.

Resources

Stars

45 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

Generated from treeform/nimtemplate