Soft2D
A 2D multi-material continuum physics engine designed for real-time applications.
|
#include <soft2d_core.h>
Public Attributes | |
S2CollisionType | collision_type |
Collision's type. | |
float | friction_coeff |
float | restitution_coeff |
Structure S2CollisionParameter
Colliders' collision parameters. Indicates a particle's behavior when colliding with the collider.
float S2CollisionParameter::friction_coeff |
The coefficient of friction. A common range is [0, 1]. Higher values of friction_coeff
result in increased loss of velocity when particles 'slide' across the collider's surface.
float S2CollisionParameter::restitution_coeff |
The coefficient of restitution. A common range is [0, 1]. Higher values of restitution_coeff
give particles a greater 'bounce' speed when they collide with the collider.