|
Momentum Scripting v1
|
#include <Joint.h>
Public Types | |
| enum | DegreeOfFreedom { X , Y , Z } |
Protected Member Functions | |
| virtual int | getAgxRotationalDOF (DegreeOfFreedom) const |
| virtual int | getAgxTranslationalDOF (DegreeOfFreedom) const |
| agx::Real | getDampingInternal (int agxDOF) const |
| void | setDampingInternal (int agxDOF, double damping) |
Base class for all joints.
A Joint can constraint one or more degrees of freedom between one body and the world, or two bodies.
| std::shared_ptr< BallJoint > MOMENTUM_NAMESPACE::Joint::asBallJoint | ( | ) |
| std::shared_ptr< CylindricalJoint > MOMENTUM_NAMESPACE::Joint::asCylindricalJoint | ( | ) |
| std::shared_ptr< HingeJoint > MOMENTUM_NAMESPACE::Joint::asHingeJoint | ( | ) |
| std::shared_ptr< LockJoint > MOMENTUM_NAMESPACE::Joint::asLockJoint | ( | ) |
| std::shared_ptr< PrismaticJoint > MOMENTUM_NAMESPACE::Joint::asPrismaticJoint | ( | ) |
| std::shared_ptr< SpringJoint > MOMENTUM_NAMESPACE::Joint::asSpringJoint | ( | ) |
|
protectedvirtual |
|
protectedvirtual |
| std::shared_ptr< RigidBody > MOMENTUM_NAMESPACE::Joint::getBody | ( | int | body | ) | const |
Return the body at position 0 or 1, 1 can be nullptr, if that is the case, it is attached to world.
| body | - 0 for first body, 1 for second |
| Vec3 MOMENTUM_NAMESPACE::Joint::getBodyForce | ( | int | body | ) | const |
Get the force that the joint exerts on the specified body in the frame of the body, in newton.
| body | - 0 for first body, 1 for second |
| Vec3 MOMENTUM_NAMESPACE::Joint::getBodyTorque | ( | int | body | ) | const |
Get the torque that the joint exerts on the specified body in the frame of the body, in newton-meters.
| body | - 0 for first body, 1 for second |
|
protected |
| bool MOMENTUM_NAMESPACE::Joint::getEnabled | ( | ) | const |
Is the joint is enabled?
| std::string MOMENTUM_NAMESPACE::Joint::getName | ( | ) | const |
Get the name of the Joint.
| double MOMENTUM_NAMESPACE::Joint::getRotationalDamping | ( | DegreeOfFreedom | dof | ) | const |
Get the rotational damping along the axis of the joint, in newton-meter-seconds per radian.
| dof | the degree of freedom to get the damping of |
| double MOMENTUM_NAMESPACE::Joint::getRotationalElasticity | ( | DegreeOfFreedom | dof | ) | const |
Get the rotational elasticity along the axis of the joint, in newton per radian.
| dof | the degree of freedom to get the elasticity of |
| AffineMatrix4x4 MOMENTUM_NAMESPACE::Joint::getTransformation | ( | int | body | ) | const |
Get the transformation in the world frame of the attachment of specified body.
| body | - 0 for first body, 1 for second |
| double MOMENTUM_NAMESPACE::Joint::getTranslationalDamping | ( | DegreeOfFreedom | dof | ) | const |
Get the translational damping along the axis of the joint, in newton-seconds per meter.
| dof | the degree of freedom to get the damping of |
| double MOMENTUM_NAMESPACE::Joint::getTranslationalElasticity | ( | DegreeOfFreedom | dof | ) | const |
Get the translational elasticity along the axis of the joint.
It is returned in newton per meter.
| dof | - select which dof for which the elasticity will be returned |
| bool MOMENTUM_NAMESPACE::Joint::operator== | ( | const Joint & | other | ) | const |
|
protected |
| void MOMENTUM_NAMESPACE::Joint::setEnabled | ( | bool | enabled | ) |
Set to true if the joint should be enabled and should interact with the simulation.
| enabled | - if true the joint should interact with the simulation |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::Joint::setRotationalDamping | ( | DegreeOfFreedom | dof, |
| double | damping | ||
| ) |
Set the rotational damping along the axis of the joint, in newton-meter-seconds per radian.
| dof | the degree of freedom to set the damping of |
| damping | new the rotational damping |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::Joint::setRotationalElasticity | ( | DegreeOfFreedom | dof, |
| double | elasticity | ||
| ) |
Set the rotational elasticity along the axis of the joint, in newton per radian.
| dof | the degree of freedom to set the elasticity of |
| elasticity | the new rotational elasticity |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::Joint::setTransformation | ( | int | body, |
| const AffineMatrix4x4 & | transform | ||
| ) |
Set the attachment transformation in the world frame of the specified body.
| body | - 0 for first body, 1 for second |
| transform | - the new transformation of the attachment |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::Joint::setTranslationalDamping | ( | DegreeOfFreedom | dof, |
| double | damping | ||
| ) |
Set the translational damping along the axis of the joint, in newton-seconds per meter.
| dof | the degree of freedom to set the damping of |
| damping | the new translational damping |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::Joint::setTranslationalElasticity | ( | DegreeOfFreedom | dof, |
| double | elasticity | ||
| ) |
Set the translational elasticity along the axis of the joint, in newton per meter.
| dof | the degree of freedom to set the elasticity of |
| elasticity | the new translational elasticity |
Only available in simulation mode