The "multi-shape" shape configuration. More...
#include <MultiShapeConf.hpp>
Public Member Functions | |
MultiShapeConf () | |
MultiShapeConf & | AddConvexHull (const VertexSet &pointSet, NonNegative< Length > vertexRadius=GetDefaultVertexRadius()) noexcept |
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 > | |
PLAYRHO_CONSTEXPR | ShapeBuilder ()=default |
Default constructor. More... | |
PLAYRHO_CONSTEXPR | ShapeBuilder (const BaseShapeConf &value) noexcept |
Initializing constructor. More... | |
PLAYRHO_CONSTEXPR MultiShapeConf & | UseFriction (NonNegative< Real > value) noexcept |
Uses the given friction. More... | |
PLAYRHO_CONSTEXPR MultiShapeConf & | UseRestitution (Finite< Real > value) noexcept |
Uses the given restitution. More... | |
PLAYRHO_CONSTEXPR MultiShapeConf & | UseDensity (NonNegative< AreaDensity > value) noexcept |
Uses the given density. More... | |
Static Public Member Functions | |
static PLAYRHO_CONSTEXPR NonNegative< Length > | GetDefaultVertexRadius () noexcept |
Gets the default vertex radius for the MultiShapeConf . More... | |
static MultiShapeConf | GetDefaultConf () noexcept |
Gets the default configuration for a MultiShapeConf . More... | |
Public Attributes | |
std::vector< ConvexHull > | children |
Children. More... | |
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
The "multi-shape" shape configuration.
Composes zero or more convex shapes into what can be a concave shape.
Definition at line 111 of file MultiShapeConf.hpp.
Constructor & Destructor Documentation
◆ MultiShapeConf()
|
inline |
Definition at line 125 of file MultiShapeConf.hpp.
Member Function Documentation
◆ GetDefaultVertexRadius()
|
inlinestaticnoexcept |
Gets the default vertex radius for the MultiShapeConf
.
Definition at line 114 of file MultiShapeConf.hpp.
◆ GetDefaultConf()
|
inlinestaticnoexcept |
Gets the default configuration for a MultiShapeConf
.
Definition at line 120 of file MultiShapeConf.hpp.
◆ AddConvexHull()
|
noexcept |
Creates a convex hull from the given set of local points. The size of the set must be in the range [1, MaxShapeVertices
].
- Warning
- the points may be re-ordered, even if they form a convex polygon
- collinear points are handled but not removed. Collinear points may lead to poor stacking behavior.
Definition at line 92 of file MultiShapeConf.cpp.
◆ Transform()
|
noexcept |
Transforms the vertices of all the children by the given transformation matrix.
Definition at line 99 of file MultiShapeConf.cpp.
Member Data Documentation
◆ children
std::vector<ConvexHull> playrho::d2::MultiShapeConf::children |
Children.
Definition at line 143 of file MultiShapeConf.hpp.
The documentation for this struct was generated from the following files:
- Collision/Shapes/MultiShapeConf.hpp
- Collision/Shapes/MultiShapeConf.cpp