1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

Add AreaStore custom ID API

This commit is contained in:
ShadowNinja 2015-10-30 20:38:22 -04:00
parent 821551a266
commit 3ce6642a26
5 changed files with 14 additions and 7 deletions

View file

@ -38,9 +38,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
struct Area {
Area() {}
Area() : id(U32_MAX) {}
Area(const v3s16 &mine, const v3s16 &maxe) :
minedge(mine), maxedge(maxe)
id(U32_MAX), minedge(mine), maxedge(maxe)
{
sortBoxVerticies(minedge, maxedge);
}
@ -68,7 +68,8 @@ public:
size_t size() const { return areas_map.size(); }
/// Add an area to the store.
/// Updates the area's ID.
/// Updates the area's ID if it hasn't already been set.
/// @return Whether the area insertion was successful.
virtual bool insertArea(Area *a) = 0;
/// Removes an area from the store by ID.