mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 03:40:20 +02:00
Use std::vector::insert for merging CollisionPickResults
This commit is contained in:
parent
e3c39020dc
commit
6081d63f53
1 changed files with 2 additions and 6 deletions
|
@ -20,17 +20,13 @@ PickResultPointer CollisionPickResult::compareAndProcessNewResult(const PickResu
|
||||||
const std::shared_ptr<CollisionPickResult> newCollisionResult = std::static_pointer_cast<CollisionPickResult>(newRes);
|
const std::shared_ptr<CollisionPickResult> newCollisionResult = std::static_pointer_cast<CollisionPickResult>(newRes);
|
||||||
|
|
||||||
if (entityIntersections->size()) {
|
if (entityIntersections->size()) {
|
||||||
for (ContactTestResult& entityIntersection : *(newCollisionResult->entityIntersections)) {
|
entityIntersections->insert(entityIntersections->cend(), newCollisionResult->entityIntersections->begin(), newCollisionResult->entityIntersections->end());
|
||||||
entityIntersections->push_back(entityIntersection);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
entityIntersections = newCollisionResult->entityIntersections;
|
entityIntersections = newCollisionResult->entityIntersections;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avatarIntersections->size()) {
|
if (avatarIntersections->size()) {
|
||||||
for (ContactTestResult& avatarIntersection : *(newCollisionResult->avatarIntersections)) {
|
avatarIntersections->insert(avatarIntersections->cend(), newCollisionResult->avatarIntersections->begin(), newCollisionResult->avatarIntersections->end());
|
||||||
avatarIntersections->push_back(avatarIntersection);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
avatarIntersections = newCollisionResult->avatarIntersections;
|
avatarIntersections = newCollisionResult->avatarIntersections;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue