3 new constraints added : btGeneric6DofSpringConstraint, btUniversalConstraint, btHinge2Constraint
Motors for btConeTwistConstraint added (for obsolete solver only) appConstraintDemo changed to test new constraints Several coding-style fixes
This commit is contained in:
@@ -62,6 +62,8 @@ public:
|
||||
bool m_useSolveConstraintObsolete;
|
||||
bool m_useReferenceFrameA;
|
||||
|
||||
btScalar m_accMotorImpulse;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@@ -116,6 +118,15 @@ public:
|
||||
m_maxMotorImpulse = maxMotorImpulse;
|
||||
}
|
||||
|
||||
// extra motor API, including ability to set a target rotation (as opposed to angular velocity)
|
||||
// note: setMotorTarget sets angular velocity under the hood, so you must call it every tick to
|
||||
// maintain a given angular target.
|
||||
void enableMotor(bool enableMotor) { m_enableAngularMotor = enableMotor; }
|
||||
void setMaxMotorImpulse(btScalar maxMotorImpulse) { m_maxMotorImpulse = maxMotorImpulse; }
|
||||
void setMotorTarget(const btQuaternion& qAinB, btScalar dt); // qAinB is rotation of body A wrt body B.
|
||||
void setMotorTarget(btScalar targetAngle, btScalar dt);
|
||||
|
||||
|
||||
void setLimit(btScalar low,btScalar high,btScalar _softness = 0.9f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f)
|
||||
{
|
||||
m_lowerLimit = low;
|
||||
|
||||
Reference in New Issue
Block a user