2017-08-01 12:30:58 +00:00
|
|
|
#ifndef B3_CONTACT_CONSTRAINT5_H
|
|
|
|
#define B3_CONTACT_CONSTRAINT5_H
|
|
|
|
|
|
|
|
#include "Bullet3Common/shared/b3Float4.h"
|
|
|
|
|
|
|
|
typedef struct b3ContactConstraint4 b3ContactConstraint4_t;
|
|
|
|
|
|
|
|
struct b3ContactConstraint4
|
|
|
|
{
|
2019-01-03 13:26:51 +00:00
|
|
|
b3Float4 m_linear; //normal?
|
2017-08-01 12:30:58 +00:00
|
|
|
b3Float4 m_worldPos[4];
|
2019-01-03 13:26:51 +00:00
|
|
|
b3Float4 m_center; // friction
|
2017-08-01 12:30:58 +00:00
|
|
|
float m_jacCoeffInv[4];
|
|
|
|
float m_b[4];
|
|
|
|
float m_appliedRambdaDt[4];
|
2019-01-03 13:26:51 +00:00
|
|
|
float m_fJacCoeffInv[2]; // friction
|
|
|
|
float m_fAppliedRambdaDt[2]; // friction
|
2017-08-01 12:30:58 +00:00
|
|
|
|
|
|
|
unsigned int m_bodyA;
|
|
|
|
unsigned int m_bodyB;
|
2019-01-03 13:26:51 +00:00
|
|
|
int m_batchIdx;
|
2017-08-01 12:30:58 +00:00
|
|
|
unsigned int m_paddings;
|
|
|
|
};
|
|
|
|
|
|
|
|
//inline void setFrictionCoeff(float value) { m_linear[3] = value; }
|
2019-01-03 13:26:51 +00:00
|
|
|
inline float b3GetFrictionCoeff(b3ContactConstraint4_t* constraint)
|
2017-08-01 12:30:58 +00:00
|
|
|
{
|
2019-01-03 13:26:51 +00:00
|
|
|
return constraint->m_linear.w;
|
2017-08-01 12:30:58 +00:00
|
|
|
}
|
|
|
|
|
2019-01-03 13:26:51 +00:00
|
|
|
#endif //B3_CONTACT_CONSTRAINT5_H
|