Bullet Collision Detection & Physics Library: btAngularLimit Class Reference

Bullet Collision Detection & Physics Library

Public Member Functions | Private Attributes | List of all members
btAngularLimit Class Reference

`#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

## Detailed Description

Definition at line 440 of file btTypedConstraint.h.

## Constructor & Destructor Documentation

## ◆ btAngularLimit()

btAngularLimit::btAngularLimit | ( |  | ) |
| inline

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

Definition at line 457 of file btTypedConstraint.h.

## Member Function Documentation

## ◆ fit()

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

## ◆ getBiasFactor()

btScalar btAngularLimit::getBiasFactor | ( |  | ) | const
| inline

Returns limit's bias factor.

Definition at line 485 of file btTypedConstraint.h.

## ◆ getCorrection()

btScalar btAngularLimit::getCorrection | ( |  | ) | const
| inline

Returns correction value evaluated when test() was invoked.

Definition at line 497 of file btTypedConstraint.h.

## ◆ getError()

btScalar btAngularLimit::getError | ( |  | ) | const

Returns correction value multiplied by sign value.

Definition at line 182 of file btTypedConstraint.cpp.

## ◆ getHalfRange()

btScalar btAngularLimit::getHalfRange | ( |  | ) | const
| inline

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

Definition at line 509 of file btTypedConstraint.h.

## ◆ getHigh()

btScalar btAngularLimit::getHigh | ( |  | ) | const

Definition at line 211 of file btTypedConstraint.cpp.

## ◆ getLow()

btScalar btAngularLimit::getLow | ( |  | ) | const

Definition at line 206 of file btTypedConstraint.cpp.

## ◆ getRelaxationFactor()

btScalar btAngularLimit::getRelaxationFactor | ( |  | ) | const
| inline

Returns limit's relaxation factor.

Definition at line 491 of file btTypedConstraint.h.

## ◆ getSign()

btScalar btAngularLimit::getSign | ( |  | ) | const
| inline

Returns sign value evaluated when test() was invoked.

Definition at line 503 of file btTypedConstraint.h.

## ◆ getSoftness()

btScalar btAngularLimit::getSoftness | ( |  | ) | const
| inline

Returns limit's softness.

Definition at line 479 of file btTypedConstraint.h.

## ◆ isLimit()

bool btAngularLimit::isLimit | ( |  | ) | const
| inline

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

Definition at line 515 of file btTypedConstraint.h.

## ◆ set()

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.

## ◆ test()

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

## Member Data Documentation

## ◆ m_biasFactor

btScalar btAngularLimit::m_biasFactor
| private

Definition at line 444 of file btTypedConstraint.h.

## ◆ m_center

btScalar btAngularLimit::m_center
| private

Definition at line 444 of file btTypedConstraint.h.

## ◆ m_correction

btScalar btAngularLimit::m_correction
| private

Definition at line 444 of file btTypedConstraint.h.

## ◆ m_halfRange

btScalar btAngularLimit::m_halfRange
| private

Definition at line 444 of file btTypedConstraint.h.

## ◆ m_relaxationFactor

btScalar btAngularLimit::m_relaxationFactor
| private

Definition at line 444 of file btTypedConstraint.h.

## ◆ m_sign

btScalar btAngularLimit::m_sign
| private

Definition at line 444 of file btTypedConstraint.h.

## ◆ m_softness

btScalar btAngularLimit::m_softness
| private

Definition at line 444 of file btTypedConstraint.h.

## ◆ m_solveLimit

bool btAngularLimit::m_solveLimit
| private

Definition at line 453 of file btTypedConstraint.h.

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

- btTypedConstraint.h
- btTypedConstraint.cpp