mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
implemented wasStopped flag
This commit is contained in:
parent
0f5da429c5
commit
c622ebf890
@ -26,8 +26,8 @@ namespace temp_viz
|
||||
void setBackgroundColor(const Color& color = Color::black());
|
||||
|
||||
void addCoordinateSystem(double scale, const Affine3f& t, const String &id = "coordinate");
|
||||
|
||||
void showPointCloud(const String& id, InputArray cloud, InputArray colors, const Affine3f& pose = Affine3f::Identity());
|
||||
|
||||
void showPointCloud(const String& id, InputArray cloud, InputArray colors, const Affine3f& pose = Affine3f::Identity());
|
||||
|
||||
bool addPointCloudNormals (const Mat &cloud, const Mat& normals, int level = 100, float scale = 0.02f, const String &id = "cloud");
|
||||
|
||||
@ -51,10 +51,11 @@ namespace temp_viz
|
||||
|
||||
void spin ();
|
||||
void spinOnce (int time = 1, bool force_redraw = false);
|
||||
|
||||
void registerKeyboardCallback(void (*callback)(const cv::KeyboardEvent&, void*), void* cookie = 0);
|
||||
void registerMouseCallback(void (*callback)(const cv::MouseEvent&, void*), void* cookie = 0);
|
||||
|
||||
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&);
|
||||
|
@ -96,4 +96,6 @@ void temp_viz::Viz3d::registerKeyboardCallback(void (*callback)(const cv::Keyboa
|
||||
void temp_viz::Viz3d::registerMouseCallback(void (*callback)(const cv::MouseEvent&, void*), void* cookie)
|
||||
{
|
||||
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));
|
||||
|
Loading…
Reference in New Issue
Block a user