Blender
V3.3
|
#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) |
void | test (const btScalar angle) |
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 |
btScalar | getError () const |
Returns correction value multiplied by sign value. More... | |
btScalar | getLow () const |
btScalar | getHigh () const |
Definition at line 440 of file btTypedConstraint.h.
|
inline |
Default constructor initializes limit as inactive, allowing free constraint movement.
Definition at line 457 of file btTypedConstraint.h.
References m_biasFactor, and m_relaxationFactor.
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 187 of file btTypedConstraint.cpp.
References angle(), btEqual(), btNormalizeAngle(), getHigh(), and getLow().
Referenced by setMotorTarget().
|
inline |
Returns limit's bias factor.
Definition at line 485 of file btTypedConstraint.h.
References m_biasFactor.
Referenced by getInfo2Internal(), getInfo2InternalUsingFrameOffset(), and getLimitBiasFactor().
|
inline |
Returns correction value evaluated when test() was invoked.
Definition at line 497 of file btTypedConstraint.h.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
btScalar btAngularLimit::getError | ( | ) | const |
Returns correction value multiplied by sign value.
Definition at line 182 of file btTypedConstraint.cpp.
|
inline |
Gives half of the distance between min and max limit angle.
Definition at line 509 of file btTypedConstraint.h.
Referenced by hasLimit().
btScalar btAngularLimit::getHigh | ( | ) | const |
Definition at line 211 of file btTypedConstraint.cpp.
References btNormalizeAngle().
Referenced by fit(), and getUpperLimit().
btScalar btAngularLimit::getLow | ( | ) | const |
Definition at line 206 of file btTypedConstraint.cpp.
References btNormalizeAngle().
Referenced by fit(), and getLowerLimit().
|
inline |
Returns limit's relaxation factor.
Definition at line 491 of file btTypedConstraint.h.
References m_relaxationFactor.
Referenced by getInfo2Internal(), getInfo2InternalUsingFrameOffset(), and getLimitRelaxationFactor().
|
inline |
Returns sign value evaluated when test() was invoked.
Definition at line 503 of file btTypedConstraint.h.
Referenced by getLimitSign().
|
inline |
Returns limit's softness.
Definition at line 479 of file btTypedConstraint.h.
Referenced by getLimitSoftness().
|
inline |
Returns true when the last test() invocation recognized limit violation.
Definition at line 515 of file btTypedConstraint.h.
Referenced by getSolveLimit().
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 149 of file btTypedConstraint.cpp.
References btNormalizeAngle(), high(), and low().
Referenced by setLimit().
Checks conastaint angle against limit. If limit is active and the angle violates the limit correction is calculated.
Definition at line 158 of file btTypedConstraint.cpp.
References angle(), and btNormalizeAngle().
Referenced by testLimit().