diff options
Diffstat (limited to 'modules/bullet/godot_result_callbacks.h')
-rw-r--r-- | modules/bullet/godot_result_callbacks.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/modules/bullet/godot_result_callbacks.h b/modules/bullet/godot_result_callbacks.h index d505bd0de1..68dff5b12a 100644 --- a/modules/bullet/godot_result_callbacks.h +++ b/modules/bullet/godot_result_callbacks.h @@ -36,8 +36,6 @@ #include "btBulletDynamicsCommon.h" #include "servers/physics_server.h" -#define MAX_PENETRATION_DEPTH 0.005 - class RigidBodyBullet; /// This class is required to implement custom collision behaviour in the broadphase @@ -151,39 +149,4 @@ public: virtual btScalar addSingleResult(btManifoldPoint &cp, const btCollisionObjectWrapper *colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper *colObj1Wrap, int partId1, int index1); }; -struct GodotRecoverAndClosestContactResultCallback : public btCollisionWorld::ContactResultCallback { -public: - btVector3 m_pointNormalWorld; - btVector3 m_pointWorld; - btScalar m_penetration_distance; - int m_other_compound_shape_index; - const btCollisionObject *m_pointCollisionObject; - - const RigidBodyBullet *m_self_object; - bool m_ignore_areas; - - btScalar m_most_penetrated_distance; - btVector3 m_recover_penetration; - - GodotRecoverAndClosestContactResultCallback() - : m_pointCollisionObject(NULL), m_penetration_distance(0), m_other_compound_shape_index(0), m_self_object(NULL), m_ignore_areas(true), m_most_penetrated_distance(1e20), m_recover_penetration(0, 0, 0) {} - - GodotRecoverAndClosestContactResultCallback(const RigidBodyBullet *p_self_object, bool p_ignore_areas) - : m_pointCollisionObject(NULL), m_penetration_distance(0), m_other_compound_shape_index(0), m_self_object(p_self_object), m_ignore_areas(p_ignore_areas), m_most_penetrated_distance(9999999999), m_recover_penetration(0, 0, 0) {} - - void reset() { - m_pointCollisionObject = NULL; - m_most_penetrated_distance = 1e20; - m_recover_penetration.setZero(); - } - - bool hasHit() { - return m_pointCollisionObject; - } - - virtual bool needsCollision(btBroadphaseProxy *proxy0) const; - - virtual btScalar addSingleResult(btManifoldPoint &cp, const btCollisionObjectWrapper *colObj0Wrap, int partId0, int index0, const btCollisionObjectWrapper *colObj1Wrap, int partId1, int index1); -}; - #endif // GODOT_RESULT_CALLBACKS_H |