Momentum Scripting v1
Loading...
Searching...
No Matches
MOMENTUM_NAMESPACE::AngularRange Class Reference

#include <AngularRange.h>

Public Member Functions

double getCurrentTorque () const
 
double getDamping () const
 
double getElasticity () const
 
bool getEnabled () const
 
std::pair< double, double > getRange () const
 
std::pair< double, double > getTorqueLimit () const
 
void setDamping (double damping)
 
void setElasticity (double elasticity)
 
void setEnabled (bool enabled)
 
void setRange (double min, double max)
 
void setRange (std::pair< double, double > range)
 
bool setTorqueLimit (double lower, double upper)
 
bool setTorqueLimit (std::pair< double, double > limit)
 

Detailed Description

Angular range will limit the rotation of a rotational joint between min and max range.

Member Function Documentation

◆ getCurrentTorque()

double MOMENTUM_NAMESPACE::AngularSecondaryJoint::getCurrentTorque ( ) const
inherited

Get the torque that the secondary constraint is applying to the object at the moment.

Returns
the current torque created by the constraint. Unit is in Newton-Meters.

◆ getDamping()

double MOMENTUM_NAMESPACE::SecondaryJoint::getDamping ( ) const
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.

Returns
the current damping of the secondary constraint

◆ getElasticity()

double MOMENTUM_NAMESPACE::SecondaryJoint::getElasticity ( ) const
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.

Returns
the current elasticity of the secondary constraint

◆ getEnabled()

bool MOMENTUM_NAMESPACE::SecondaryJoint::getEnabled ( ) const
inherited

Get if the secondary constraint is enabled on its parent joint.

Returns
true if the constraint is enabled for simulation

◆ getRange()

std::pair< double, double > MOMENTUM_NAMESPACE::AngularRange::getRange ( ) const

Get the min and max rotation (unit: radians) of the movement that this range allow.

Returns
The minimum and maximum angle of the range

◆ getTorqueLimit()

std::pair< double, double > MOMENTUM_NAMESPACE::AngularSecondaryJoint::getTorqueLimit ( ) const
inherited

Get the lower and upper torque of the secondary constraint.

The unit is in Newton-meters.

Returns
the current torque range of the constraint

◆ setDamping()

void MOMENTUM_NAMESPACE::SecondaryJoint::setDamping ( double  damping)
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.

Parameters
dampingthe new damping of the secondary constraint

Only available in simulation mode

◆ setElasticity()

void MOMENTUM_NAMESPACE::SecondaryJoint::setElasticity ( double  elasticity)
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.

Parameters
elasticitythe new elasticity of the secondary constraint

Only available in simulation mode

◆ setEnabled()

void MOMENTUM_NAMESPACE::SecondaryJoint::setEnabled ( bool  enabled)
inherited

Set if the secondary constraint is enabled on its parent joint.

Parameters
enabled- the new enable state for the constraint

Only available in simulation mode

◆ setRange() [1/2]

void MOMENTUM_NAMESPACE::AngularRange::setRange ( double  min,
double  max 
)

Set the min and max rotation (unit: radians) of the movement that this range allow.

Parameters
min- the new minimum rotation of the range
max- the new maximum rotation of the range

Only available in simulation mode

◆ setRange() [2/2]

void MOMENTUM_NAMESPACE::AngularRange::setRange ( std::pair< double, double >  range)

Set the min and max rotation (unit: radians) of the movement that this range allow.

Parameters
range- the new minimum and maximum rotation of the range

Only available in simulation mode

◆ setTorqueLimit() [1/2]

bool MOMENTUM_NAMESPACE::AngularSecondaryJoint::setTorqueLimit ( double  lower,
double  upper 
)
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

Parameters
lower- the new available torque in the negative direction
upper- the new available torque in the positive direction

Only available in simulation mode

Returns
true if values are correct

◆ setTorqueLimit() [2/2]

bool MOMENTUM_NAMESPACE::AngularSecondaryJoint::setTorqueLimit ( std::pair< double, double >  limit)
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

Parameters
limit- the new torque range of the constraint

Only available in simulation mode

Returns
true if values are correct