mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add a new HashSet template
* Intended to replace RBSet in most cases. * Optimized for iteration speed
This commit is contained in:
parent
410893ad0f
commit
45af29da80
243 changed files with 1400 additions and 662 deletions
|
|
@ -93,7 +93,7 @@ class GodotArea2D : public GodotCollisionObject2D {
|
|||
HashMap<BodyKey, BodyState, BodyKey> monitored_bodies;
|
||||
HashMap<BodyKey, BodyState, BodyKey> monitored_areas;
|
||||
|
||||
RBSet<GodotConstraint2D *> constraints;
|
||||
HashSet<GodotConstraint2D *> constraints;
|
||||
|
||||
virtual void _shapes_changed() override;
|
||||
void _queue_monitor_update();
|
||||
|
|
@ -142,7 +142,7 @@ public:
|
|||
|
||||
_FORCE_INLINE_ void add_constraint(GodotConstraint2D *p_constraint) { constraints.insert(p_constraint); }
|
||||
_FORCE_INLINE_ void remove_constraint(GodotConstraint2D *p_constraint) { constraints.erase(p_constraint); }
|
||||
_FORCE_INLINE_ const RBSet<GodotConstraint2D *> &get_constraints() const { return constraints; }
|
||||
_FORCE_INLINE_ const HashSet<GodotConstraint2D *> &get_constraints() const { return constraints; }
|
||||
_FORCE_INLINE_ void clear_constraints() { constraints.clear(); }
|
||||
|
||||
void set_monitorable(bool p_monitorable);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue