Commit c622ebf8 authored by Anatoly Baksheev's avatar Anatoly Baksheev

implemented wasStopped flag

parent 0f5da429
......@@ -55,6 +55,7 @@ namespace temp_viz
void registerKeyboardCallback(void (*callback)(const cv::KeyboardEvent&, void*), void* cookie = 0);
void registerMouseCallback(void (*callback)(const cv::MouseEvent&, void*), void* cookie = 0);
bool wasStopped() const;
private:
Viz3d(const Viz3d&);
Viz3d& operator=(const Viz3d&);
......
......@@ -97,3 +97,5 @@ void temp_viz::Viz3d::registerMouseCallback(void (*callback)(const cv::MouseEven
{
impl_->registerMouseCallback(callback, cookie);
}
bool temp_viz::Viz3d::wasStopped() const { return impl_->wasStopped(); }
......@@ -90,7 +90,7 @@ TEST(Viz_viz3d, accuracy)
v.addPolygonMesh(*mesh, "pq");
while(1) //TODO implement and replace with !viz.wasStopped()
while(!v.wasStopped())
{
// Creating new point cloud with id cloud1
cv::Affine3f cloudPosition(angle_x, angle_y, angle_z, cv::Vec3f(pos_x, pos_y, pos_z));
......@@ -103,7 +103,7 @@ TEST(Viz_viz3d, accuracy)
pos_y = std::sin(angle_x);
pos_z = std::sin(angle_x);
v.spinOnce(10);
v.spinOnce(1, true);
}
// cv::Mat normals(cloud.size(), CV_32FC3, cv::Scalar(0, 10, 0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment