Fixture definition. More...
#include <FixtureConf.hpp>
Public Member Functions | |
| FixtureConf & | UseShape (Shape value) noexcept |
| Uses the given value for the shape member variable. | |
| template<typename T , typename Tp = std::decay_t<T>, typename = std::enable_if_t<!std::is_same<Tp, Shape>::value && std::is_copy_constructible<Tp>::value>> | |
| FixtureConf & | UseShape (T &&value) noexcept |
| Uses the given value for the configuration of the shape member variable. More... | |
| FixtureConf & | UseBody (BodyID value) noexcept |
| Uses the given value for the body member variable. | |
| FixtureConf & | UseIsSensor (bool value) noexcept |
| Uses the given sensor state value. | |
| FixtureConf & | UseFilter (Filter value) noexcept |
| Uses the given filter value. | |
Public Attributes | |
| Shape | shape |
| Shape to give the fixture. | |
| Filter | filter |
| Contact filtering data. | |
| BodyID | body = InvalidBodyID |
| Identifier of body to associate the fixture with. | |
| bool | isSensor = false |
| A sensor shape collects contact information but never generates a collision response. | |
Related Functions | |
(Note that these are not member functions.) | |
| bool | operator== (const FixtureConf &lhs, const FixtureConf &rhs) |
| Operator equals. | |
| bool | operator!= (const FixtureConf &lhs, const FixtureConf &rhs) |
| Operator not-equals. | |
| BodyID | GetBody (const FixtureConf &conf) noexcept |
| Gets the body of the given configuration. | |
| const Shape & | GetShape (const FixtureConf &conf) noexcept |
| Gets the shape of the given configuration. | |
| NonNegative< AreaDensity > | GetDensity (const FixtureConf &conf) noexcept |
| Gets the density of the given configuration. | |
| Real | GetFriction (const FixtureConf &conf) noexcept |
| Gets the friction of the given configuration. | |
| Real | GetRestitution (const FixtureConf &conf) noexcept |
| Gets the restitution of the given configuration. | |
| bool | IsSensor (const FixtureConf &conf) noexcept |
| Gets whether or not the given configuration is a sensor. | |
| void | SetSensor (FixtureConf &conf, bool value) noexcept |
| Sets whether or not the given configuration is a sensor. | |
| Filter | GetFilterData (const FixtureConf &conf) noexcept |
| Gets the filter-data of the given configuration. | |
| void | SetFilterData (FixtureConf &conf, Filter value) noexcept |
| Sets the filter-data of the given configuration. | |
| bool | ShouldCollide (const FixtureConf &fixtureA, const FixtureConf &fixtureB) noexcept |
| Whether contact calculations should be performed between the two fixtures. More... | |
| Real | GetDefaultFriction (const FixtureConf &fixtureA, const FixtureConf &fixtureB) |
| Gets the default friction amount for the given fixtures. | |
| Real | GetDefaultRestitution (const FixtureConf &fixtureA, const FixtureConf &fixtureB) |
| Gets the default restitution amount for the given fixtures. | |
Fixture definition.
A fixture is used to attach a shape to a body for collision detection. A fixture inherits its transform from its body. Fixtures hold additional non-geometric data such as collision filters, etc.
|
inlinenoexcept |
Uses the given value for the configuration of the shape member variable.
This is a convenience function for allowing limited implicit conversions to shapes.
|
related |
Whether contact calculations should be performed between the two fixtures.
true if contact calculations should be performed between these two fixtures; false otherwise.