Skip to content
Finds the convex hull of a transparent png and outputs it as a lua table
C++ Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.clang-format
.gitignore
LICENSE
Makefile
README.md
huller.cpp

README.md

huller

Simple cli util to find the convex hull of a transparent png and output it as a lua table of x/y coordinates. Useful for making collision shapes for for sprites.

Adapted from the opencv convex hull example: http://docs.opencv.org/3.0-beta/doc/tutorials/imgproc/shapedescriptors/hull/hull.html

Dependencies

Compiling

make

Using

./huller path/to/sprite.png > sprite.lua

sprite.lua will contain a lua module you can require and to have a table of x/y coordinates of a convex hull shape for the sprite image.

This is useful for working with a collision library like HC

You can’t perform that action at this time.