ReactPhysics3D
v0.10.2
C++ Physics engine library
|
This class contains the material properties of a collider that will be use for the dynamics simulation like the friction coefficient or the bounciness of the rigid body. More...
#include <include/reactphysics3d/engine/Material.h>
Public Member Functions | |
decimal | getBounciness () const |
Return the bounciness. | |
void | setBounciness (decimal bounciness) |
Set the bounciness. | |
decimal | getFrictionCoefficient () const |
Return the friction coefficient. | |
void | setFrictionCoefficient (decimal frictionCoefficient) |
Set the friction coefficient. | |
decimal | getFrictionCoefficientSqrt () const |
Return the square root friction coefficient. | |
decimal | getMassDensity () const |
Return the mass density of the collider. | |
void | setMassDensity (decimal massDensity) |
Set the mass density of the collider. | |
std::string | to_string () const |
Return a string representation for the material. | |
This class contains the material properties of a collider that will be use for the dynamics simulation like the friction coefficient or the bounciness of the rigid body.
RP3D_FORCE_INLINE decimal reactphysics3d::Material::getBounciness | ( | ) | const |
Return the bounciness.
RP3D_FORCE_INLINE decimal reactphysics3d::Material::getFrictionCoefficient | ( | ) | const |
Return the friction coefficient.
RP3D_FORCE_INLINE void reactphysics3d::Material::setBounciness | ( | decimal | bounciness | ) |
Set the bounciness.
The bounciness should be a value between 0 and 1.
The value 1 is used for a very bouncy body and zero is used for a body that is not bouncy at all.
bounciness | Bounciness factor (between 0 and 1) where 1 is very bouncy |
RP3D_FORCE_INLINE void reactphysics3d::Material::setFrictionCoefficient | ( | decimal | frictionCoefficient | ) |
Set the friction coefficient.
The friction coefficient has to be a positive value.
The value zero is used for no friction at all.
frictionCoefficient | Friction coefficient (positive value) |
RP3D_FORCE_INLINE void reactphysics3d::Material::setMassDensity | ( | decimal | massDensity | ) |
Set the mass density of the collider.
massDensity | The mass density of the collider |