C++ 2D 像素完美碰撞检测库?
有哪些库可以与 SDL 和 QT4 集成来执行此操作。 SDL 或 QT 中是否有任何现有的包可以轻松实现这一点?我正在寻找一个易于使用的库,它可以让我拥有这样的功能
我正在寻找指向 Api/类示例/教程的链接,该链接在您指定的库中实现了像素完美的碰撞检测。
编辑:请检查上面的链接 明白我所说的像素是什么意思 完美。
what are the libraries available to do this which integrate with SDL and QT4 . Are there any existing packages in SDL or QT which allow for easy implementation of this?. I am looking for for an easy to use library that would allow me to have a functionality like this
a link to the Api/class example/tutorial which implements pixel-perfect collision detection in your stated library is what i am looking for.
Edit: Please check the above link to
understand what i mean by pixel
perfect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Qt 在其 QGraphicsItem 类中提供了碰撞测试。它支持基于路径的形状。我不确定它是否符合您的像素要求。
Qt does provide collision test in its QGraphicsItem class. It supoorts path-based shapes. I am not sure if it works with your pixel requirement.
看看这个GameDev 相关帖子(Reni2D 是带有 OpenGL 的 C 语言,因此它应该适合 SDL)。
在 HAAF 的 引擎中,他们宣传它即将推出,所以也许也值得一试。
Take a look at this GameDev related post(Reni2D is C with OpenGL so it should fit OK with SDL).
In HAAF's engine they advertise it as coming soon, so maybe it's worth checking it out also.
我向您推荐这个 Allegro 完美碰撞
Allegro.cc 拥有一个非常有帮助的社区。
祝你好运!
I recomend you this Allegro Perfect Collision
Allegro.cc has a great helpful comunity.
Good luck!
PoxelColl 提供像素完美的碰撞检测,并支持旋转和缩放等基本变换。支持C++11端口,因此它应该与SDL和QT兼容。
PoxelColl provides pixel-perfect collision detection, and supports basic transformations like rotation and scaling. A C++11 port is supported, so it should be compatible with SDL and QT.