mesh widget implementation

This commit is contained in:
ozantonkal
2013-07-15 12:02:20 +02:00
parent 6ca1822f36
commit b066d1982f
11 changed files with 649 additions and 479 deletions

View File

@@ -32,22 +32,15 @@ namespace cv
static Color gray();
};
struct CV_EXPORTS Vertices
{
std::vector<unsigned int> vertices;
};
class CV_EXPORTS Mesh3d
{
public:
typedef Ptr<Mesh3d> Ptr;
Mat cloud, colors;
std::vector<Vertices> polygons;
static Mesh3d::Ptr mesh_load(const String& file);
typedef cv::Ptr<Mesh3d> Ptr;
Mat cloud, colors, polygons;
static cv::viz::Mesh3d::Ptr loadMesh(const String& file);
private:
struct loadMeshImpl;
};
class CV_EXPORTS KeyboardEvent
@@ -100,8 +93,4 @@ namespace cv
};
} /* namespace viz */
} /* namespace cv */
} /* namespace cv */

View File

@@ -159,6 +159,15 @@ namespace cv
private:
struct ApplyCloudNormals;
};
class CV_EXPORTS MeshWidget : public Widget3D
{
public:
MeshWidget(const Mesh3d &mesh);
private:
struct CopyImpl;
};
template<> CV_EXPORTS Widget2D Widget::cast<Widget2D>();
template<> CV_EXPORTS Widget3D Widget::cast<Widget3D>();
@@ -178,7 +187,4 @@ namespace cv
template<> CV_EXPORTS CloudNormalsWidget Widget::cast<CloudNormalsWidget>();
} /* namespace viz */
} /* namespace cv */
} /* namespace cv */