PlayRho  2.0.0
An interactive physics engine & library.
playrho::d2::part Namespace Reference

Classes

class  Compositor
 A class template for compositing shaped part types eligible for use with classes like the playrho::d2::Shape class. More...
 
struct  DefaultPolicies
 Default policy class implementations for the Compositor host class template. More...
 
struct  DefaultPolicyArgs
 Default policy arguments for the Compositor template class. More...
 
struct  DensityIs
 Sets the implementing class of the Compositor density policy. More...
 
struct  Discriminator
 "Discriminator" for named template arguments. More...
 
struct  DynamicAreaDensity
 Dynamic area density policy class. More...
 
struct  DynamicFilter
 Dynamic filter policy class. More...
 
struct  DynamicFriction
 Dynamic friction. More...
 
class  DynamicRectangle
 Dynamic rectangle. More...
 
struct  DynamicRestitution
 Dynamic restitution policy class. More...
 
struct  DynamicSensor
 Dynamic sensor policy class. More...
 
struct  FilterIs
 Sets the implementing class of the Compositor filter policy. More...
 
struct  FrictionIs
 Sets the implementing class of the Compositor friction policy. More...
 
struct  GeometryIs
 Sets the implementing class of the Compositor geometry policy. More...
 
struct  PolicySelector
 Policy selector for named template arguments for the Compositor host class template. More...
 
struct  RestitutionIs
 Sets the implementing class of the Compositor restitution policy. More...
 
struct  SensorIs
 Sets the implementing class of the Compositor sensor policy. More...
 
struct  StaticAreaDensity
 Static area density policy class. More...
 
struct  StaticFilter
 Static filter policy class. More...
 
struct  StaticFriction
 Static friction. More...
 
class  StaticRectangle
 Static rectangle. More...
 
struct  StaticRestitution
 Static restitution policy class. More...
 
struct  StaticSensor
 Static sensor policy class. More...
 
struct  StaticTenthsFriction
 Static tenths friction. More...
 

Functions

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto GetChild (const Compositor< P1, P2, P3, P4, P5, P6 > &arg, ChildCounter index) noexcept(noexcept(arg.GetChild(index))) -> decltype(arg.GetChild(index))
 Gets the "child" shape for the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetChildCount (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.GetChildCount())
 Gets the "child" count for the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetDensity (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.density)
 Gets the density of the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetDimensions (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.GetDimensions())
 Gets the rectangle's width and height dimensions. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetFilter (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.filter)
 Gets the filter of the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetFriction (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.friction)
 Gets the friction of the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto GetMassData (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.GetMassData(GetDensity(arg)))
 Gets the mass data for the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetOffset (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.GetOffset())
 Gets the rectangle's x and y offset. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetRestitution (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.restitution)
 Gets the restitution of the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetVertexRadius (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept(noexcept(arg.GetVertexRadius())) -> decltype(arg.GetVertexRadius())
 Gets the vertex radius of the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto GetVertexRadius (const Compositor< P1, P2, P3, P4, P5, P6 > &arg, ChildCounter index) noexcept(noexcept(GetChild(arg, index))) -> decltype(GetVertexRadius(GetChild(arg, index)))
 Gets the vertex radius of the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto IsSensor (const Compositor< P1, P2, P3, P4, P5, P6 > &arg) noexcept -> decltype(arg.sensor)
 Gets the is-sensor state of the given shape configuration. More...
 
template<class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 >
bool operator!= (const Compositor< P11, P12, P13, P14, P15, P16 > &lhs, const Compositor< P21, P22, P23, P24, P25, P26 > &rhs) noexcept
 Inequality operator.
 
template<class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 >
bool operator== (const Compositor< P11, P12, P13, P14, P15, P16 > &lhs, const Compositor< P21, P22, P23, P24, P25, P26 > &rhs) noexcept
 Equality operator.
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto Rotate (Compositor< P1, P2, P3, P4, P5, P6 > &arg, ::playrho::d2::UnitVec value) -> std::enable_if_t< detail::HasMemberRotateV< decltype(arg)>, void >
 Rotates the given compositor's vertices by the given value. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto Scale (Compositor< P1, P2, P3, P4, P5, P6 > &arg, const Vec2 &value) -> std::enable_if_t< detail::HasMemberScaleV< decltype(arg)>, void >
 Scales the given compositor's vertices by the given value. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetDensity (Compositor< P1, P2, P3, P4, P5, P6 > &arg, NonNegative< AreaDensity > value) -> std::enable_if_t<!std::is_const_v< decltype(arg.density)>, void >
 Density setter. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetDimensions (Compositor< P1, P2, P3, P4, P5, P6 > &arg, decltype(arg.GetDimensions()) value) -> decltype(arg.SetDimensions(value))
 Sets the rectangle's width and height dimensions. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetFilter (Compositor< P1, P2, P3, P4, P5, P6 > &arg, Filter value) -> std::enable_if_t<!std::is_const_v< decltype(arg.filter)>, void >
 Filter setter. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetFriction (Compositor< P1, P2, P3, P4, P5, P6 > &arg, NonNegative< Real > value) -> std::enable_if_t<!std::is_const_v< decltype(arg.friction)>, void >
 Sets friction. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetOffset (Compositor< P1, P2, P3, P4, P5, P6 > &arg, decltype(arg.GetOffset()) value) -> decltype(arg.SetOffset(value))
 Sets the rectangle's x and y offset. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetRestitution (Compositor< P1, P2, P3, P4, P5, P6 > &arg, Real value) -> std::enable_if_t<!std::is_const_v< decltype(arg.restitution)>, void >
 Sets restitution. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetSensor (Compositor< P1, P2, P3, P4, P5, P6 > &arg, bool value) -> std::enable_if_t<!std::is_const_v< decltype(arg.sensor)>, void >
 Sensor setter. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetVertexRadius (Compositor< P1, P2, P3, P4, P5, P6 > &arg, ChildCounter index, decltype(arg.GetVertexRadius()) value) -> decltype(arg.SetVertexRadius(index, value))
 Gets the vertex radius of the given shape configuration. More...
 
template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto Translate (Compositor< P1, P2, P3, P4, P5, P6 > &arg, const Length2 &value) -> std::enable_if_t< detail::HasMemberTranslateV< decltype(arg)>, void >
 Translates the given compositor's vertices by the given value. More...
 

Detailed Description

Name space for parts attached to bodies and support for those parts.

Function Documentation

◆ GetChild()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto GetChild ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
ChildCounter  index 
) -> decltype(arg.GetChild(index))
noexcept

