| 656 | } |
| 657 | |
| 658 | CameraState RenderWindowBridge::GetMxNCamera(const std::string& windowId) const |
| 659 | { |
| 660 | MxNCameraGetter getter; |
| 661 | StorageThreadDispatcherBase::Pointer dispatcher; |
| 662 | { |
| 663 | std::lock_guard<std::mutex> lock(m_Mutex); |
| 664 | getter = m_MxNCameraGetter; |
| 665 | dispatcher = m_Dispatcher.Lock(); |
| 666 | } |
| 667 | |
| 668 | if (!getter) |
| 669 | throw std::runtime_error("No MxN camera getter is connected to the RenderWindowBridge"); |
| 670 | |
| 671 | CameraState result; |
| 672 | result.position.Fill(0.0); |
| 673 | result.focalPoint.Fill(0.0); |
| 674 | result.viewUp.Fill(0.0); |
| 675 | Dispatch(dispatcher, [&]() { result = getter(windowId); }); |
| 676 | return result; |
| 677 | } |
| 678 | |
| 679 | void RenderWindowBridge::SetMxNCamera(const std::string& windowId, const CameraPatch& patch) const |
| 680 | { |