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 TargetJointConf & | UseTarget (Length2 v) noexcept |
Use value for target. More... | |
PLAYRHO_CONSTEXPR TargetJointConf & | UseMaxForce (NonNegative< Force > v) noexcept |
Use value for max force. More... | |
PLAYRHO_CONSTEXPR TargetJointConf & | UseFrequency (NonNegative< Frequency > v) noexcept |
Use value for frequency. More... | |
PLAYRHO_CONSTEXPR TargetJointConf & | UseDampingRatio (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< Force > | maxForce = NonNegative<Force>{0_N} |
NonNegative< Frequency > | frequency = NonNegative<Frequency>(5_Hz) |
NonNegative< Real > | dampingRatio = 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... | |
Body * | bodyA = nullptr |
1st attached body. More... | |
Body * | bodyB = nullptr |
2nd attached body. More... | |
bool | collideConnected = false |
Collide connected. More... | |
void * | userData = nullptr |
User data. More... | |
Additional Inherited Members | |
Related Functions inherited from playrho::d2::JointConf | |
void | Set (JointConf &def, const Joint &joint) noexcept |
Sets the joint definition data for the given joint. More... | |
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
Super type.
Definition at line 40 of file TargetJointConf.hpp.
Constructor & Destructor Documentation
◆ TargetJointConf() [1/2]
|
inlinenoexcept |
Definition at line 42 of file TargetJointConf.hpp.
◆ TargetJointConf() [2/2]
|
inlinenoexcept |
Initializing constructor.
Definition at line 45 of file TargetJointConf.hpp.
Member Function Documentation
◆ UseTarget()
|
inlinenoexcept |
Use value for target.
Definition at line 83 of file TargetJointConf.hpp.
◆ UseMaxForce()
|
inlinenoexcept |
Use value for max force.
Definition at line 89 of file TargetJointConf.hpp.
◆ UseFrequency()
|
inlinenoexcept |
Use value for frequency.
Definition at line 95 of file TargetJointConf.hpp.
◆ UseDampingRatio()
|
inlinenoexcept |
Use value for damping ratio.
Definition at line 101 of file TargetJointConf.hpp.
Member Data Documentation
◆ target
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:
- Dynamics/Joints/TargetJointConf.hpp