playrho::d2::MotorJointConf Struct Reference

Motor joint definition. More...

#include <MotorJointConf.hpp>

Public Types

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

Public Member Functions

PLAYRHO_CONSTEXPR MotorJointConf () noexcept
 
 MotorJointConf (NonNull< Body * > bodyA, NonNull< Body * > bodyB) noexcept
 Initialize the bodies and offsets using the current transforms. More...
 
MotorJointConfUseLinearOffset (Length2 v) noexcept
 Uses the given linear offset value. More...
 
MotorJointConfUseAngularOffset (Angle v) noexcept
 Uses the given angular offset value. More...
 
MotorJointConfUseMaxForce (NonNegative< Force > v) noexcept
 Uses the given maximum force value. More...
 
MotorJointConfUseMaxTorque (NonNegative< Torque > v) noexcept
 Uses the given max torque value. More...
 
MotorJointConfUseCorrectionFactor (Real v) noexcept
 Uses the given correction factor. More...
 
- Public Member Functions inherited from playrho::d2::JointBuilder< MotorJointConf >
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 linearOffset = Length2{}
 Position of body-B minus the position of body-A, in body-A's frame. More...
 
Angle angularOffset = 0_deg
 Angle of body-B minus angle of body-A. More...
 
NonNegative< ForcemaxForce = NonNegative<Force>(1_N)
 Maximum motor force. More...
 
NonNegative< TorquemaxTorque = NonNegative<Torque>(1_Nm)
 Maximum motor torque. More...
 
Real correctionFactor = Real(0.3)
 Position correction factor in the range [0,1]. 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

Motor joint definition.

Examples
World.cpp.

Definition at line 36 of file MotorJointConf.hpp.

Member Typedef Documentation

◆ super

Super type.

Definition at line 39 of file MotorJointConf.hpp.

Constructor & Destructor Documentation

◆ MotorJointConf() [1/2]

PLAYRHO_CONSTEXPR playrho::d2::MotorJointConf::MotorJointConf ( )
inlinenoexcept

Definition at line 41 of file MotorJointConf.hpp.

◆ MotorJointConf() [2/2]

playrho::d2::MotorJointConf::MotorJointConf ( NonNull< Body * >  bodyA,
NonNull< Body * >  bodyB 
)
noexcept

Initialize the bodies and offsets using the current transforms.

Definition at line 29 of file MotorJointConf.cpp.

Member Function Documentation

◆ UseLinearOffset()

MotorJointConf & playrho::d2::MotorJointConf::UseLinearOffset ( Length2  v)
inlinenoexcept

Uses the given linear offset value.

Definition at line 77 of file MotorJointConf.hpp.

◆ UseAngularOffset()

MotorJointConf & playrho::d2::MotorJointConf::UseAngularOffset ( Angle  v)
inlinenoexcept

Uses the given angular offset value.

Definition at line 83 of file MotorJointConf.hpp.

◆ UseMaxForce()

MotorJointConf & playrho::d2::MotorJointConf::UseMaxForce ( NonNegative< Force v)
inlinenoexcept

Uses the given maximum force value.

Definition at line 89 of file MotorJointConf.hpp.

◆ UseMaxTorque()

MotorJointConf & playrho::d2::MotorJointConf::UseMaxTorque ( NonNegative< Torque v)
inlinenoexcept

Uses the given max torque value.

Definition at line 95 of file MotorJointConf.hpp.

◆ UseCorrectionFactor()

MotorJointConf & playrho::d2::MotorJointConf::UseCorrectionFactor ( Real  v)
inlinenoexcept

Uses the given correction factor.

Definition at line 101 of file MotorJointConf.hpp.

Member Data Documentation

◆ linearOffset

Length2 playrho::d2::MotorJointConf::linearOffset = Length2{}

Position of body-B minus the position of body-A, in body-A's frame.

Definition at line 62 of file MotorJointConf.hpp.

◆ angularOffset

Angle playrho::d2::MotorJointConf::angularOffset = 0_deg

Angle of body-B minus angle of body-A.

Definition at line 65 of file MotorJointConf.hpp.

◆ maxForce

NonNegative<Force> playrho::d2::MotorJointConf::maxForce = NonNegative<Force>(1_N)

Maximum motor force.

Definition at line 68 of file MotorJointConf.hpp.

◆ maxTorque

NonNegative<Torque> playrho::d2::MotorJointConf::maxTorque = NonNegative<Torque>(1_Nm)

Maximum motor torque.

Definition at line 71 of file MotorJointConf.hpp.

◆ correctionFactor

Real playrho::d2::MotorJointConf::correctionFactor = Real(0.3)

Position correction factor in the range [0,1].

Definition at line 74 of file MotorJointConf.hpp.


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