| 106 | } |
| 107 | |
| 108 | int MapPoint::GetFeatureIndexInFrame(std::shared_ptr<Frame> frame) const { |
| 109 | std::lock_guard<std::mutex> lock(m_mutex); |
| 110 | |
| 111 | if (!frame) return -1; |
| 112 | |
| 113 | for (const auto& obs : m_observations) { |
| 114 | if (auto obs_frame = obs.frame.lock()) { |
| 115 | if (obs_frame == frame) { |
| 116 | return obs.feature_index; |
| 117 | } |
| 118 | } |
| 119 | } |
| 120 | return -1; |
| 121 | } |
| 122 | |
| 123 | float MapPoint::GetDepthInFrame(std::shared_ptr<Frame> frame) const { |
| 124 | if (!frame) return -1.0f; |
nothing calls this directly
no outgoing calls
no test coverage detected