|
Momentum Scripting v1
|
#include <AngularMotor.h>
Public Member Functions | |
| double | getCurrentTorque () const |
| double | getDamping () const |
| double | getElasticity () const |
| bool | getEnabled () const |
| bool | getEnableSpringAtZeroSpeed () const |
| double | getTargetSpeed () const |
| std::pair< double, double > | getTorqueLimit () const |
| void | setDamping (double damping) |
| void | setElasticity (double elasticity) |
| void | setEnabled (bool enabled) |
| void | setEnableSpringAtZeroSpeed (bool flag) |
| void | setTargetSpeed (double speed) |
| bool | setTorqueLimit (double lower, double upper) |
| bool | setTorqueLimit (std::pair< double, double > limit) |
An angular motor will try to reach a target rotation speed with the specified max torque.
|
inherited |
Get the torque that the secondary constraint is applying to the object at the moment.
|
inherited |
Get the damping of the secondary constraint, depending if it is linear or rotational it is in different units, newton-seconds per meter for linear and newton-meter-seconds per radian if it is rotational.
|
inherited |
Get the elasticity of the secondary constraint, depending if it is linear or rotational it is in different units, newton per meter for linear and newton per radian if it is rotational.
|
inherited |
Get if the secondary constraint is enabled on its parent joint.
| bool MOMENTUM_NAMESPACE::AngularMotor::getEnableSpringAtZeroSpeed | ( | ) | const |
| double MOMENTUM_NAMESPACE::AngularMotor::getTargetSpeed | ( | ) | const |
Get the target speed that the motor tries to reach using the available torque.
In radians per second.
|
inherited |
Get the lower and upper torque of the secondary constraint.
The unit is in Newton-meters.
|
inherited |
Set the damping of the secondary constraint, depending if it is linear or rotational it is in different units, newton-seconds per meter for linear and newton-meter-seconds per radian if it is rotational.
| damping | the new damping of the secondary constraint |
Only available in simulation mode
|
inherited |
Set the elasticity of the secondary constraint, depending if it is linear or rotational it is in different units, newton-seconds per meter for linear and newton-meter-seconds per radian if it is rotational.
| elasticity | the new elasticity of the secondary constraint |
Only available in simulation mode
|
inherited |
Set if the secondary constraint is enabled on its parent joint.
| enabled | - the new enable state for the constraint |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::AngularMotor::setEnableSpringAtZeroSpeed | ( | bool | flag | ) |
When target speed is set to zero for the motor, the motor can be specified to act like a spring, keeping the current position.
| flag | - If true, the motor will act like a spring if target speed == 0 |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::AngularMotor::setTargetSpeed | ( | double | speed | ) |
Set the target speed that the motor tries to reach using the available torque.
In radians per second. Infinity is not a valid speed and will be ignored with a warning.
| speed | - the new target speed of the motor |
Only available in simulation mode
|
inherited |
Set the minimum and maximum torque of the secondary constraint.
The unit is in Newton-meters.
Both cannot be inf, or -inf, that will be ignored and the method will return false
| lower | - the new available torque in the negative direction |
| upper | - the new available torque in the positive direction |
Only available in simulation mode
|
inherited |
Set the lower and upper torque of the secondary constraint.
The unit is in Newton-meters. Both cannot be inf, or -inf, that will be ignored and the method will return false
| limit | - the new torque range of the constraint |
Only available in simulation mode