|
Momentum Scripting v1
|
#include <HingeJoint.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 () |
| double | getAngle () const |
| std::shared_ptr< RigidBody > | getBody (int body) const |
| Vec3 | getBodyForce (int body) const |
| Vec3 | getBodyTorque (int body) const |
| double | getCurrentSpeed () const |
| bool | getEnabled () const |
| std::shared_ptr< FrictionController > | getFrictionController () |
| std::shared_ptr< AngularMotor > | getMotor () const |
| std::string | getName () const |
| std::shared_ptr< AngularRange > | getRange () const |
| double | getRotationalDamping (DegreeOfFreedom dof) const |
| double | getRotationalElasticity (DegreeOfFreedom dof) const |
| std::shared_ptr< AngularSpring > | getSpring () 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 | 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) |
The hinge joint class, a joint where a rotational z-axis is unconstrained.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedvirtual |
Reimplemented from MOMENTUM_NAMESPACE::Joint.
|
protectedvirtual |
Reimplemented from MOMENTUM_NAMESPACE::Joint.
| double MOMENTUM_NAMESPACE::HingeJoint::getAngle | ( | ) | const |
Get the current rotation around the z-axis, in radians.
|
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::HingeJoint::getCurrentSpeed | ( | ) | const |
Get the current rotational speed around the z-axis in radians per second.
|
protectedinherited |
|
inherited |
Is the joint is enabled?
| std::shared_ptr< FrictionController > MOMENTUM_NAMESPACE::HingeJoint::getFrictionController | ( | ) |
| std::shared_ptr< AngularMotor > MOMENTUM_NAMESPACE::HingeJoint::getMotor | ( | ) | const |
Get the motor of the rotational z-axis.
|
inherited |
Get the name of the Joint.
| std::shared_ptr< AngularRange > MOMENTUM_NAMESPACE::HingeJoint::getRange | ( | ) | const |
Get the range of the rotational 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< AngularSpring > MOMENTUM_NAMESPACE::HingeJoint::getSpring | ( | ) | const |
Get the spring of the rotational z-axis.
|
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
|
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