| 413 | } |
| 414 | |
| 415 | SelectedPositionInfo RenderWindowBridge::GetSelectedPosition() const |
| 416 | { |
| 417 | PositionGetter getter; |
| 418 | StorageThreadDispatcherBase::Pointer dispatcher; |
| 419 | { |
| 420 | std::lock_guard<std::mutex> lock(m_Mutex); |
| 421 | getter = m_PositionGetter; |
| 422 | dispatcher = m_Dispatcher.Lock(); |
| 423 | } |
| 424 | |
| 425 | if (!getter) |
| 426 | throw std::runtime_error("No position getter is connected to the RenderWindowBridge"); |
| 427 | |
| 428 | SelectedPositionInfo result; |
| 429 | result.position.Fill(0.0); |
| 430 | Dispatch(dispatcher, [&]() { result = getter(); }); |
| 431 | return result; |
| 432 | } |
| 433 | |
| 434 | void RenderWindowBridge::SetSelectedPosition(const Point3D& pos) const |
| 435 | { |
no test coverage detected