| 525 | } |
| 526 | |
| 527 | CameraState RenderWindowBridge::GetStdMultiCamera(const std::string& windowName) const |
| 528 | { |
| 529 | StdMultiCameraGetter getter; |
| 530 | StorageThreadDispatcherBase::Pointer dispatcher; |
| 531 | { |
| 532 | std::lock_guard<std::mutex> lock(m_Mutex); |
| 533 | getter = m_StdMultiCameraGetter; |
| 534 | dispatcher = m_Dispatcher.Lock(); |
| 535 | } |
| 536 | |
| 537 | if (!getter) |
| 538 | throw std::runtime_error("No StdMulti camera getter is connected to the RenderWindowBridge"); |
| 539 | |
| 540 | CameraState result; |
| 541 | result.position.Fill(0.0); |
| 542 | result.focalPoint.Fill(0.0); |
| 543 | result.viewUp.Fill(0.0); |
| 544 | Dispatch(dispatcher, [&]() { result = getter(windowName); }); |
| 545 | return result; |
| 546 | } |
| 547 | |
| 548 | void RenderWindowBridge::SetStdMultiCamera(const std::string& windowName, const CameraPatch& patch) const |
| 549 | { |