playrho::d2::JointBuilder< T > Struct Template Reference

Joint builder definition structure. More...

#include <JointConf.hpp>

Public Types

using value_type = T
 Value type. More...
 
using reference = value_type &
 Reference type. More...
 

Public Member Functions

PLAYRHO_CONSTEXPR JointBuilder (JointType t) noexcept
 Initializing constructor. More...
 
PLAYRHO_CONSTEXPR reference UseBodyA (Body *b) noexcept
 Use value for body A setting. More...
 
PLAYRHO_CONSTEXPR reference UseBodyB (Body *b) noexcept
 Use value for body B setting. More...
 
PLAYRHO_CONSTEXPR reference UseCollideConnected (bool v) noexcept
 Use value for collide connected setting. More...
 
PLAYRHO_CONSTEXPR reference UseUserData (void *v) noexcept
 Use value for user data setting. More...
 
- Public Member Functions inherited from playrho::d2::JointConf
 JointConf ()=delete
 Deleted default constructor for abstract base class. More...
 
PLAYRHO_CONSTEXPR JointConf (JointType t) noexcept
 Initializing constructor. More...
 

Additional Inherited Members

- Public Attributes inherited from playrho::d2::JointConf
JointType type = JointType::Unknown
 Type of the joint is set automatically for concrete joint types. More...
 
BodybodyA = nullptr
 1st attached body. More...
 
BodybodyB = nullptr
 2nd attached body. More...
 
bool collideConnected = false
 Collide connected. More...
 
void * userData = nullptr
 User data. More...
 

Detailed Description

template<class T>
struct playrho::d2::JointBuilder< T >

Joint builder definition structure.

This is a builder structure of chainable methods for building a shape configuration.

Note
This is a templated nested value class for initializing joints that uses the Curiously Recurring Template Pattern (CRTP) to provide method chaining via static polymorphism.
See also
https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern

Definition at line 75 of file JointConf.hpp.

Member Typedef Documentation

◆ value_type

template<class T >
using playrho::d2::JointBuilder< T >::value_type = T

Value type.

Definition at line 79 of file JointConf.hpp.

◆ reference

template<class T >
using playrho::d2::JointBuilder< T >::reference = value_type&

Reference type.

Definition at line 82 of file JointConf.hpp.

Constructor & Destructor Documentation

◆ JointBuilder()

template<class T >
PLAYRHO_CONSTEXPR playrho::d2::JointBuilder< T >::JointBuilder ( JointType  t)
inlineexplicitnoexcept

Initializing constructor.

Definition at line 85 of file JointConf.hpp.

Member Function Documentation

◆ UseBodyA()

template<class T >
PLAYRHO_CONSTEXPR reference playrho::d2::JointBuilder< T >::UseBodyA ( Body b)
inlinenoexcept

Use value for body A setting.

Definition at line 91 of file JointConf.hpp.

◆ UseBodyB()

template<class T >
PLAYRHO_CONSTEXPR reference playrho::d2::JointBuilder< T >::UseBodyB ( Body b)
inlinenoexcept

Use value for body B setting.

Definition at line 98 of file JointConf.hpp.

◆ UseCollideConnected()

template<class T >
PLAYRHO_CONSTEXPR reference playrho::d2::JointBuilder< T >::UseCollideConnected ( bool  v)
inlinenoexcept

Use value for collide connected setting.

Definition at line 105 of file JointConf.hpp.

◆ UseUserData()

template<class T >
PLAYRHO_CONSTEXPR reference playrho::d2::JointBuilder< T >::UseUserData ( void *  v)
inlinenoexcept

Use value for user data setting.

Definition at line 112 of file JointConf.hpp.


The documentation for this struct was generated from the following file: