|
Momentum Scripting v1
|
#include <SpringJoint.h>
Public Types | |
| enum | DegreeOfFreedom { X , Y , Z } |
Public Member Functions | |
| std::shared_ptr< BallJoint > | asBallJoint () |
| std::shared_ptr< CylindricalJoint > | asCylindricalJoint () |
| std::shared_ptr< HingeJoint > | asHingeJoint () |
| std::shared_ptr< LockJoint > | asLockJoint () |
| std::shared_ptr< PrismaticJoint > | asPrismaticJoint () |
| std::shared_ptr< SpringJoint > | asSpringJoint () |
| std::shared_ptr< RigidBody > | getBody (int body) const |
| Vec3 | getBodyForce (int body) const |
| Vec3 | getBodyTorque (int body) const |
| double | getCurrentLength () const |
| bool | getEnabled () const |
| std::shared_ptr< LinearMotor > | getMotor () const |
| std::string | getName () const |
| std::shared_ptr< LinearRange > | getRange () const |
| double | getRotationalDamping (DegreeOfFreedom dof) const |
| double | getRotationalElasticity (DegreeOfFreedom dof) const |
| std::shared_ptr< LinearSpring > | getSpring () const |
| double | getSpringDamping () const |
| double | getSpringElasticity () const |
| AffineMatrix4x4 | getTransformation (int body) const |
| double | getTranslationalDamping (DegreeOfFreedom dof) const |
| double | getTranslationalElasticity (DegreeOfFreedom dof) const |
| bool | operator== (const Joint &other) const |
| void | setEnabled (bool enabled) |
| void | setRotationalDamping (DegreeOfFreedom dof, double damping) |
| void | setRotationalElasticity (DegreeOfFreedom dof, double elasticity) |
| void | setSpringDamping (double damping) |
| void | setSpringElasticity (double elasticity) |
| void | setTransformation (int body, const AffineMatrix4x4 &transform) |
| void | setTranslationalDamping (DegreeOfFreedom dof, double damping) |
| void | setTranslationalElasticity (DegreeOfFreedom dof, double elasticity) |
Protected Member Functions | |
| virtual int | getAgxRotationalDOF (Joint::DegreeOfFreedom dof) const |
| virtual int | getAgxTranslationalDOF (Joint::DegreeOfFreedom dof) const |
| agx::Real | getDampingInternal (int agxDOF) const |
| void | setDampingInternal (int agxDOF, double damping) |
A spring joint is a joint which will try to restore the distance between attached bodies.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedvirtual |
Reimplemented from MOMENTUM_NAMESPACE::Joint.
|
protectedvirtual |
Reimplemented from MOMENTUM_NAMESPACE::Joint.
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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 |
| double MOMENTUM_NAMESPACE::SpringJoint::getCurrentLength | ( | ) | const |
Get the current distance between the attachment points of the spring, in meters.
|
protectedinherited |
|
inherited |
Is the joint is enabled?
| std::shared_ptr< LinearMotor > MOMENTUM_NAMESPACE::SpringJoint::getMotor | ( | ) | const |
Get the motor of the translational z-axis.
|
inherited |
Get the name of the Joint.
| std::shared_ptr< LinearRange > MOMENTUM_NAMESPACE::SpringJoint::getRange | ( | ) | const |
Get the range of the translational z-axis.
|
inherited |
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 |
|
inherited |
Get the rotational elasticity along the axis of the joint, in newton per radian.
| dof | the degree of freedom to get the elasticity of |
| std::shared_ptr< LinearSpring > MOMENTUM_NAMESPACE::SpringJoint::getSpring | ( | ) | const |
Get the spring of the translational z-axis.
| double MOMENTUM_NAMESPACE::SpringJoint::getSpringDamping | ( | ) | const |
Get the damping of the spring, in the unit of Newton-seconds per meter.
| double MOMENTUM_NAMESPACE::SpringJoint::getSpringElasticity | ( | ) | const |
Get the elasticity of the spring, in the unit of Newton per meter.
|
inherited |
Get the transformation in the world frame of the attachment of specified body.
| body | - 0 for first body, 1 for second |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
|
protectedinherited |
|
inherited |
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
|
inherited |
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
|
inherited |
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::SpringJoint::setSpringDamping | ( | double | damping | ) |
Set the damping of the spring, in the unit of Newton-seconds per meter.
| damping | the new damping of the spring |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::SpringJoint::setSpringElasticity | ( | double | elasticity | ) |
Set the elasticity of the spring, in the unit of Newton per meter.
| elasticity | the new elasticity of the spring |
Only available in simulation mode
|
inherited |
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
|
inherited |
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
|
inherited |
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