The "multi-shape" shape configuration. More...
#include <MultiShapeConf.hpp>
Public Member Functions | |
| MultiShapeConf & | AddConvexHull (const VertexSet &pointSet, NonNegative< Length > vertexRadius=GetDefaultVertexRadius()) noexcept |
Creates a convex hull from the given set of local points. The size of the set must be in the range [1, MaxShapeVertices]. More... | |
| MultiShapeConf & | Transform (const Mat22 &m) noexcept |
| Transforms the vertices of all the children by the given transformation matrix. More... | |
Public Member Functions inherited from playrho::d2::ShapeBuilder< MultiShapeConf > | |
| constexpr | ShapeBuilder ()=default |
| Default constructor. | |
| constexpr | ShapeBuilder (const BaseShapeConf &value) noexcept |
| Initializing constructor. | |
| constexpr MultiShapeConf & | UseFriction (NonNegative< Real > value) noexcept |
| Uses the given friction. | |
| constexpr MultiShapeConf & | UseRestitution (Finite< Real > value) noexcept |
| Uses the given restitution. | |
| constexpr MultiShapeConf & | UseDensity (NonNegative< AreaDensity > value) noexcept |
| Uses the given density. | |
Static Public Member Functions | |
| static constexpr NonNegative< Length > | GetDefaultVertexRadius () noexcept |
Gets the default vertex radius for the MultiShapeConf. | |
| static MultiShapeConf | GetDefaultConf () noexcept |
Gets the default configuration for a MultiShapeConf. | |
Public Attributes | |
| std::vector< ConvexHull > | children |
| Children. | |
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... | |
The "multi-shape" shape configuration.
Composes zero or more convex shapes into what can be a concave shape.
|
noexcept |
Creates a convex hull from the given set of local points. The size of the set must be in the range [1, MaxShapeVertices].
|
noexcept |
Transforms the vertices of all the children by the given transformation matrix.
Referenced by playrho::d2::Transform().