b3Contact4Data.h 847 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef B3_CONTACT4DATA_H
  2. #define B3_CONTACT4DATA_H
  3. #include "Bullet3Common/shared/b3Float4.h"
  4. typedef struct b3Contact4Data b3Contact4Data_t;
  5. struct b3Contact4Data
  6. {
  7. b3Float4 m_worldPosB[4];
  8. // b3Float4 m_localPosA[4];
  9. // b3Float4 m_localPosB[4];
  10. b3Float4 m_worldNormalOnB; // w: m_nPoints
  11. unsigned short m_restituitionCoeffCmp;
  12. unsigned short m_frictionCoeffCmp;
  13. int m_batchIdx;
  14. int m_bodyAPtrAndSignBit; //x:m_bodyAPtr, y:m_bodyBPtr
  15. int m_bodyBPtrAndSignBit;
  16. int m_childIndexA;
  17. int m_childIndexB;
  18. int m_unused1;
  19. int m_unused2;
  20. };
  21. inline int b3Contact4Data_getNumPoints(const struct b3Contact4Data* contact)
  22. {
  23. return (int)contact->m_worldNormalOnB.w;
  24. };
  25. inline void b3Contact4Data_setNumPoints(struct b3Contact4Data* contact, int numPoints)
  26. {
  27. contact->m_worldNormalOnB.w = (float)numPoints;
  28. };
  29. #endif //B3_CONTACT4DATA_H