Overview of QuarkPhysics features
masterQuarkPhysics is a 2D physics engine designed for video games. It provides a unified approach to simulating rigid bodies and soft bodies using a simple and consistent API. Key capabilities include:
General Physics
- Shapes & Properties: Supports primitive shapes (circle, polygon, rectangle, etc.) and physical properties like mass, area, and restitution.
- Collision Management: Features raycasting, collision layer masks for filtering, and SAP (Sweep and Prune) for broadphase.
- Performance: Supports sleeping islands to reduce CPU load.
- Units: Uses pixels directly as the unit of measurement without additional abstractions.
- Rendering Support: Supports UV mapping via QMesh for rendering operations.
Rigid Bodies
- Geometry: Supports convex polygons and unlimited shape-mesh support.
- Connectivity: Supports joints to connect bodies.
- Body Types: Includes Kinematic bodies (for controllable objects) and Area bodies (for collision detection/reporting).
- Stability: Designed for reasonable stability when stacking objects.
Soft Bodies
- Models: Uses mass-spring and area-volume preserving models with PBD (Position Based Dynamics).
- Connectivity: Uses springs to connect particles and supports internal springs/particles for complexity.
- Features: Supports shape matching, self-collisions, and customizable constraints.