|
Momentum Scripting v1
|
#include <LinearRange.h>
Public Member Functions | |
| double | getCurrentForce () const |
| double | getDamping () const |
| double | getElasticity () const |
| bool | getEnabled () const |
| std::pair< double, double > | getForceLimit () const |
| std::pair< double, double > | getRange () const |
| void | setDamping (double damping) |
| void | setElasticity (double elasticity) |
| void | setEnabled (bool enabled) |
| bool | setForceLimit (double lower, double upper) |
| bool | setForceLimit (std::pair< double, double > limit) |
| void | setRange (double min, double max) |
| void | setRange (std::pair< double, double > range) |
Linear range will limit the motion between min and max range.
|
inherited |
Get the force 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.
|
inherited |
Get the lower and upper force of the secondary constraint.
The unit is in Newton.
| std::pair< double, double > MOMENTUM_NAMESPACE::LinearRange::getRange | ( | ) | const |
Get the min and max position (unit: meter) of the movement that this range allow.
|
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
|
inherited |
Set the lower and upper force of the secondary constraint.
The unit is in Newton.
Both cannot be inf, or -inf, that will be ignored and the method will return false
| lower | - the new available force of the constraint in the negative direction |
| upper | - the new available force of the constraint in the positive direction |
Only available in simulation mode
|
inherited |
Set the lower and upper force of the secondary constraint.
The unit is in Newton.
Both cannot be inf, or -inf, that will be ignored and the method will return false
| limit | - the new force range of the constraint |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::LinearRange::setRange | ( | double | min, |
| double | max | ||
| ) |
Set the min and max position (unit: meter) of the movement that this range allow.
| min | - the new minimum position |
| max | - the new maximum position |
Only available in simulation mode
| void MOMENTUM_NAMESPACE::LinearRange::setRange | ( | std::pair< double, double > | range | ) |
Set the min and max position (unit: meter) of the movement that this range allow.
| range | - the new minimum and maximum position of the range |
Only available in simulation mode