Skip to content
Snippets Groups Projects
Commit 09d631f3 authored by Jeremie Deray's avatar Jeremie Deray Committed by Jeremie Deray
Browse files

add FrameBase::getCapturesOf

parent 593e1f4b
No related branches found
No related tags found
1 merge request!130Get capture of
...@@ -133,6 +133,7 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase ...@@ -133,6 +133,7 @@ class FrameBase : public NodeBase, public std::enable_shared_from_this<FrameBase
CaptureBaseList& getCaptureList(); CaptureBaseList& getCaptureList();
CaptureBasePtr addCapture(CaptureBasePtr _capt_ptr); CaptureBasePtr addCapture(CaptureBasePtr _capt_ptr);
CaptureBasePtr getCaptureOf(const SensorBasePtr _sensor_ptr); CaptureBasePtr getCaptureOf(const SensorBasePtr _sensor_ptr);
CaptureBaseList getCapturesOf(const SensorBasePtr _sensor_ptr);
void unlinkCapture(CaptureBasePtr _cap_ptr); void unlinkCapture(CaptureBasePtr _cap_ptr);
void getConstraintList(ConstraintBaseList& _ctr_list); void getConstraintList(ConstraintBaseList& _ctr_list);
...@@ -317,6 +318,17 @@ inline CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr) ...@@ -317,6 +318,17 @@ inline CaptureBasePtr FrameBase::getCaptureOf(const SensorBasePtr _sensor_ptr)
return nullptr; 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) inline void FrameBase::unlinkCapture(CaptureBasePtr _cap_ptr)
{ {
_cap_ptr->unlinkFromFrame(); _cap_ptr->unlinkFromFrame();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment