Commit 70a81db5 authored by Anatoly Baksheev's avatar Anatoly Baksheev

fixed bugs in cloud collection and added test

parent cb580616
......@@ -482,19 +482,19 @@ This class wraps mesh attributes, and it can load a mesh from a ``ply`` file. ::
Mat polygons;
//! Loads mesh from a given ply file
static Mesh3d loadMesh(const String& file);
static Mesh3d load(const String& file);
private:
/* hidden */
};
viz::Mesh3d::loadMesh
viz::Mesh3d::load
---------------------
Loads a mesh from a ``ply`` file.
.. ocv:function:: static Mesh3d loadMesh(const String& file)
.. ocv:function:: static Mesh3d load(const String& file)
:param file: File name.
:param file: File name (for no only PLY is supported)
viz::KeyboardEvent
......
......@@ -112,7 +112,7 @@ namespace cv
Mat polygons;
//! Loads mesh from a given ply file
static Mesh3d loadMesh(const String& file);
static Mesh3d load(const String& file);
};
class CV_EXPORTS Camera
......
This diff is collapsed.
......@@ -128,7 +128,7 @@ namespace cv { namespace viz { namespace
};
}}}
cv::viz::Mesh3d cv::viz::Mesh3d::loadMesh(const String& file)
cv::viz::Mesh3d cv::viz::Mesh3d::load(const String& file)
{
return MeshUtils::loadMesh(file);
}
......
......@@ -85,3 +85,18 @@ TEST(Viz, DISABLED_show_cloud_masked)
viz.showWidget("dragon", WCloud(dragon_cloud));
viz.spin();
}
TEST(Viz, DISABLED_show_cloud_collection)
{
Mat cloud = readCloud(get_dragon_ply_file_path());
WCloudCollection ccol;
ccol.addCloud(cloud, Color::white(), Affine3d().translate(Vec3d(0, 0, 0)).rotate(Vec3d(1.57, 0, 0)));
ccol.addCloud(cloud, Color::blue(), Affine3d().translate(Vec3d(1, 0, 0)));
ccol.addCloud(cloud, Color::red(), Affine3d().translate(Vec3d(2, 0, 0)));
Viz3d viz("show_cloud_collection");
viz.showWidget("coosys", WCoordinateSystem());
viz.showWidget("ccol", ccol);
viz.spin();
}
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