share more data structures and code between OpenCL and C/C++ on CPU:

move the setConstraint4/b3ConvertConstraint4 to shared code.
This commit is contained in:
erwin coumans
2013-11-07 12:46:01 -08:00
parent a9a758dd54
commit e20cb22832
16 changed files with 1249 additions and 908 deletions

View File

@@ -34,11 +34,9 @@ B3_ATTRIBUTE_ALIGNED16(struct) b3RigidBodyCL : public b3RigidBodyData
};
struct b3InertiaCL
struct b3InertiaCL : public b3InertiaData
{
b3Matrix3x3 m_invInertiaWorld;
b3Matrix3x3 m_initInvInertia;
};
#endif//B3_RIGID_BODY_CL

View File

@@ -3,6 +3,7 @@
#include "Bullet3Common/shared/b3Float4.h"
#include "Bullet3Common/shared/b3Quat.h"
#include "Bullet3Common/shared/b3Mat3x3.h"
typedef struct b3RigidBodyData b3RigidBodyData_t;
@@ -19,7 +20,15 @@ struct b3RigidBodyData
float m_restituitionCoeff;
float m_frictionCoeff;
};
typedef struct b3InertiaData b3InertiaData_t;
struct b3InertiaData
{
b3Mat3x3 m_invInertiaWorld;
b3Mat3x3 m_initInvInertia;
};
#endif //B3_RIGIDBODY_DATA_H