mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
0.12.3: Increased Tango rendering performance, modified all handleEvent() with new interface (now returning bool)
This commit is contained in:
@@ -27,7 +27,7 @@ public:
|
||||
class ProgressionStatus: public ProgressState, public UEventsHandler
|
||||
{
|
||||
public:
|
||||
ProgressionStatus() : count_(0), max_(100), canceled_(false), jvm_(0), rtabmap_(0)
|
||||
ProgressionStatus() : count_(0), max_(100), jvm_(0), rtabmap_(0)
|
||||
{
|
||||
registerToEventsManager();
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
{
|
||||
count_=-1;
|
||||
max_ = max;
|
||||
canceled_ = false;
|
||||
setCanceled(false);
|
||||
|
||||
increment();
|
||||
}
|
||||
@@ -65,27 +65,17 @@ public:
|
||||
|
||||
virtual bool callback(const std::string & msg) const
|
||||
{
|
||||
if(!canceled_)
|
||||
if(!isCanceled())
|
||||
{
|
||||
increment();
|
||||
}
|
||||
|
||||
return !canceled_;
|
||||
return !isCanceled();
|
||||
}
|
||||
virtual ~ProgressionStatus(){}
|
||||
|
||||
void cancel()
|
||||
{
|
||||
canceled_ = true;
|
||||
}
|
||||
|
||||
bool isCanceled() const
|
||||
{
|
||||
return canceled_;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void handleEvent(UEvent * event)
|
||||
virtual bool handleEvent(UEvent * event)
|
||||
{
|
||||
if(event->getClassName().compare("ProgressEvent") == 0)
|
||||
{
|
||||
@@ -118,12 +108,12 @@ protected:
|
||||
UERROR("Failed to call rtabmap::updateProgressionCallback");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
int count_;
|
||||
int max_;
|
||||
bool canceled_;
|
||||
JavaVM *jvm_;
|
||||
jobject rtabmap_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user