#include <btTypedConstraint.h>
Public Member Functions | |
btAngularLimit () | |
Default constructor initializes limit as inactive, allowing free constraint movement. | |
void | fit (btScalar &angle) const |
btScalar | getBiasFactor () const |
Returns limit's bias factor. | |
btScalar | getCorrection () const |
Returns correction value evaluated when test() was invoked. | |
btScalar | getError () const |
Returns correction value multiplied by sign value. | |
btScalar | getHalfRange () const |
Gives half of the distance between min and max limit angle. | |
btScalar | getHigh () const |
btScalar | getLow () const |
btScalar | getRelaxationFactor () const |
Returns limit's relaxation factor. | |
btScalar | getSign () const |
Returns sign value evaluated when test() was invoked. | |
btScalar | getSoftness () const |
Returns limit's softness. | |
bool | isLimit () const |
Returns true when the last test() invocation recognized limit violation. | |
void | set (btScalar low, btScalar high, btScalar _softness=0.9f, btScalar _biasFactor=0.3f, btScalar _relaxationFactor=1.0f) |
void | test (const btScalar angle) |
Private Attributes | |
btScalar | m_biasFactor |
btScalar | m_center |
btScalar | m_correction |
btScalar | m_halfRange |
btScalar | m_relaxationFactor |
btScalar | m_sign |
btScalar | m_softness |
bool | m_solveLimit |
Definition at line 342 of file btTypedConstraint.h.
btAngularLimit::btAngularLimit | ( | ) | [inline] |
Default constructor initializes limit as inactive, allowing free constraint movement.
Definition at line 359 of file btTypedConstraint.h.
void btAngularLimit::fit | ( | btScalar & | angle | ) | const |
Checks given angle against limit. If limit is active and angle doesn't fit it, the angle returned is modified so it equals to the limit closest to given angle.
btScalar btAngularLimit::getBiasFactor | ( | ) | const [inline] |
Returns limit's bias factor.
Definition at line 386 of file btTypedConstraint.h.
btScalar btAngularLimit::getCorrection | ( | ) | const [inline] |
Returns correction value evaluated when test() was invoked.
Definition at line 398 of file btTypedConstraint.h.
btScalar btAngularLimit::getError | ( | ) | const |
Returns correction value multiplied by sign value.
btScalar btAngularLimit::getHalfRange | ( | ) | const [inline] |
Gives half of the distance between min and max limit angle.
Definition at line 410 of file btTypedConstraint.h.
btScalar btAngularLimit::getHigh | ( | ) | const |
btScalar btAngularLimit::getLow | ( | ) | const |
btScalar btAngularLimit::getRelaxationFactor | ( | ) | const [inline] |
Returns limit's relaxation factor.
Definition at line 392 of file btTypedConstraint.h.
btScalar btAngularLimit::getSign | ( | ) | const [inline] |
Returns sign value evaluated when test() was invoked.
Definition at line 404 of file btTypedConstraint.h.
btScalar btAngularLimit::getSoftness | ( | ) | const [inline] |
Returns limit's softness.
Definition at line 380 of file btTypedConstraint.h.
bool btAngularLimit::isLimit | ( | ) | const [inline] |
Returns true when the last test() invocation recognized limit violation.
Definition at line 416 of file btTypedConstraint.h.
void btAngularLimit::set | ( | btScalar | low, |
btScalar | high, | ||
btScalar | _softness = 0.9f , |
||
btScalar | _biasFactor = 0.3f , |
||
btScalar | _relaxationFactor = 1.0f |
||
) |
Sets all limit's parameters. When low > high limit becomes inactive. When high - low > 2PI limit is ineffective too becouse no angle can exceed the limit
void btAngularLimit::test | ( | const btScalar | angle | ) |
Checks conastaint angle against limit. If limit is active and the angle violates the limit correction is calculated.
btScalar btAngularLimit::m_biasFactor [private] |
Definition at line 346 of file btTypedConstraint.h.
btScalar btAngularLimit::m_center [private] |
Definition at line 346 of file btTypedConstraint.h.
btScalar btAngularLimit::m_correction [private] |
Definition at line 346 of file btTypedConstraint.h.
btScalar btAngularLimit::m_halfRange [private] |
Definition at line 346 of file btTypedConstraint.h.
btScalar btAngularLimit::m_relaxationFactor [private] |
Definition at line 346 of file btTypedConstraint.h.
btScalar btAngularLimit::m_sign [private] |
Definition at line 346 of file btTypedConstraint.h.
btScalar btAngularLimit::m_softness [private] |
Definition at line 346 of file btTypedConstraint.h.
bool btAngularLimit::m_solveLimit [private] |
Definition at line 355 of file btTypedConstraint.h.