|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Properties regarding the dynamics of an object. More...
#include <GREM/physics/objects.hpp>
Public Types | |
| enum class | FrictionCombine : uint8_t { AVERAGE = 0 , MINIMUM = 1 , MAXIMUM = 2 , MULTIPLY = 3 } |
| Friction combination mode. More... | |
| enum class | RestitutionCombine : uint8_t { AVERAGE = 0 , MINIMUM = 1 , MAXIMUM = 2 , MULTIPLY = 3 } |
| Restitution combination mode. More... | |
Public Member Functions | |
| constexpr bool | operator== (const Material &other) const noexcept=default |
| Compare this material to another for equality. | |
Public Attributes | |
| Coefficient | staticFriction = static_cast<Scalar>(0.8) |
| Coefficient of static friction of the object. | |
| Coefficient | kineticFriction = static_cast<Scalar>(0.707) |
| Coefficient of kinetic friction of the object. | |
| Coefficient | rollingResistance = static_cast<Scalar>(0.01) |
| Coefficient of rolling resistance of the object. | |
| Coefficient | restitution = Scalar{0.5} |
| Coefficient of restitution of the object. | |
| Coefficient | linearDrag = Scalar{0.5} |
| Linear drag coefficient of the object. | |
| Coefficient | angularDrag = Scalar{0.5} |
| Angular drag coefficient of the object. | |
| FrictionCombine | frictionCombine = FrictionCombine::MINIMUM |
| How to combine the friction when this object collides with another. | |
| RestitutionCombine | restitutionCombine = RestitutionCombine::MAXIMUM |
| How to combine the restitution when this object collides with another. | |
Properties regarding the dynamics of an object.
|
strong |
Friction combination mode.
When two objects collide, the friction combination mode with the lowest value of the two is used.
| Enumerator | |
|---|---|
| AVERAGE | The two values are averaged. |
| MINIMUM | The smallest of the two values is used. |
| MAXIMUM | The largest of the two values is used. |
| MULTIPLY | The two values are multiplied with each other. |
|
strong |
Restitution combination mode.
When two objects collide, the restitution combination mode with the lowest value of the two is used.
| Enumerator | |
|---|---|
| AVERAGE | The two values are averaged. |
| MINIMUM | The smallest of the two values is used. |
| MAXIMUM | The largest of the two values is used. |
| MULTIPLY | The two values are multiplied with each other. |
|
nodiscardconstexprdefaultnoexcept |
Compare this material to another for equality.
| other | the material to compare this one to. |
| Coefficient grem::physics::Material::staticFriction = static_cast<Scalar>(0.8) |
Coefficient of static friction of the object.
Must be non-negative.
| Coefficient grem::physics::Material::kineticFriction = static_cast<Scalar>(0.707) |
Coefficient of kinetic friction of the object.
Must be non-negative.
| Coefficient grem::physics::Material::rollingResistance = static_cast<Scalar>(0.01) |
Coefficient of rolling resistance of the object.
Must be non-negative.
| Coefficient grem::physics::Material::restitution = Scalar{0.5} |
Coefficient of restitution of the object.
Must be between 0 and 1 (inclusive).
| Coefficient grem::physics::Material::linearDrag = Scalar{0.5} |
Linear drag coefficient of the object.
Must be non-negative.
| Coefficient grem::physics::Material::angularDrag = Scalar{0.5} |
Angular drag coefficient of the object.
Must be non-negative.
| FrictionCombine grem::physics::Material::frictionCombine = FrictionCombine::MINIMUM |
How to combine the friction when this object collides with another.
| RestitutionCombine grem::physics::Material::restitutionCombine = RestitutionCombine::MAXIMUM |
How to combine the restitution when this object collides with another.