mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: use rdIntArray for dtDisjointSet
Recently made shared in commit fa8d89d287752782ebdd5d9563f04fa72ef0bee9
This commit is contained in:
parent
fa8d89d287
commit
00ec2c41e2
@ -128,8 +128,12 @@ public:
|
||||
}
|
||||
int insertNew()
|
||||
{
|
||||
rank.push_back(0);
|
||||
return parent.emplace_back((int)parent.size());
|
||||
rank.push(0);
|
||||
|
||||
const int newId = parent.size();
|
||||
parent.push(newId);
|
||||
|
||||
return newId;
|
||||
}
|
||||
inline int find(const int id) const
|
||||
{
|
||||
@ -157,11 +161,11 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
inline int getSetCount() const { return (int)parent.size(); }
|
||||
inline int getSetCount() const { return parent.size(); }
|
||||
|
||||
private:
|
||||
std::vector<int> rank;
|
||||
std::vector<int> parent;
|
||||
rdIntArray rank;
|
||||
rdIntArray parent;
|
||||
};
|
||||
|
||||
bool dtBuildStaticPathingData(dtNavMesh* mesh);
|
||||
|
Loading…
x
Reference in New Issue
Block a user