Skip to content
Snippets Groups Projects
Commit 68b194e5 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

bring some tiny methods to header file

parent 13bc2394
No related branches found
No related tags found
3 merge requests!436Release to start wolf public,!433After 2nd RA-L submission,!428Resolve "Rename IsMotion --> StateProvider"
Pipeline #7780 failed
......@@ -258,13 +258,13 @@ class ProcessorMotion : public ProcessorBase, public MotionProvider
*
* Returns true if the key frame should be stored
*/
bool storeKeyFrame(FrameBasePtr) override;
bool storeKeyFrame(FrameBasePtr) override { return true;}
/** \brief store capture
*
* Returns true if the capture should be stored
*/
bool storeCapture(CaptureBasePtr) override;
bool storeCapture(CaptureBasePtr) override { return false;}
bool voteForKeyFrame() const override;
......
......@@ -159,13 +159,13 @@ class ProcessorTracker : public ProcessorBase
*
* The ProcessorTracker only processes incoming captures (it is not called).
*/
void processKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance) override {};
void processKeyFrame(FrameBasePtr _keyframe_ptr, const double& _time_tolerance) override {}
/** \brief trigger in capture
*
* Returns true if processCapture() should be called after the provided capture arrived.
*/
bool triggerInCapture(CaptureBasePtr) const override;
bool triggerInCapture(CaptureBasePtr) const override { return true;}
/** \brief trigger in key-frame
*
......@@ -177,13 +177,13 @@ class ProcessorTracker : public ProcessorBase
*
* Returns true if the key frame should be stored
*/
bool storeKeyFrame(FrameBasePtr) override;
bool storeKeyFrame(FrameBasePtr) override { return true;}
/** \brief store capture
*
* Returns true if the capture should be stored
*/
bool storeCapture(CaptureBasePtr) override;
bool storeCapture(CaptureBasePtr) override { return false;}
/** Pre-process incoming Capture
*
......
......@@ -63,11 +63,11 @@ void ProcessorBase::keyFrameCallback(FrameBasePtr _keyframe_ptr, const double& _
n_kf_callback_++;
startKFProfiling();
// asking if key frame should be stored
// asking if frame should be stored
if (storeKeyFrame(_keyframe_ptr))
buffer_pack_kf_.add(_keyframe_ptr, _time_tol_other);
// if trigger true -> processKeyFrame
// asking if frame should be processed
if (triggerInKeyFrame(_keyframe_ptr, _time_tol_other))
processKeyFrame(_keyframe_ptr, _time_tol_other);
......@@ -92,7 +92,7 @@ void ProcessorBase::captureCallback(CaptureBasePtr _capture_ptr)
if (storeCapture(_capture_ptr))
buffer_capture_.add(_capture_ptr->getTimeStamp(), _capture_ptr);
// if trigger, process directly without buffering
// asking if capture should be processed
if (triggerInCapture(_capture_ptr))
processCapture(_capture_ptr);
......
......@@ -999,15 +999,6 @@ PackKeyFramePtr ProcessorMotion::computeProcessingStep()
return nullptr;
}
bool ProcessorMotion::storeKeyFrame(FrameBasePtr _frame_ptr)
{
return true;
}
bool ProcessorMotion::storeCapture(CaptureBasePtr _cap_ptr)
{
return false;
}
TimeStamp ProcessorMotion::getTimeStamp ( ) const
{
if (not origin_ptr_ or
......
......@@ -315,19 +315,6 @@ void ProcessorTracker::computeProcessingStep()
}
}
bool ProcessorTracker::triggerInCapture(CaptureBasePtr _cap_ptr) const
{
return true;
}
bool ProcessorTracker::storeKeyFrame(FrameBasePtr _frame_ptr)
{
return true;
}
bool ProcessorTracker::storeCapture(CaptureBasePtr _cap_ptr)
{
return false;
}
void ProcessorTracker::printHeader(int _depth, bool _constr_by, bool _metric, bool _state_blocks, std::ostream& _stream, std::string _tabs) const
{
_stream << _tabs << "PrcT" << id() << " " << getType() << " \"" << getName() << "\"" << std::endl;
......
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