diff options
Diffstat (limited to 'modules/bullet/space_bullet.h')
-rw-r--r-- | modules/bullet/space_bullet.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/modules/bullet/space_bullet.h b/modules/bullet/space_bullet.h index 897f902fe1..de281064af 100644 --- a/modules/bullet/space_bullet.h +++ b/modules/bullet/space_bullet.h @@ -31,8 +31,8 @@ #ifndef SPACE_BULLET_H #define SPACE_BULLET_H -#include "core/local_vector.h" #include "core/variant.h" +#include "core/vector.h" #include "godot_result_callbacks.h" #include "rid_bullet.h" #include "servers/physics_server_3d.h" @@ -110,23 +110,16 @@ class SpaceBullet : public RIDBullet { real_t linear_damp = 0.0; real_t angular_damp = 0.0; - LocalVector<CollisionObjectBullet *> queue_pre_flush; - LocalVector<CollisionObjectBullet *> queue_flush; - LocalVector<CollisionObjectBullet *> collision_objects; - LocalVector<AreaBullet *> areas; + Vector<AreaBullet *> areas; - LocalVector<Vector3> contactDebug; - uint32_t contactDebugCount = 0; + Vector<Vector3> contactDebug; + int contactDebugCount = 0; real_t delta_time = 0.; public: SpaceBullet(); virtual ~SpaceBullet(); - void add_to_flush_queue(CollisionObjectBullet *p_co); - void add_to_pre_flush_queue(CollisionObjectBullet *p_co); - void remove_from_any_queue(CollisionObjectBullet *p_co); - void flush_queries(); real_t get_delta_time() { return delta_time; } void step(real_t p_delta_time); @@ -157,9 +150,6 @@ public: void remove_area(AreaBullet *p_area); void reload_collision_filters(AreaBullet *p_area); - void register_collision_object(CollisionObjectBullet *p_object); - void unregister_collision_object(CollisionObjectBullet *p_object); - void add_rigid_body(RigidBodyBullet *p_body); void remove_rigid_body(RigidBodyBullet *p_body); void reload_collision_filters(RigidBodyBullet *p_body); @@ -183,7 +173,7 @@ public: } _FORCE_INLINE_ void add_debug_contact(const Vector3 &p_contact) { if (contactDebugCount < contactDebug.size()) { - contactDebug[contactDebugCount++] = p_contact; + contactDebug.write[contactDebugCount++] = p_contact; } } _FORCE_INLINE_ Vector<Vector3> get_debug_contacts() { return contactDebug; } |