PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::d2::BaseShapeConf Struct Reference

Base configuration for initializing shapes. More...

#include <ShapeConf.hpp>

Inheritance diagram for playrho::d2::BaseShapeConf:
[legend]
Collaboration diagram for playrho::d2::BaseShapeConf:
[legend]

Public Attributes

NonNegative< Realfriction = NonNegative<Real>{Real{2} / Real{10}}
 Friction coefficient. More...
 
Finite< Realrestitution = Finite<Real>{0}
 Restitution (elasticity) of the associated shape. More...
 
NonNegative< AreaDensitydensity = NonNegative<AreaDensity>{0_kgpm2}
 Area density of the associated shape. More...
 

Detailed Description

Base configuration for initializing shapes.

Note
This is a nested base value class for initializing shapes.

Member Data Documentation

◆ density

NonNegative<AreaDensity> playrho::d2::BaseShapeConf::density = NonNegative<AreaDensity>{0_kgpm2}

Area density of the associated shape.

Note
This must be a non-negative value.
Use 0 to indicate that the shape's associated mass should be 0.

Referenced by playrho::d2::ChainShapeConf::GetMassData().

◆ friction

NonNegative<Real> playrho::d2::BaseShapeConf::friction = NonNegative<Real>{Real{2} / Real{10}}

Friction coefficient.

Note
This must be a value between 0 and +infinity. It is safer however to keep the value below the square root of the max value of a Real.
This is usually in the range [0,1].
The square-root of the product of this value multiplied by a touching fixture's friction becomes the friction coefficient for the contact.

◆ restitution

Finite<Real> playrho::d2::BaseShapeConf::restitution = Finite<Real>{0}

Restitution (elasticity) of the associated shape.

Note
This should be a valid finite value.
This is usually in the range [0,1].

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