Releases: hamaluik/headbutt
Releases · hamaluik/headbutt
Static pure function interface
Added
- Added
TestResult
type which is returned fromtest()
and can be checked directly
for collisions or passed tointersect()
to further calculate an intersection - Added
IntersectResult
type which is returned fromintersect()
and can be used
to calculate collision normals, separation distances, etc - Added
Headbutt.testAndIntersect()
function which is a shortcut for testing and
then calculating the intersection if a collision is found
Changed
- Changed
Headbutt
interface from interacting with an object with internal state
to static pure functions (i.e. callHeadbutt.test()
instead ofnew Headbutt().test()
)
Shape Transforms
Added
- Added transformation support to all provided shape classes
- Added tests for most shapes (not lines)
- Added tests for transformed shape collision calculations
- Added API documentation to all public interfaces
Changed
- Changed
Shape.origin
getter/setter to a singleShape.centre
getter - Changed shape contructors to align with using transforms instead of an initial offset
Normalized Shape API
Added
- Added 3D shapes
- Added 2D shapes
- Added some API documentation
Changed
- Split 2D and 3D into their own packages:
headbutt.twod
andheadbutt.threed
- Changed
Shape.centre
toShape.origin
Initial release
- 2D shape collision checking
- 2D shape intersection calculations
- 3D shape collision checking