more work towards shared CPU/OpenCL codebase
This commit is contained in:
33
src/Bullet3Dynamics/shared/b3ContactConstraint4.h
Normal file
33
src/Bullet3Dynamics/shared/b3ContactConstraint4.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef B3_CONTACT_CONSTRAINT5_H
|
||||
#define B3_CONTACT_CONSTRAINT5_H
|
||||
|
||||
#include "Bullet3Common/shared/b3Float4.h"
|
||||
|
||||
typedef struct b3ContactConstraint4 b3ContactConstraint4_t;
|
||||
|
||||
struct b3ContactConstraint4
|
||||
{
|
||||
|
||||
b3Float4 m_linear;//normal?
|
||||
b3Float4 m_worldPos[4];
|
||||
b3Float4 m_center; // friction
|
||||
float m_jacCoeffInv[4];
|
||||
float m_b[4];
|
||||
float m_appliedRambdaDt[4];
|
||||
float m_fJacCoeffInv[2]; // friction
|
||||
float m_fAppliedRambdaDt[2]; // friction
|
||||
|
||||
unsigned int m_bodyA;
|
||||
unsigned int m_bodyB;
|
||||
int m_batchIdx;
|
||||
unsigned int m_paddings;
|
||||
|
||||
};
|
||||
|
||||
//inline void setFrictionCoeff(float value) { m_linear[3] = value; }
|
||||
inline float b3GetFrictionCoeff(b3ContactConstraint4* constraint)
|
||||
{
|
||||
return constraint->m_linear[3];
|
||||
}
|
||||
|
||||
#endif //B3_CONTACT_CONSTRAINT5_H
|
||||
15
src/Bullet3Dynamics/shared/b3Inertia.h
Normal file
15
src/Bullet3Dynamics/shared/b3Inertia.h
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
#ifndef B3_INERTIA_H
|
||||
#define B3_INERTIA_H
|
||||
|
||||
#include "Bullet3Common/shared/b3Mat3x3.h"
|
||||
|
||||
struct b3Inertia
|
||||
{
|
||||
b3Mat3x3 m_invInertiaWorld;
|
||||
b3Mat3x3 m_initInvInertia;
|
||||
};
|
||||
|
||||
|
||||
#endif //B3_INERTIA_H
|
||||
Reference in New Issue
Block a user