The btGeatConstraint will couple the angular velocity for two bodies around given local axis and ratio. More...
#include <btGearConstraint.h>
Public Member Functions | |
btGearConstraint (btRigidBody &rbA, btRigidBody &rbB, const btVector3 &axisInA, const btVector3 &axisInB, btScalar ratio=1.f) | |
Implemented by Erwin Coumans. The idea for the constraint comes from Dimitris Papavasiliou. | |
virtual | ~btGearConstraint () |
virtual void | getInfo1 (btConstraintInfo1 *info) |
internal method used by the constraint solver, don't use them directly | |
virtual void | getInfo2 (btConstraintInfo2 *info) |
internal method used by the constraint solver, don't use them directly | |
virtual void | setParam (int num, btScalar value, int axis=-1) |
override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). | |
virtual btScalar | getParam (int num, int axis=-1) const |
return the local value of parameter | |
Protected Attributes | |
btVector3 | m_axisInA |
btVector3 | m_axisInB |
bool | m_useFrameA |
btScalar | m_ratio |
The btGeatConstraint will couple the angular velocity for two bodies around given local axis and ratio.
See Bullet/Demos/ConstraintDemo for an example use.
Definition at line 24 of file btGearConstraint.h.
btGearConstraint::btGearConstraint | ( | btRigidBody & | rbA, | |
btRigidBody & | rbB, | |||
const btVector3 & | axisInA, | |||
const btVector3 & | axisInB, | |||
btScalar | ratio = 1.f | |||
) |
Implemented by Erwin Coumans. The idea for the constraint comes from Dimitris Papavasiliou.
Definition at line 20 of file btGearConstraint.cpp.
btGearConstraint::~btGearConstraint | ( | ) | [virtual] |
Definition at line 28 of file btGearConstraint.cpp.
void btGearConstraint::getInfo1 | ( | btConstraintInfo1 * | info | ) | [virtual] |
internal method used by the constraint solver, don't use them directly
Implements btTypedConstraint.
Definition at line 32 of file btGearConstraint.cpp.
void btGearConstraint::getInfo2 | ( | btConstraintInfo2 * | info | ) | [virtual] |
internal method used by the constraint solver, don't use them directly
Implements btTypedConstraint.
Definition at line 38 of file btGearConstraint.cpp.
virtual btScalar btGearConstraint::getParam | ( | int | num, | |
int | axis = -1 | |||
) | const [inline, virtual] |
return the local value of parameter
Implements btTypedConstraint.
Definition at line 48 of file btGearConstraint.h.
virtual void btGearConstraint::setParam | ( | int | num, | |
btScalar | value, | |||
int | axis = -1 | |||
) | [inline, virtual] |
override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
If no axis is provided, it uses the default axis for this constraint.
Implements btTypedConstraint.
Definition at line 42 of file btGearConstraint.h.
btVector3 btGearConstraint::m_axisInA [protected] |
Definition at line 27 of file btGearConstraint.h.
btVector3 btGearConstraint::m_axisInB [protected] |
Definition at line 28 of file btGearConstraint.h.
btScalar btGearConstraint::m_ratio [protected] |
Definition at line 30 of file btGearConstraint.h.
bool btGearConstraint::m_useFrameA [protected] |
Definition at line 29 of file btGearConstraint.h.