diff options
author | Andrea Catania <info@andreacatania.com> | 2018-10-07 07:14:38 +0200 |
---|---|---|
committer | Andrea Catania <info@andreacatania.com> | 2018-10-07 07:14:38 +0200 |
commit | 15305ec91f791cb294b38f4d66d6f14e076c6aaa (patch) | |
tree | bfbc5693c320d185d0a3cd70657a4e6274d230bd /modules/bullet/collision_object_bullet.h | |
parent | 7d681274f8aa2a7a0bac004a16e376d36103c94e (diff) | |
download | redot-engine-15305ec91f791cb294b38f4d66d6f14e076c6aaa.tar.gz |
Optimitzed area overlap checks
Diffstat (limited to 'modules/bullet/collision_object_bullet.h')
-rw-r--r-- | modules/bullet/collision_object_bullet.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/bullet/collision_object_bullet.h b/modules/bullet/collision_object_bullet.h index 230dca9498..4a0c805ce5 100644 --- a/modules/bullet/collision_object_bullet.h +++ b/modules/bullet/collision_object_bullet.h @@ -132,6 +132,7 @@ protected: /// New area is added when overlap with new area (AreaBullet::addOverlap), then is removed when it exit (CollisionObjectBullet::onExitArea) /// This array is used mainly to know which area hold the pointer of this object Vector<AreaBullet *> areasOverlapped; + bool isTransformChanged; public: CollisionObjectBullet(Type p_type); @@ -187,6 +188,7 @@ public: _FORCE_INLINE_ SpaceBullet *get_space() const { return space; } virtual void on_collision_checker_start() = 0; + virtual void on_collision_checker_end() = 0; virtual void dispatch_callbacks() = 0; @@ -204,6 +206,9 @@ public: Transform get_transform() const; virtual void set_transform__bullet(const btTransform &p_global_transform); virtual const btTransform &get_transform__bullet() const; + + bool is_transform_changed() const { return isTransformChanged; } + virtual void notify_transform_changed(); }; class RigidCollisionObjectBullet : public CollisionObjectBullet, public ShapeOwnerBullet { @@ -230,7 +235,7 @@ public: virtual void remove_shape_full(ShapeBullet *p_shape); void remove_shape_full(int p_index); - void remove_all_shapes(bool p_permanentlyFromThisBody = false); + void remove_all_shapes(bool p_permanentlyFromThisBody = false, bool p_force_not_reload = false); void set_shape_transform(int p_index, const Transform &p_transform); |