Skip to content
Snippets Groups Projects

Get capture of

Merged Jeremie Deray requested to merge get_capture_of into master
1 file
+ 12
0
Compare changes
  • Side-by-side
  • Inline
+ 12
0
@@ -133,6 +133,7 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase
CaptureBaseList& getCaptureList();
CaptureBasePtr addCapture(CaptureBasePtr _capt_ptr);
CaptureBasePtr getCaptureOf(const SensorBasePtr _sensor_ptr);
CaptureBaseList getCapturesOf(const SensorBasePtr _sensor_ptr);
void unlinkCapture(CaptureBasePtr _cap_ptr);
void getConstraintList(ConstraintBaseList& _ctr_list);
@@ -317,6 +318,17 @@ inline CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr)
return nullptr;
}
inline CaptureBaseList FrameBase::getCapturesOf(const SensorBasePtr _sensor_ptr)
{
CaptureBaseList captures;
for (CaptureBasePtr capture_ptr : getCaptureList())
if (capture_ptr->getSensorPtr() == _sensor_ptr)
captures.push_back(capture_ptr);
return captures;
}
inline void FrameBase::unlinkCapture(CaptureBasePtr _cap_ptr)
{
_cap_ptr->unlinkFromFrame();
Loading