Bullet Collision Detection & Physics Library
|
#include <btTypedConstraint.h>
Public Member Functions | |
btAngularLimit () | |
Default constructor initializes limit as inactive, allowing free constraint movement. More... | |
void | set (btScalar low, btScalar high, btScalar _softness=0.9f, btScalar _biasFactor=0.3f, btScalar _relaxationFactor=1.0f) |
Sets all limit's parameters. More... | |
void | test (const btScalar angle) |
Checks conastaint angle against limit. More... | |
btScalar | getSoftness () const |
Returns limit's softness. More... | |
btScalar | getBiasFactor () const |
Returns limit's bias factor. More... | |
btScalar | getRelaxationFactor () const |
Returns limit's relaxation factor. More... | |
btScalar | getCorrection () const |
Returns correction value evaluated when test() was invoked. More... | |
btScalar | getSign () const |
Returns sign value evaluated when test() was invoked. More... | |
btScalar | getHalfRange () const |
Gives half of the distance between min and max limit angle. More... | |
bool | isLimit () const |
Returns true when the last test() invocation recognized limit violation. More... | |
void | fit (btScalar &angle) const |
Checks given angle against limit. More... | |
btScalar | getError () const |
Returns correction value multiplied by sign value. More... | |
btScalar | getLow () const |
btScalar | getHigh () const |
Private Attributes | |
btScalar | m_center |
btScalar | m_halfRange |
btScalar | m_softness |
btScalar | m_biasFactor |
btScalar | m_relaxationFactor |
btScalar | m_correction |
btScalar | m_sign |
bool | m_solveLimit |
Definition at line 452 of file btTypedConstraint.h.
|
inline |
Default constructor initializes limit as inactive, allowing free constraint movement.
Definition at line 469 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.
Definition at line 195 of file btTypedConstraint.cpp.
|
inline |
Returns limit's bias factor.
Definition at line 496 of file btTypedConstraint.h.
|
inline |
Returns correction value evaluated when test() was invoked.
Definition at line 508 of file btTypedConstraint.h.
btScalar btAngularLimit::getError | ( | ) | const |
Returns correction value multiplied by sign value.
Definition at line 190 of file btTypedConstraint.cpp.
|
inline |
Gives half of the distance between min and max limit angle.
Definition at line 520 of file btTypedConstraint.h.
btScalar btAngularLimit::getHigh | ( | ) | const |
Definition at line 219 of file btTypedConstraint.cpp.
btScalar btAngularLimit::getLow | ( | ) | const |
Definition at line 214 of file btTypedConstraint.cpp.
|
inline |
Returns limit's relaxation factor.
Definition at line 502 of file btTypedConstraint.h.
|
inline |
Returns sign value evaluated when test() was invoked.
Definition at line 514 of file btTypedConstraint.h.
|
inline |
Returns limit's softness.
Definition at line 490 of file btTypedConstraint.h.
|
inline |
Returns true when the last test() invocation recognized limit violation.
Definition at line 526 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
Definition at line 156 of file btTypedConstraint.cpp.
void btAngularLimit::test | ( | const btScalar | angle | ) |
Checks conastaint angle against limit.
If limit is active and the angle violates the limit correction is calculated.
Definition at line 165 of file btTypedConstraint.cpp.
|
private |
Definition at line 456 of file btTypedConstraint.h.
|
private |
Definition at line 456 of file btTypedConstraint.h.
|
private |
Definition at line 456 of file btTypedConstraint.h.
|
private |
Definition at line 456 of file btTypedConstraint.h.
|
private |
Definition at line 456 of file btTypedConstraint.h.
|
private |
Definition at line 456 of file btTypedConstraint.h.
|
private |
Definition at line 456 of file btTypedConstraint.h.
|
private |
Definition at line 465 of file btTypedConstraint.h.