#include <PrismaticJoint.h>
PrismaticJoint will remove all but one translational DOF.
◆ DegreeOfFreedom
◆ asBallJoint()
| std::shared_ptr< BallJoint > MOMENTUM_NAMESPACE::Joint::asBallJoint |
( |
| ) |
|
|
inherited |
- Returns
- a reference to the joint as a BallJoint if it is a BallJoint, otherwise nullptr will be returned
◆ asCylindricalJoint()
| std::shared_ptr< CylindricalJoint > MOMENTUM_NAMESPACE::Joint::asCylindricalJoint |
( |
| ) |
|
|
inherited |
◆ asHingeJoint()
| std::shared_ptr< HingeJoint > MOMENTUM_NAMESPACE::Joint::asHingeJoint |
( |
| ) |
|
|
inherited |
- Returns
- a reference to the joint as a HingeJoint if it is a HingeJoint, otherwise nullptr will be returned
◆ asLockJoint()
| std::shared_ptr< LockJoint > MOMENTUM_NAMESPACE::Joint::asLockJoint |
( |
| ) |
|
|
inherited |
- Returns
- a reference to the joint as a LockJoint if it is a LockJoint, otherwise nullptr will be returned
◆ asPrismaticJoint()
| std::shared_ptr< PrismaticJoint > MOMENTUM_NAMESPACE::Joint::asPrismaticJoint |
( |
| ) |
|
|
inherited |
◆ asSpringJoint()
| std::shared_ptr< SpringJoint > MOMENTUM_NAMESPACE::Joint::asSpringJoint |
( |
| ) |
|
|
inherited |
◆ getAgxRotationalDOF()
◆ getAgxTranslationalDOF()
◆ getBody()
| std::shared_ptr< RigidBody > MOMENTUM_NAMESPACE::Joint::getBody |
( |
int |
body | ) |
const |
|
inherited |
Return the body at position 0 or 1, 1 can be nullptr, if that is the case, it is attached to world.
- Parameters
-
| body | - 0 for first body, 1 for second |
- Returns
- the attached body
◆ getBodyForce()
| Vec3 MOMENTUM_NAMESPACE::Joint::getBodyForce |
( |
int |
body | ) |
const |
|
inherited |
Get the force that the joint exerts on the specified body in the frame of the body, in newton.
- Parameters
-
| body | - 0 for first body, 1 for second |
- Returns
- the force applied to the body from the constraint
◆ getBodyTorque()
| Vec3 MOMENTUM_NAMESPACE::Joint::getBodyTorque |
( |
int |
body | ) |
const |
|
inherited |
Get the torque that the joint exerts on the specified body in the frame of the body, in newton-meters.
- Parameters
-
| body | - 0 for first body, 1 for second |
- Returns
- the torque applied to the body from the constraint
◆ getCurrentSpeed()
| double MOMENTUM_NAMESPACE::PrismaticJoint::getCurrentSpeed |
( |
| ) |
const |
Get the current speed along the z-axis in meters per second.
◆ getDampingInternal()
| agx::Real MOMENTUM_NAMESPACE::Joint::getDampingInternal |
( |
int |
agxDOF | ) |
const |
|
protectedinherited |
◆ getEnabled()
| bool MOMENTUM_NAMESPACE::Joint::getEnabled |
( |
| ) |
const |
|
inherited |
Is the joint is enabled?
- Returns
- if the joint is enabled for simulation
◆ getFrictionController()
| std::shared_ptr< FrictionController > MOMENTUM_NAMESPACE::PrismaticJoint::getFrictionController |
( |
| ) |
|
- Returns
- the linear friction controller for the prismatic
◆ getMotor()
| std::shared_ptr< LinearMotor > MOMENTUM_NAMESPACE::PrismaticJoint::getMotor |
( |
| ) |
const |
Get the motor of the translational z-axis.
◆ getName()
| std::string MOMENTUM_NAMESPACE::Joint::getName |
( |
| ) |
const |
|
inherited |
Get the name of the Joint.
- Returns
- the name of the joint
◆ getPosition()
| double MOMENTUM_NAMESPACE::PrismaticJoint::getPosition |
( |
| ) |
const |
Get the current displacement along the z-axis, in meters.
◆ getRange()
| std::shared_ptr< LinearRange > MOMENTUM_NAMESPACE::PrismaticJoint::getRange |
( |
| ) |
const |
Get the range of the translational z-axis.
◆ getRotationalDamping()
| double MOMENTUM_NAMESPACE::Joint::getRotationalDamping |
( |
DegreeOfFreedom |
dof | ) |
const |
|
inherited |
Get the rotational damping along the axis of the joint, in newton-meter-seconds per radian.
- Parameters
-
| dof | the degree of freedom to get the damping of |
- Returns
- the rotational damping
◆ getRotationalElasticity()
| double MOMENTUM_NAMESPACE::Joint::getRotationalElasticity |
( |
DegreeOfFreedom |
dof | ) |
const |
|
inherited |
Get the rotational elasticity along the axis of the joint, in newton per radian.
- Parameters
-
| dof | the degree of freedom to get the elasticity of |
- Returns
- the rotational elasticity
◆ getSpring()
| std::shared_ptr< LinearSpring > MOMENTUM_NAMESPACE::PrismaticJoint::getSpring |
( |
| ) |
const |
Get the spring of the translational z-axis.
◆ getTransformation()
| AffineMatrix4x4 MOMENTUM_NAMESPACE::Joint::getTransformation |
( |
int |
body | ) |
const |
|
inherited |
Get the transformation in the world frame of the attachment of specified body.
- Parameters
-
| body | - 0 for first body, 1 for second |
- Returns
- the attachment transformation in the world frame.
◆ getTranslationalDamping()
| double MOMENTUM_NAMESPACE::Joint::getTranslationalDamping |
( |
DegreeOfFreedom |
dof | ) |
const |
|
inherited |
Get the translational damping along the axis of the joint, in newton-seconds per meter.
- Parameters
-
| dof | the degree of freedom to get the damping of |
- Returns
- the translational damping
◆ getTranslationalElasticity()
| double MOMENTUM_NAMESPACE::Joint::getTranslationalElasticity |
( |
DegreeOfFreedom |
dof | ) |
const |
|
inherited |
Get the translational elasticity along the axis of the joint.
It is returned in newton per meter.
- Parameters
-
| dof | - select which dof for which the elasticity will be returned |
- Returns
- the translational elasticity
◆ operator==()
| bool MOMENTUM_NAMESPACE::Joint::operator== |
( |
const Joint & |
other | ) |
const |
|
inherited |
◆ setDampingInternal()
| void MOMENTUM_NAMESPACE::Joint::setDampingInternal |
( |
int |
agxDOF, |
|
|
double |
damping |
|
) |
| |
|
protectedinherited |
◆ setEnabled()
| void MOMENTUM_NAMESPACE::Joint::setEnabled |
( |
bool |
enabled | ) |
|
|
inherited |
Set to true if the joint should be enabled and should interact with the simulation.
- Parameters
-
| enabled | - if true the joint should interact with the simulation |
Only available in simulation mode
◆ setRotationalDamping()
| void MOMENTUM_NAMESPACE::Joint::setRotationalDamping |
( |
DegreeOfFreedom |
dof, |
|
|
double |
damping |
|
) |
| |
|
inherited |
Set the rotational damping along the axis of the joint, in newton-meter-seconds per radian.
- Parameters
-
| dof | the degree of freedom to set the damping of |
| damping | new the rotational damping |
Only available in simulation mode
◆ setRotationalElasticity()
| void MOMENTUM_NAMESPACE::Joint::setRotationalElasticity |
( |
DegreeOfFreedom |
dof, |
|
|
double |
elasticity |
|
) |
| |
|
inherited |
Set the rotational elasticity along the axis of the joint, in newton per radian.
- Parameters
-
| dof | the degree of freedom to set the elasticity of |
| elasticity | the new rotational elasticity |
Only available in simulation mode
◆ setTransformation()
| void MOMENTUM_NAMESPACE::Joint::setTransformation |
( |
int |
body, |
|
|
const AffineMatrix4x4 & |
transform |
|
) |
| |
|
inherited |
Set the attachment transformation in the world frame of the specified body.
- Parameters
-
| body | - 0 for first body, 1 for second |
| transform | - the new transformation of the attachment |
Only available in simulation mode
◆ setTranslationalDamping()
| void MOMENTUM_NAMESPACE::Joint::setTranslationalDamping |
( |
DegreeOfFreedom |
dof, |
|
|
double |
damping |
|
) |
| |
|
inherited |
Set the translational damping along the axis of the joint, in newton-seconds per meter.
- Parameters
-
| dof | the degree of freedom to set the damping of |
| damping | the new translational damping |
Only available in simulation mode
◆ setTranslationalElasticity()
| void MOMENTUM_NAMESPACE::Joint::setTranslationalElasticity |
( |
DegreeOfFreedom |
dof, |
|
|
double |
elasticity |
|
) |
| |
|
inherited |
Set the translational elasticity along the axis of the joint, in newton per meter.
- Parameters
-
| dof | the degree of freedom to set the elasticity of |
| elasticity | the new translational elasticity |
Only available in simulation mode