refactoring

This commit is contained in:
Anatoly Baksheev
2013-12-12 23:46:41 +04:00
parent 7dbf6bc8df
commit 80ab6e889f
12 changed files with 147 additions and 266 deletions

View File

@@ -112,10 +112,7 @@ namespace cv
Mat polygons;
//! Loads mesh from a given ply file
static cv::viz::Mesh3d loadMesh(const String& file);
private:
struct loadMeshImpl;
static Mesh3d loadMesh(const String& file);
};
class CV_EXPORTS Camera
@@ -123,8 +120,8 @@ namespace cv
public:
Camera(float fx, float fy, float cx, float cy, const Size &window_size);
explicit Camera(const Vec2f &fov, const Size &window_size);
explicit Camera(const cv::Matx33f &K, const Size &window_size);
explicit Camera(const cv::Matx44f &proj, const Size &window_size);
explicit Camera(const Matx33f &K, const Size &window_size);
explicit Camera(const Matx44f &proj, const Size &window_size);
inline const Vec2d & getClip() const { return clip_; }
inline void setClip(const Vec2d &clip) { clip_ = clip; }

View File

@@ -94,8 +94,8 @@ namespace cv
void setWindowSize(const Size &window_size);
String getWindowName() const;
void saveScreenshot(const String &file);
void setWindowPosition(int x, int y);
void setFullScreen(bool mode);
void setWindowPosition(const Point& window_position);
void setFullScreen(bool mode = true);
void setBackgroundColor(const Color& color = Color::black());
void spin();

View File

@@ -245,13 +245,13 @@ namespace cv
//! Creates camera coordinate frame (axes) at the origin
WCameraPosition(float scale = 1.f);
//! Creates frustum based on the intrinsic marix K at the origin
explicit WCameraPosition(const Matx33f &K, float scale = 1.f, const Color &color = Color::white());
WCameraPosition(const Matx33f &K, float scale = 1.f, const Color &color = Color::white());
//! Creates frustum based on the field of view at the origin
explicit WCameraPosition(const Vec2f &fov, float scale = 1.f, const Color &color = Color::white());
WCameraPosition(const Vec2f &fov, float scale = 1.f, const Color &color = Color::white());
//! Creates frustum and display given image at the far plane
explicit WCameraPosition(const Matx33f &K, const Mat &img, float scale = 1.f, const Color &color = Color::white());
WCameraPosition(const Matx33f &K, const Mat &img, float scale = 1.f, const Color &color = Color::white());
//! Creates frustum and display given image at the far plane
explicit WCameraPosition(const Vec2f &fov, const Mat &img, float scale = 1.f, const Color &color = Color::white());
WCameraPosition(const Vec2f &fov, const Mat &img, float scale = 1.f, const Color &color = Color::white());
};
/////////////////////////////////////////////////////////////////////////////
@@ -270,9 +270,9 @@ namespace cv
{
public:
//! Displays trajectory of the given path by frustums
explicit WTrajectoryFrustums(const std::vector<Affine3f> &path, const Matx33f &K, float scale = 1.f, const Color &color = Color::white());
WTrajectoryFrustums(const std::vector<Affine3f> &path, const Matx33f &K, float scale = 1.f, const Color &color = Color::white());
//! Displays trajectory of the given path by frustums
explicit WTrajectoryFrustums(const std::vector<Affine3f> &path, const Vec2f &fov, float scale = 1.f, const Color &color = Color::white());
WTrajectoryFrustums(const std::vector<Affine3f> &path, const Vec2f &fov, float scale = 1.f, const Color &color = Color::white());
};
class CV_EXPORTS WTrajectorySpheres: public Widget3D