Skip to content

treeform/bumpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

113 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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:

Shape Point Circle Rectangle Segment Polygon Line Wedge
Point
Circle
Rectangle
Segment
Polygon
Line
Wedge

All shapes support overlaps.

if overlaps(circle, point):
  echo "Circle and point overlap"
if contains(circle, point):
  echo "Circle contains point"

And some shapes support intersects functions.

var at: Vec2
if intersects(circle, segment, at):
  echo "Circle and segment intersect at ", at
var at: Vec2
if intersects(circle, polygon, at):
  echo "Circle and polygon intersect at ", at

About

2d collision library for Nim.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages