Skip to content

Commit

Permalink
fixup! Issue: #29 Independent storage
Browse files Browse the repository at this point in the history
  • Loading branch information
attcs committed Jun 16, 2024
1 parent fedf84f commit 22c59c5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions octree.h
Original file line number Diff line number Diff line change
Expand Up @@ -3430,12 +3430,19 @@ namespace OrthoTree
auto entityIDsInRoot = std::vector<TEntityID>();
{
autoc& nodeRoot = this->GetNode(this->GetRootKey());
std::set<TEntityID> largeEntities;
for (autoc entityID : nodeRoot.Entities)
{
if (AD::AreBoxesOverlapped(detail::at(boxes, entityID), this->m_boxSpace))
{
for (auto entityIDOther = entityID + 1; entityIDOther < entityNo; ++entityIDOther)
collidedEntityPairs.emplace_back(entityID, entityIDOther);
largeEntities.insert(entityID);

for (autoc& boxOther : boxes)
{
autoc entityIDOther = detail::getKeyPart(boxes, boxOther);
if (!largeEntities.contains(entityIDOther))
collidedEntityPairs.emplace_back(entityID, entityIDOther);
}
}
else
entityIDsInRoot.emplace_back(entityID);
Expand Down

0 comments on commit 22c59c5

Please sign in to comment.