playrho::d2::TargetJointConf Struct Reference

Target joint definition. More...

#include <TargetJointConf.hpp>

Public Types

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

Public Member Functions

PLAYRHO_CONSTEXPR TargetJointConf () noexcept
 
PLAYRHO_CONSTEXPR TargetJointConf (NonNull< Body * > b) noexcept
 Initializing constructor. More...
 
PLAYRHO_CONSTEXPR TargetJointConfUseTarget (Length2 v) noexcept
 Use value for target. More...
 
PLAYRHO_CONSTEXPR TargetJointConfUseMaxForce (NonNegative< Force > v) noexcept
 Use value for max force. More...
 
PLAYRHO_CONSTEXPR TargetJointConfUseFrequency (NonNegative< Frequency > v) noexcept
 Use value for frequency. More...
 
PLAYRHO_CONSTEXPR TargetJointConfUseDampingRatio (NonNegative< Real > v) noexcept
 Use value for damping ratio. More...
 
- Public Member Functions inherited from playrho::d2::JointBuilder< TargetJointConf >
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 target = Length2{}
 
NonNegative< ForcemaxForce = NonNegative<Force>{0_N}
 
NonNegative< Frequencyfrequency = NonNegative<Frequency>(5_Hz)
 
NonNegative< RealdampingRatio = NonNegative<Real>(0.7f)
 The damping ratio. 0 = no damping, 1 = critical damping. 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

Target joint definition.

This requires a world target point, tuning parameters, and the time step.

Examples
World.cpp.

Definition at line 37 of file TargetJointConf.hpp.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ TargetJointConf() [1/2]

PLAYRHO_CONSTEXPR playrho::d2::TargetJointConf::TargetJointConf ( )
inlinenoexcept

Definition at line 42 of file TargetJointConf.hpp.

◆ TargetJointConf() [2/2]

PLAYRHO_CONSTEXPR playrho::d2::TargetJointConf::TargetJointConf ( NonNull< Body * >  b)
inlinenoexcept

Initializing constructor.

Definition at line 45 of file TargetJointConf.hpp.

Member Function Documentation

◆ UseTarget()

PLAYRHO_CONSTEXPR TargetJointConf & playrho::d2::TargetJointConf::UseTarget ( Length2  v)
inlinenoexcept

Use value for target.

Definition at line 83 of file TargetJointConf.hpp.

◆ UseMaxForce()

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

Use value for max force.

Definition at line 89 of file TargetJointConf.hpp.

◆ UseFrequency()

PLAYRHO_CONSTEXPR TargetJointConf & playrho::d2::TargetJointConf::UseFrequency ( NonNegative< Frequency v)
inlinenoexcept

Use value for frequency.

Definition at line 95 of file TargetJointConf.hpp.

◆ UseDampingRatio()

PLAYRHO_CONSTEXPR TargetJointConf & playrho::d2::TargetJointConf::UseDampingRatio ( NonNegative< Real v)
inlinenoexcept

Use value for damping ratio.

Definition at line 101 of file TargetJointConf.hpp.

Member Data Documentation

◆ target

Length2 playrho::d2::TargetJointConf::target = Length2{}

The initial world target point. This is assumed to coincide with the body anchor initially.

Examples
World.cpp.

Definition at line 64 of file TargetJointConf.hpp.

◆ maxForce

NonNegative<Force> playrho::d2::TargetJointConf::maxForce = NonNegative<Force>{0_N}

Max force.

The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of the weight (multiplier * mass * gravity).

Note
This may not be negative.
Examples
World.cpp.

Definition at line 72 of file TargetJointConf.hpp.

◆ frequency

NonNegative<Frequency> playrho::d2::TargetJointConf::frequency = NonNegative<Frequency>(5_Hz)

Frequency.

The has to do with the response speed.

Note
This value may not be negative.

Definition at line 77 of file TargetJointConf.hpp.

◆ dampingRatio

NonNegative<Real> playrho::d2::TargetJointConf::dampingRatio = NonNegative<Real>(0.7f)

The damping ratio. 0 = no damping, 1 = critical damping.

Definition at line 80 of file TargetJointConf.hpp.


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