playrho::d2::RopeJointConf Struct Reference

Rope joint definition. More...

#include <RopeJointConf.hpp>

Public Types

using super = JointBuilder< RopeJointConf >
 Super type. More...
 
- Public Types inherited from playrho::d2::JointBuilder< RopeJointConf >
using value_type = RopeJointConf
 Value type. More...
 
using reference = value_type &
 Reference type. More...
 

Public Member Functions

PLAYRHO_CONSTEXPR RopeJointConf () noexcept
 
PLAYRHO_CONSTEXPR RopeJointConf (Body *bodyA, Body *bodyB) noexcept
 Initializing constructor. More...
 
PLAYRHO_CONSTEXPR RopeJointConfUseMaxLength (Length v) noexcept
 Uses the given max length value. More...
 
- Public Member Functions inherited from playrho::d2::JointBuilder< RopeJointConf >
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...
 

Public Attributes

Length2 localAnchorA = Length2{-1_m, 0_m}
 The local anchor point relative to body A's origin. More...
 
Length2 localAnchorB = Length2{+1_m, 0_m}
 The local anchor point relative to body B's origin. More...
 
Length maxLength = 0_m
 The maximum length of the rope. More...
 
- 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...
 

Additional Inherited Members

Detailed Description

Rope joint definition.

This requires two body anchor points and a maximum lengths.

Note
By default the connected objects will not collide.
See also
collideConnected in JointConf.
Examples
World.cpp.

Definition at line 38 of file RopeJointConf.hpp.

Member Typedef Documentation

◆ super

Super type.

Definition at line 41 of file RopeJointConf.hpp.

Constructor & Destructor Documentation

◆ RopeJointConf() [1/2]

PLAYRHO_CONSTEXPR playrho::d2::RopeJointConf::RopeJointConf ( )
inlinenoexcept

Definition at line 43 of file RopeJointConf.hpp.

◆ RopeJointConf() [2/2]

PLAYRHO_CONSTEXPR playrho::d2::RopeJointConf::RopeJointConf ( Body bodyA,
Body bodyB 
)
inlinenoexcept

Initializing constructor.

Definition at line 46 of file RopeJointConf.hpp.

Member Function Documentation

◆ UseMaxLength()

PLAYRHO_CONSTEXPR RopeJointConf & playrho::d2::RopeJointConf::UseMaxLength ( Length  v)
inlinenoexcept

Uses the given max length value.

Definition at line 65 of file RopeJointConf.hpp.

Member Data Documentation

◆ localAnchorA

Length2 playrho::d2::RopeJointConf::localAnchorA = Length2{-1_m, 0_m}

The local anchor point relative to body A's origin.

Definition at line 56 of file RopeJointConf.hpp.

◆ localAnchorB

Length2 playrho::d2::RopeJointConf::localAnchorB = Length2{+1_m, 0_m}

The local anchor point relative to body B's origin.

Definition at line 59 of file RopeJointConf.hpp.

◆ maxLength

Length playrho::d2::RopeJointConf::maxLength = 0_m

The maximum length of the rope.

Definition at line 62 of file RopeJointConf.hpp.


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