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:
@@ -144,15 +144,6 @@ public:
|
||||
|
||||
void updateRHS(btScalar timeStep);
|
||||
|
||||
const btTransform & getFrameOffsetA() const
|
||||
{
|
||||
return m_rbAFrame;
|
||||
}
|
||||
|
||||
const btTransform & getFrameOffsetB() const
|
||||
{
|
||||
return m_rbBFrame;
|
||||
}
|
||||
|
||||
const btRigidBody& getRigidBodyA() const
|
||||
{
|
||||
@@ -254,8 +245,6 @@ public:
|
||||
}
|
||||
bool isPastSwingLimit() { return m_solveSwingLimit; }
|
||||
|
||||
void setFrames(const btTransform & frameA, const btTransform & frameB);
|
||||
|
||||
void setDamping(btScalar damping) { m_damping = damping; }
|
||||
|
||||
void enableMotor(bool b) { m_bMotorEnabled = b; }
|
||||
@@ -279,6 +268,20 @@ public:
|
||||
///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);
|
||||
|
||||
virtual void setFrames(const btTransform& frameA, const btTransform& frameB);
|
||||
|
||||
const btTransform& getFrameOffsetA() const
|
||||
{
|
||||
return m_rbAFrame;
|
||||
}
|
||||
|
||||
const btTransform& getFrameOffsetB() const
|
||||
{
|
||||
return m_rbBFrame;
|
||||
}
|
||||
|
||||
|
||||
///return the local value of parameter
|
||||
virtual btScalar getParam(int num, int axis = -1) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user