ChipmunkPhysics2D: Rework RigidBody2D

This commit is contained in:
SirLynix
2023-08-07 18:17:00 +02:00
parent 8eef44ff76
commit 32f8141bd8
13 changed files with 287 additions and 203 deletions

View File

@@ -27,7 +27,7 @@ namespace Nz
ChipmunkCollider2D::~ChipmunkCollider2D() = default;
void ChipmunkCollider2D::ForEachPolygon(const std::function<void(const Vector2f* vertices, std::size_t vertexCount)>& callback) const
void ChipmunkCollider2D::ForEachPolygon(const FunctionRef<void(const Vector2f* vertices, std::size_t vertexCount)>& callback) const
{
// Currently, the only way to get only the polygons of a shape is to create a temporary cpSpace containing only this shape
// A better way to do this would be to reimplement this function in every subclass type in the very same way chipmunk does