Added some helper methods for constraints and btMatrix3x3,
Thanks to francois, See Issue 466 Prevent crash in SoftBodyDemo, when picking constraints and demo-mode switches to next demo.
This commit is contained in:
@@ -255,6 +255,15 @@ public:
|
||||
bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; }
|
||||
void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstraintFrame = frameOffsetOnOff; }
|
||||
|
||||
void setFrames(const btTransform& frameA, const btTransform& frameB)
|
||||
{
|
||||
m_frameInA=frameA;
|
||||
m_frameInB=frameB;
|
||||
calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
|
||||
buildJacobian();
|
||||
}
|
||||
|
||||
|
||||
///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.
|
||||
virtual void setParam(int num, btScalar value, int axis = -1);
|
||||
|
||||
Reference in New Issue
Block a user