Prismatic joint definition. More...
#include <PrismaticJointConf.hpp>
Public Types | |
using | super = JointBuilder< PrismaticJointConf > |
Super type. More... | |
Public Types inherited from playrho::d2::JointBuilder< PrismaticJointConf > | |
using | value_type = PrismaticJointConf |
Value type. More... | |
using | reference = value_type & |
Reference type. More... | |
Public Member Functions | |
PLAYRHO_CONSTEXPR | PrismaticJointConf () noexcept |
PrismaticJointConf (const PrismaticJointConf ©)=default | |
Copy constructor. More... | |
PrismaticJointConf (NonNull< Body * > bodyA, NonNull< Body * > bodyB, const Length2 anchor, const UnitVec axis) noexcept | |
Initializing constructor. More... | |
PrismaticJointConf & | UseEnableLimit (bool v) noexcept |
Uses the given enable limit state value. More... | |
PrismaticJointConf & | UseLowerTranslation (Length v) noexcept |
Uses the given lower translation value. More... | |
PrismaticJointConf & | UseUpperTranslation (Length v) noexcept |
Uses the given upper translation value. More... | |
PrismaticJointConf & | UseEnableMotor (bool v) noexcept |
Uses the given enable motor state value. More... | |
Public Member Functions inherited from playrho::d2::JointBuilder< PrismaticJointConf > | |
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 unit axis in body A. More... | |
Angle | referenceAngle = 0_deg |
The constrained angle between the bodies: body B's angle minus body A's angle. More... | |
bool | enableLimit = false |
Enable/disable the joint limit. More... | |
Length | lowerTranslation = 0_m |
The lower translation limit. More... | |
Length | upperTranslation = 0_m |
The upper translation limit. More... | |
bool | enableMotor = false |
Enable/disable the joint motor. More... | |
Force | maxMotorForce = 0_N |
The maximum motor force. More... | |
AngularVelocity | motorSpeed = 0_rpm |
The desired angular motor speed. 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
Prismatic 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 PrismaticJointConf.hpp.
Member Typedef Documentation
◆ super
Super type.
Definition at line 44 of file PrismaticJointConf.hpp.
Constructor & Destructor Documentation
◆ PrismaticJointConf() [1/3]
|
inlinenoexcept |
Definition at line 46 of file PrismaticJointConf.hpp.
◆ PrismaticJointConf() [2/3]
|
default |
Copy constructor.
◆ PrismaticJointConf() [3/3]
|
noexcept |
Initializing constructor.
Initializes the bodies, anchors, axis, and reference angle using the world anchor and unit world axis.
Definition at line 29 of file PrismaticJointConf.cpp.
Member Function Documentation
◆ UseEnableLimit()
|
inlinenoexcept |
Uses the given enable limit state value.
Definition at line 100 of file PrismaticJointConf.hpp.
◆ UseLowerTranslation()
|
inlinenoexcept |
Uses the given lower translation value.
Definition at line 106 of file PrismaticJointConf.hpp.
◆ UseUpperTranslation()
|
inlinenoexcept |
Uses the given upper translation value.
Definition at line 112 of file PrismaticJointConf.hpp.
◆ UseEnableMotor()
|
inlinenoexcept |
Uses the given enable motor state value.
Definition at line 118 of file PrismaticJointConf.hpp.
Member Data Documentation
◆ localAnchorA
The local anchor point relative to body A's origin.
Definition at line 70 of file PrismaticJointConf.hpp.
◆ localAnchorB
The local anchor point relative to body B's origin.
Definition at line 73 of file PrismaticJointConf.hpp.
◆ localAxisA
UnitVec playrho::d2::PrismaticJointConf::localAxisA = UnitVec::GetRight() |
The local translation unit axis in body A.
Definition at line 76 of file PrismaticJointConf.hpp.
◆ referenceAngle
Angle playrho::d2::PrismaticJointConf::referenceAngle = 0_deg |
The constrained angle between the bodies: body B's angle minus body A's angle.
Definition at line 79 of file PrismaticJointConf.hpp.
◆ enableLimit
bool playrho::d2::PrismaticJointConf::enableLimit = false |
Enable/disable the joint limit.
Definition at line 82 of file PrismaticJointConf.hpp.
◆ lowerTranslation
Length playrho::d2::PrismaticJointConf::lowerTranslation = 0_m |
The lower translation limit.
Definition at line 85 of file PrismaticJointConf.hpp.
◆ upperTranslation
Length playrho::d2::PrismaticJointConf::upperTranslation = 0_m |
The upper translation limit.
Definition at line 88 of file PrismaticJointConf.hpp.
◆ enableMotor
bool playrho::d2::PrismaticJointConf::enableMotor = false |
Enable/disable the joint motor.
Definition at line 91 of file PrismaticJointConf.hpp.
◆ maxMotorForce
Force playrho::d2::PrismaticJointConf::maxMotorForce = 0_N |
The maximum motor force.
Definition at line 94 of file PrismaticJointConf.hpp.
◆ motorSpeed
AngularVelocity playrho::d2::PrismaticJointConf::motorSpeed = 0_rpm |
The desired angular motor speed.
Definition at line 97 of file PrismaticJointConf.hpp.
The documentation for this struct was generated from the following files:
- Dynamics/Joints/PrismaticJointConf.hpp
- Dynamics/Joints/PrismaticJointConf.cpp