Wheel joint definition. More...
#include <WheelJointConf.hpp>
Public Types | |
using | super = JointBuilder< WheelJointConf > |
Super type. More... | |
Public Types inherited from playrho::d2::JointBuilder< WheelJointConf > | |
using | value_type = WheelJointConf |
Value type. More... | |
using | reference = value_type & |
Reference type. More... | |
Public Member Functions | |
PLAYRHO_CONSTEXPR | WheelJointConf () noexcept |
WheelJointConf (NonNull< Body * > bodyA, NonNull< Body * > bodyB, const Length2 anchor, const UnitVec axis) noexcept | |
PLAYRHO_CONSTEXPR WheelJointConf & | UseEnableMotor (bool v) noexcept |
Uses the given enable motor state value. More... | |
PLAYRHO_CONSTEXPR WheelJointConf & | UseMaxMotorTorque (Torque v) noexcept |
Uses the given max motor toque value. More... | |
PLAYRHO_CONSTEXPR WheelJointConf & | UseMotorSpeed (AngularVelocity v) noexcept |
Uses the given motor speed value. More... | |
PLAYRHO_CONSTEXPR WheelJointConf & | UseFrequency (Frequency v) noexcept |
Uses the given frequency value. More... | |
PLAYRHO_CONSTEXPR WheelJointConf & | UseDampingRatio (Real v) noexcept |
Uses the given damping ratio value. More... | |
Public Member Functions inherited from playrho::d2::JointBuilder< WheelJointConf > | |
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{} |
The local anchor point relative to body A's origin. More... | |
Length2 | localAnchorB = Length2{} |
The local anchor point relative to body B's origin. More... | |
UnitVec | localAxisA = UnitVec::GetRight() |
The local translation axis in body-A. More... | |
bool | enableMotor = false |
Enable/disable the joint motor. More... | |
Torque | maxMotorTorque = Torque{0} |
The maximum motor torque. More... | |
AngularVelocity | motorSpeed = 0_rpm |
The desired angular motor speed. More... | |
Frequency | frequency = 2_Hz |
Suspension frequency, zero indicates no suspension. More... | |
Real | dampingRatio = 0.7f |
Suspension damping ratio, one indicates 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
Wheel joint definition.
This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
- Examples
- World.cpp.
Definition at line 41 of file WheelJointConf.hpp.
Member Typedef Documentation
◆ super
Super type.
Definition at line 44 of file WheelJointConf.hpp.
Constructor & Destructor Documentation
◆ WheelJointConf() [1/2]
|
inlinenoexcept |
Definition at line 46 of file WheelJointConf.hpp.
◆ WheelJointConf() [2/2]
|
noexcept |
Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis.
Definition at line 29 of file WheelJointConf.cpp.
Member Function Documentation
◆ UseEnableMotor()
|
inlinenoexcept |
Uses the given enable motor state value.
Definition at line 93 of file WheelJointConf.hpp.
◆ UseMaxMotorTorque()
|
inlinenoexcept |
Uses the given max motor toque value.
Definition at line 99 of file WheelJointConf.hpp.
◆ UseMotorSpeed()
|
inlinenoexcept |
Uses the given motor speed value.
Definition at line 105 of file WheelJointConf.hpp.
◆ UseFrequency()
|
inlinenoexcept |
Uses the given frequency value.
Definition at line 111 of file WheelJointConf.hpp.
◆ UseDampingRatio()
|
inlinenoexcept |
Uses the given damping ratio value.
Definition at line 117 of file WheelJointConf.hpp.
Member Data Documentation
◆ localAnchorA
The local anchor point relative to body A's origin.
Definition at line 69 of file WheelJointConf.hpp.
◆ localAnchorB
The local anchor point relative to body B's origin.
Definition at line 72 of file WheelJointConf.hpp.
◆ localAxisA
UnitVec playrho::d2::WheelJointConf::localAxisA = UnitVec::GetRight() |
The local translation axis in body-A.
Definition at line 75 of file WheelJointConf.hpp.
◆ enableMotor
bool playrho::d2::WheelJointConf::enableMotor = false |
Enable/disable the joint motor.
Definition at line 78 of file WheelJointConf.hpp.
◆ maxMotorTorque
The maximum motor torque.
Definition at line 81 of file WheelJointConf.hpp.
◆ motorSpeed
AngularVelocity playrho::d2::WheelJointConf::motorSpeed = 0_rpm |
The desired angular motor speed.
Definition at line 84 of file WheelJointConf.hpp.
◆ frequency
Frequency playrho::d2::WheelJointConf::frequency = 2_Hz |
Suspension frequency, zero indicates no suspension.
Definition at line 87 of file WheelJointConf.hpp.
◆ dampingRatio
Real playrho::d2::WheelJointConf::dampingRatio = 0.7f |
Suspension damping ratio, one indicates critical damping.
Definition at line 90 of file WheelJointConf.hpp.
The documentation for this struct was generated from the following files:
- Dynamics/Joints/WheelJointConf.hpp
- Dynamics/Joints/WheelJointConf.cpp