Fixed ellipse and rectangle colliders

This commit is contained in:
Yousef Khadadeh 2026-05-25 16:53:42 +03:00
parent c12cd14f6e
commit abfc259bc9
6 changed files with 91 additions and 13 deletions

View file

@ -51,6 +51,8 @@ class EllipseCanvasComponent : public CanvasComponent {
virtual bool collides_within_coords_point(const Vector2f& checkAgainst) const override;
virtual bool collides_within_coords_skpath(const SkPath& checkAgainst) const override;
virtual SCollision::AABB<float> get_obj_coord_bounds() const override;
void create_collider();
void create_triangles(const std::function<bool(Vector2f, Vector2f, Vector2f)>& passTriangleFunc);
SkPath colliderPath;
SkPath ellipsePath;
};