1 #include "GdxCollisionObjectBridge.h" 2 3 #ifndef GdxCollsionObjectBridge_H 4 #define GdxCollsionObjectBridge_H 5 6 /** @author Xoppa */ 7 class GdxCollisionObjectBridge { 8 public: 9 int userValue; 10 int contactCallbackFlag; 11 int contactCallbackFilter; 12 13 GdxCollisionObjectBridge::GdxCollisionObjectBridge() : userValue(0), contactCallbackFlag(1), contactCallbackFilter(0) 14 {} 15 }; 16 17 inline bool gdxCheckFilter(const int filter, const int flag) { 18 return (filter & flag) == flag; 19 } 20 21 inline bool gdxCheckFilter(const btCollisionObject* colObj0, const btCollisionObject* colObj1) { 22 return gdxCheckFilter(((GdxCollisionObjectBridge*)(colObj0->getUserPointer()))->contactCallbackFilter, 23 ((GdxCollisionObjectBridge*)(colObj1->getUserPointer()))->contactCallbackFlag); 24 } 25 26 #endif // GdxCollsionObjectBridge_H 27