Soft2D
A 2D multi-material continuum physics engine designed for real-time applications.
Loading...
Searching...
No Matches
S2CollisionParameter Struct Reference

#include <soft2d_core.h>

Public Attributes

S2CollisionType collision_type
 Collision's type.
 
float friction_coeff
 
float restitution_coeff
 

Detailed Description

Structure S2CollisionParameter

Colliders' collision parameters. Indicates a particle's behavior when colliding with the collider.

Member Data Documentation

◆ friction_coeff

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.

◆ restitution_coeff

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.


The documentation for this struct was generated from the following file: