mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-08 05:29:46 +02:00
Add comment explaining why visualPickResult is a copy
This commit is contained in:
parent
7f189e4d10
commit
5dbebd4aae
1 changed files with 1 additions and 0 deletions
|
@ -68,6 +68,7 @@ void Pointer::update(unsigned int pointerID) {
|
||||||
// This only needs to be a read lock because update won't change any of the properties that can be modified from scripts
|
// This only needs to be a read lock because update won't change any of the properties that can be modified from scripts
|
||||||
withReadLock([&] {
|
withReadLock([&] {
|
||||||
auto pickResult = getPrevPickResult();
|
auto pickResult = getPrevPickResult();
|
||||||
|
// Pointer needs its own PickResult object so it doesn't modify the cached pick result
|
||||||
auto visualPickResult = getVisualPickResult(std::make_shared<PickResult>(*pickResult.get()));
|
auto visualPickResult = getVisualPickResult(std::make_shared<PickResult>(*pickResult.get()));
|
||||||
updateVisuals(visualPickResult);
|
updateVisuals(visualPickResult);
|
||||||
generatePointerEvents(pointerID, visualPickResult);
|
generatePointerEvents(pointerID, visualPickResult);
|
||||||
|
|
Loading…
Reference in a new issue