Gets the "child" shape for the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name.
Examples
Compositor.cpp.

Referenced by playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::GetVertexRadius(), and playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::operator==().

◆ GetChildCount()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetChildCount ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.GetChildCount())
constexprnoexcept

Gets the "child" count for the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name.
Examples
Compositor.cpp.

Referenced by playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::operator==().

◆ GetDensity()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetDensity ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.density)
constexprnoexcept

Gets the density of the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name.
Examples
Compositor.cpp.

Referenced by playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::GetMassData(), playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::operator==(), and playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::SetDensity().

◆ GetDimensions()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetDimensions ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.GetDimensions())
constexprnoexcept

Gets the rectangle's width and height dimensions.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name.
Examples
Compositor.cpp.

◆ GetFilter()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetFilter ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.filter)
constexprnoexcept

Gets the filter of the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name.

Referenced by playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::operator==(), and playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::SetFilter().

◆ GetFriction()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetFriction ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.friction)
constexprnoexcept

Gets the friction of the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name.
Examples
Compositor.cpp.

Referenced by playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::operator==(), and playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::SetFriction().

◆ GetMassData()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto GetMassData ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.GetMassData(GetDensity(arg)))
noexcept

Gets the mass data for the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name.
Examples
Compositor.cpp.

◆ GetOffset()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetOffset ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.GetOffset())
constexprnoexcept

Gets the rectangle's x and y offset.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name.
Examples
Compositor.cpp.

◆ GetRestitution()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetRestitution ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.restitution)
constexprnoexcept

Gets the restitution of the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name.
Examples
Compositor.cpp.

Referenced by playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::operator==(), and playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::SetRestitution().

◆ GetVertexRadius() [1/2]

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto GetVertexRadius ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.GetVertexRadius())
constexprnoexcept

Gets the vertex radius of the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name.
Examples
Compositor.cpp.

Referenced by playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::GetVertexRadius().

◆ GetVertexRadius() [2/2]

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto GetVertexRadius ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
ChildCounter  index 
) -> decltype(GetVertexRadius(GetChild(arg, index)))
noexcept

Gets the vertex radius of the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name.

◆ IsSensor()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
constexpr auto IsSensor ( const Compositor< P1, P2, P3, P4, P5, P6 > &  arg) -> decltype(arg.sensor)
constexprnoexcept

Gets the is-sensor state of the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name.

Referenced by playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::operator==(), and playrho::d2::part::Compositor< P1, P2, P3, P4, P5, P6 >::SetSensor().

◆ Rotate()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto Rotate ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
::playrho::d2::UnitVec  value 
) -> std::enable_if_t<detail::HasMemberRotateV<decltype(arg)>, void>

Rotates the given compositor's vertices by the given value.

No-op rotate function.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name and accepting the given value.
By way of SFINAE, this function is only available from overload resolution for objects not having a member function of this same name and accepting the given value.
Exceptions
InvalidArgumentif value not the right direction.
Examples
Compositor.cpp.

◆ Scale()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto Scale ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
const Vec2 value 
) -> std::enable_if_t<detail::HasMemberScaleV<decltype(arg)>, void>

Scales the given compositor's vertices by the given value.

No-op scale function.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name and accepting the given value.
By way of SFINAE, this function is only available from overload resolution for objects not having a member function of this same name and accepting the given value.
Exceptions
InvalidArgumentif value not the identity vector.
Examples
Compositor.cpp.

◆ SetDensity()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetDensity ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
NonNegative< AreaDensity value 
) -> std::enable_if_t<!std::is_const_v<decltype(arg.density)>, void>

Density setter.

No-op density setter.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name and accepting the given value.
By way of SFINAE, this function is only available from overload resolution for objects not having a member variable of this same name and accepting the given value.
Exceptions
InvalidArgumentif value different from existing.
Examples
Compositor.cpp.

◆ SetDimensions()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetDimensions ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
decltype(arg.GetDimensions())  value 
) -> decltype(arg.SetDimensions(value))

Sets the rectangle's width and height dimensions.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name and accepting the given value.
Examples
Compositor.cpp.

◆ SetFilter()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetFilter ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
Filter  value 
) -> std::enable_if_t<!std::is_const_v<decltype(arg.filter)>, void>

Filter setter.

No-op filter setter.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name and accepting the given value.
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name and accepting the given value.
Exceptions
InvalidArgumentif value different from existing.
Examples
Compositor.cpp.

◆ SetFriction()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetFriction ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
NonNegative< Real value 
) -> std::enable_if_t<!std::is_const_v<decltype(arg.friction)>, void>

Sets friction.

No-op friction setting function.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name and accepting the given value.
By way of SFINAE, this function is only available from overload resolution for objects not having a member variable of this same name and accepting the given value.
Exceptions
InvalidArgumentif value different from existing.
Examples
Compositor.cpp.

◆ SetOffset()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetOffset ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
decltype(arg.GetOffset())  value 
) -> decltype(arg.SetOffset(value))

Sets the rectangle's x and y offset.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name and accepting the given value.
Examples
Compositor.cpp.

◆ SetRestitution()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetRestitution ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
Real  value 
) -> std::enable_if_t<!std::is_const_v<decltype(arg.restitution)>, void>

Sets restitution.

No-op restitution setting function.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name and accepting the given value.
By way of SFINAE, this function is only available from overload resolution for objects not having a member variable of this same name and accepting the given value.
Exceptions
InvalidArgumentif value different from existing.
Examples
Compositor.cpp.

◆ SetSensor()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetSensor ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
bool  value 
) -> std::enable_if_t<!std::is_const_v<decltype(arg.sensor)>, void>

Sensor setter.

No-op sensor setter.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member variable of this same name and accepting the given value.
By way of SFINAE, this function is only available from overload resolution for objects not having a member variable of this same name and accepting the given value.
Exceptions
InvalidArgumentif value different from existing.
Examples
Compositor.cpp.

◆ SetVertexRadius()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto SetVertexRadius ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
ChildCounter  index,
decltype(arg.GetVertexRadius())  value 
) -> decltype(arg.SetVertexRadius(index, value))

Gets the vertex radius of the given shape configuration.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name and accepting the given index and value.
Examples
Compositor.cpp.

◆ Translate()

template<class P1 , class P2 , class P3 , class P4 , class P5 , class P6 >
auto Translate ( Compositor< P1, P2, P3, P4, P5, P6 > &  arg,
const Length2 value 
) -> std::enable_if_t<detail::HasMemberTranslateV<decltype(arg)>, void>

Translates the given compositor's vertices by the given value.

No-op translation function.

Note
By way of SFINAE, this function is only available from overload resolution for objects having a member function of this same name and accepting the given value.
By way of SFINAE, this function is only available from overload resolution for objects not having a member function of this same name and accepting the given value.
Exceptions
InvalidArgumentif value not zero.
Examples
Compositor.cpp.