playrho::d2::GearJointConf Struct Reference

Gear joint definition. More...

#include <GearJointConf.hpp>

Public Types

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

Public Member Functions

 GearJointConf (NonNull< Joint * > j1, NonNull< Joint * > j2) noexcept
 Initializing constructor. More...
 
GearJointConfUseRatio (Real v) noexcept
 Uses the given ratio value. More...
 
- Public Member Functions inherited from playrho::d2::JointBuilder< GearJointConf >
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

NonNull< Joint * > joint1
 The first revolute/prismatic joint attached to the gear joint. More...
 
NonNull< Joint * > joint2
 The second revolute/prismatic joint attached to the gear joint. More...
 
Real ratio = Real{1}
 
- 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

Gear joint definition.

This definition requires two existing revolute or prismatic joints (any combination will work).

Examples
World.cpp.

Definition at line 38 of file GearJointConf.hpp.

Member Typedef Documentation

◆ super

Super type.

Definition at line 41 of file GearJointConf.hpp.

Constructor & Destructor Documentation

◆ GearJointConf()

playrho::d2::GearJointConf::GearJointConf ( NonNull< Joint * >  j1,
NonNull< Joint * >  j2 
)
noexcept

Initializing constructor.

Definition at line 28 of file GearJointConf.cpp.

Member Function Documentation

◆ UseRatio()

GearJointConf & playrho::d2::GearJointConf::UseRatio ( Real  v)
inlinenoexcept

Uses the given ratio value.

Definition at line 60 of file GearJointConf.hpp.

Member Data Documentation

◆ joint1

NonNull<Joint*> playrho::d2::GearJointConf::joint1

The first revolute/prismatic joint attached to the gear joint.

Definition at line 50 of file GearJointConf.hpp.

◆ joint2

NonNull<Joint*> playrho::d2::GearJointConf::joint2

The second revolute/prismatic joint attached to the gear joint.

Definition at line 53 of file GearJointConf.hpp.

◆ ratio

Real playrho::d2::GearJointConf::ratio = Real{1}

The gear ratio.

See also
GearJoint for explanation.

Definition at line 57 of file GearJointConf.hpp.


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