Blender V2.61 - r43446
Public Member Functions

btAngularLimit Class Reference

#include <btTypedConstraint.h>

List of all members.

Public Member Functions

 btAngularLimit ()
 Default constructor initializes limit as inactive, allowing free constraint movement.
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.
btScalar getBiasFactor () const
 Returns limit's bias factor.
btScalar getRelaxationFactor () const
 Returns limit's relaxation factor.
btScalar getCorrection () const
 Returns correction value evaluated when test() was invoked.
btScalar getSign () const
 Returns sign value evaluated when test() was invoked.
btScalar getHalfRange () const
 Gives half of the distance between min and max limit angle.
bool isLimit () const
 Returns true when the last test() invocation recognized limit violation.
void fit (btScalar &angle) const
btScalar getError () const
 Returns correction value multiplied by sign value.
btScalar getLow () const
btScalar getHigh () const

Detailed Description

Definition at line 316 of file btTypedConstraint.h.


Constructor & Destructor Documentation

btAngularLimit::btAngularLimit ( ) [inline]

Default constructor initializes limit as inactive, allowing free constraint movement.

Definition at line 333 of file btTypedConstraint.h.


Member Function Documentation

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 183 of file btTypedConstraint.cpp.

References btEqual(), btNormalizeAngle(), getHigh(), and getLow().

btScalar btAngularLimit::getBiasFactor ( ) const [inline]

Returns limit's bias factor.

Definition at line 360 of file btTypedConstraint.h.

btScalar btAngularLimit::getCorrection ( ) const [inline]

Returns correction value evaluated when test() was invoked.

Definition at line 372 of file btTypedConstraint.h.

btScalar btAngularLimit::getError ( ) const

Returns correction value multiplied by sign value.

Definition at line 178 of file btTypedConstraint.cpp.

btScalar btAngularLimit::getHalfRange ( ) const [inline]

Gives half of the distance between min and max limit angle.

Definition at line 384 of file btTypedConstraint.h.

btScalar btAngularLimit::getHigh ( ) const

Definition at line 207 of file btTypedConstraint.cpp.

References btNormalizeAngle().

Referenced by ATTRIBUTE_ALIGNED16(), and fit().

btScalar btAngularLimit::getLow ( ) const

Definition at line 202 of file btTypedConstraint.cpp.

References btNormalizeAngle().

Referenced by ATTRIBUTE_ALIGNED16(), and fit().

btScalar btAngularLimit::getRelaxationFactor ( ) const [inline]

Returns limit's relaxation factor.

Definition at line 366 of file btTypedConstraint.h.

btScalar btAngularLimit::getSign ( ) const [inline]

Returns sign value evaluated when test() was invoked.

Definition at line 378 of file btTypedConstraint.h.

Referenced by ATTRIBUTE_ALIGNED16().

btScalar btAngularLimit::getSoftness ( ) const [inline]

Returns limit's softness.

Definition at line 354 of file btTypedConstraint.h.

bool btAngularLimit::isLimit ( ) const [inline]

Returns true when the last test() invocation recognized limit violation.

Definition at line 390 of file btTypedConstraint.h.

Referenced by ATTRIBUTE_ALIGNED16().

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 144 of file btTypedConstraint.cpp.

References btNormalizeAngle().

Referenced by ATTRIBUTE_ALIGNED16().

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 153 of file btTypedConstraint.cpp.

References btNormalizeAngle().


The documentation for this class was generated from the following files: