PlayRho  1.1.0
An Interactive Real-Time-Oriented C++ Physics Engine & Library
playrho::d2::JointBuilder< T > Struct Template Reference

Joint builder definition structure. More...

#include <JointConf.hpp>

Inheritance diagram for playrho::d2::JointBuilder< T >:
[legend]
Collaboration diagram for playrho::d2::JointBuilder< T >:
[legend]

Public Types

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

Public Member Functions

constexpr reference UseBodyA (BodyID b) noexcept
 Use value for body A setting.
 
constexpr reference UseBodyB (BodyID b) noexcept
 Use value for body B setting.
 
constexpr reference UseCollideConnected (bool v) noexcept
 Use value for collide connected setting.
 

Additional Inherited Members

- Public Attributes inherited from playrho::d2::JointConf
BodyID bodyA = InvalidBodyID
 1st attached body.
 
BodyID bodyB = InvalidBodyID
 2nd attached body.
 
bool collideConnected = false
 Collide connected. 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
Examples
Joint.cpp.

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