|  | Gamedev Framework (gf)
    0.19.0
    A C++17 framework for 2D games | 
An implementation of dynamic tree. More...
#include <gf/Spatial_DynamicTree.h>
| Public Member Functions | |
| DynamicTree () | |
| Constructor.  More... | |
| SpatialId | insert (Handle handle, const RectF &bounds) | 
| Insert an object in the tree.  More... | |
| void | modify (SpatialId id, RectF bounds) | 
| Modify the bounds of an object.  More... | |
| std::size_t | query (const RectF &bounds, SpatialQueryCallback callback, SpatialQuery kind=SpatialQuery::Intersect) | 
| Query objects in the tree.  More... | |
| void | remove (SpatialId id) | 
| Remove an object from the tree.  More... | |
| void | clear () | 
| Remove all the objects from the tree.  More... | |
| Handle | operator[] (SpatialId id) | 
| Get the handle associated to a spatial id.  More... | |
An implementation of dynamic tree.
| gf::DynamicTree::DynamicTree | ( | ) | 
Constructor.
| void gf::DynamicTree::clear | ( | ) | 
Remove all the objects from the tree.
Insert an object in the tree.
| handle | A handle that represents the object to insert | 
| bounds | The bounds of the object | 
Modify the bounds of an object.
| id | The spatial id of the object | 
| bounds | The new bounds of the object | 
Get the handle associated to a spatial id.
| id | The spatial id of the object | 
| std::size_t gf::DynamicTree::query | ( | const RectF & | bounds, | 
| SpatialQueryCallback | callback, | ||
| SpatialQuery | kind = SpatialQuery::Intersect | ||
| ) | 
Query objects in the tree.
| bounds | The bounds of the query | 
| callback | The callback to apply to found objects | 
| kind | The kind of spatial query | 
| void gf::DynamicTree::remove | ( | SpatialId | id | ) | 
Remove an object from the tree.
| id | The spatial id of the object | 
 1.8.13
 1.8.13