playrho::d2::ShapeBuilder< ConcreteConf > Struct Template Reference
Builder configuration structure. More...
#include <ShapeConf.hpp>
Public Member Functions | |
PLAYRHO_CONSTEXPR | ShapeBuilder ()=default |
Default constructor. More... | |
PLAYRHO_CONSTEXPR | ShapeBuilder (const BaseShapeConf &value) noexcept |
Initializing constructor. More... | |
PLAYRHO_CONSTEXPR ConcreteConf & | UseFriction (NonNegative< Real > value) noexcept |
Uses the given friction. More... | |
PLAYRHO_CONSTEXPR ConcreteConf & | UseRestitution (Finite< Real > value) noexcept |
Uses the given restitution. More... | |
PLAYRHO_CONSTEXPR ConcreteConf & | UseDensity (NonNegative< AreaDensity > value) noexcept |
Uses the given density. More... | |
Additional Inherited Members | |
Public Attributes inherited from playrho::d2::BaseShapeConf | |
NonNegative< Real > | friction = NonNegative<Real>{Real{2} / Real{10}} |
Friction coefficient. More... | |
Finite< Real > | restitution = Finite<Real>{0} |
Restitution (elasticity) of the associated shape. More... | |
NonNegative< AreaDensity > | density = NonNegative<AreaDensity>{0_kgpm2} |
Area density of the associated shape. More... | |
Detailed Description
template<typename ConcreteConf>
struct playrho::d2::ShapeBuilder< ConcreteConf >
Builder configuration structure.
This is a builder structure of chainable methods for building a shape configuration.
- Note
- This is a templated nested value class for initializing shapes that uses the Curiously Recurring Template Pattern (CRTP) to provide method chaining via static polymorphism.
Definition at line 69 of file ShapeConf.hpp.
Constructor & Destructor Documentation
◆ ShapeBuilder() [1/2]
template<typename ConcreteConf >
|
inlinedefault |
Default constructor.
◆ ShapeBuilder() [2/2]
template<typename ConcreteConf >
|
inlineexplicitnoexcept |
Initializing constructor.
Definition at line 77 of file ShapeConf.hpp.
Member Function Documentation
◆ UseFriction()
template<typename ConcreteConf >
|
inlinenoexcept |
Uses the given friction.
Definition at line 95 of file ShapeConf.hpp.
◆ UseRestitution()
template<typename ConcreteConf >
|
inlinenoexcept |
Uses the given restitution.
Definition at line 103 of file ShapeConf.hpp.
◆ UseDensity()
template<typename ConcreteConf >
|
inlinenoexcept |
Uses the given density.
Definition at line 111 of file ShapeConf.hpp.
The documentation for this struct was generated from the following file:
- Collision/Shapes/ShapeConf.hpp