mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 14:47:19 +02:00
Remove PickResult::needsToCompareResults
This commit is contained in:
parent
4d85cb17f3
commit
f71fc83309
3 changed files with 3 additions and 5 deletions
|
@ -40,7 +40,6 @@ public:
|
|||
QVariantMap toVariantMap() const override;
|
||||
|
||||
bool doesIntersect() const override { return intersects; }
|
||||
bool needsToCompareResults() const override { return true; }
|
||||
bool checkOrFilterAgainstMaxDistance(float maxDistance) override { return true; }
|
||||
|
||||
PickResultPointer compareAndProcessNewResult(const PickResultPointer& newRes) override;
|
||||
|
|
|
@ -115,7 +115,6 @@ public:
|
|||
}
|
||||
|
||||
virtual bool doesIntersect() const = 0;
|
||||
virtual bool needsToCompareResults() const { return doesIntersect(); }
|
||||
|
||||
// for example: if we want the closest result, compare based on distance
|
||||
// if we want all results, combine them
|
||||
|
|
|
@ -92,7 +92,7 @@ void PickCacheOptimizer<T>::update(std::unordered_map<uint32_t, std::shared_ptr<
|
|||
if (!checkAndCompareCachedResults(mathematicalPick, results, res, entityKey)) {
|
||||
PickResultPointer entityRes = pick->getEntityIntersection(mathematicalPick);
|
||||
if (entityRes) {
|
||||
cacheResult(entityRes->needsToCompareResults(), entityRes, entityKey, res, mathematicalPick, results, pick);
|
||||
cacheResult(entityRes->doesIntersect(), entityRes, entityKey, res, mathematicalPick, results, pick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ void PickCacheOptimizer<T>::update(std::unordered_map<uint32_t, std::shared_ptr<
|
|||
if (!checkAndCompareCachedResults(mathematicalPick, results, res, overlayKey)) {
|
||||
PickResultPointer overlayRes = pick->getOverlayIntersection(mathematicalPick);
|
||||
if (overlayRes) {
|
||||
cacheResult(overlayRes->needsToCompareResults(), overlayRes, overlayKey, res, mathematicalPick, results, pick);
|
||||
cacheResult(overlayRes->doesIntersect(), overlayRes, overlayKey, res, mathematicalPick, results, pick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ void PickCacheOptimizer<T>::update(std::unordered_map<uint32_t, std::shared_ptr<
|
|||
if (!checkAndCompareCachedResults(mathematicalPick, results, res, avatarKey)) {
|
||||
PickResultPointer avatarRes = pick->getAvatarIntersection(mathematicalPick);
|
||||
if (avatarRes) {
|
||||
cacheResult(avatarRes->needsToCompareResults(), avatarRes, avatarKey, res, mathematicalPick, results, pick);
|
||||
cacheResult(avatarRes->doesIntersect(), avatarRes, avatarKey, res, mathematicalPick, results, pick);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue