From e478d6b1e9d7eabc1901875b75da945dcba114f9 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Thu, 9 Jan 2014 19:08:06 +0400 Subject: [PATCH] renamed cv::viz::get() to getWindowByName() --- modules/viz/doc/viz3d.rst | 8 ++++---- modules/viz/include/opencv2/viz.hpp | 4 ++-- modules/viz/include/opencv2/viz/widgets.hpp | 8 ++++---- modules/viz/src/vizcore.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/viz/doc/viz3d.rst b/modules/viz/doc/viz3d.rst index 1cb9b5d..215437e 100644 --- a/modules/viz/doc/viz3d.rst +++ b/modules/viz/doc/viz3d.rst @@ -34,11 +34,11 @@ Constructs camera pose from position, focal_point and up_vector (see gluLookAt() This function returns pose of the camera in global coordinate frame. -viz::get +viz::getWindowByName -------- Retrieves a window by its name. -.. ocv:function:: Viz3d get(const String &window_name) +.. ocv:function:: Viz3d getWindowByName(const String &window_name) :param window_name: Name of the window that is to be retrieved. @@ -51,8 +51,8 @@ This function returns a :ocv:class:`Viz3d` object with the given name. .. code-block:: cpp /// window and window_2 are the same windows. - viz::Viz3d window = viz::get("myWindow"); - viz::Viz3d window_2 = viz::get("Viz - myWindow"); + viz::Viz3d window = viz::getWindowByName("myWindow"); + viz::Viz3d window_2 = viz::getWindowByName("Viz - myWindow"); viz::isNan ---------- diff --git a/modules/viz/include/opencv2/viz.hpp b/modules/viz/include/opencv2/viz.hpp index 9ceed08..d2b46dd 100644 --- a/modules/viz/include/opencv2/viz.hpp +++ b/modules/viz/include/opencv2/viz.hpp @@ -61,9 +61,9 @@ namespace cv CV_EXPORTS Affine3d makeCameraPose(const Vec3d& position, const Vec3d& focal_point, const Vec3d& y_dir); //! retrieves a window by its name. If no window with such name, then it creates new. - CV_EXPORTS Viz3d get(const String &window_name); + CV_EXPORTS Viz3d getWindowByName(const String &window_name); - //! Unregisters all Viz windows from internal database. After it 'get()' will create new windows instead getting existing from the database. + //! Unregisters all Viz windows from internal database. After it 'getWindowByName()' will create new windows instead getting existing from the database. CV_EXPORTS void unregisterAllWindows(); //! checks float value for Nan diff --git a/modules/viz/include/opencv2/viz/widgets.hpp b/modules/viz/include/opencv2/viz/widgets.hpp index 12373cd..5b57577 100644 --- a/modules/viz/include/opencv2/viz/widgets.hpp +++ b/modules/viz/include/opencv2/viz/widgets.hpp @@ -141,8 +141,8 @@ namespace cv class CV_EXPORTS WPlane : public Widget3D { public: - WPlane(const Vec4d& coefs, double size = 1.f, const Color &color = Color::white()); - WPlane(const Vec4d& coefs, const Point3d& pt, double size = 1.f, const Color &color = Color::white()); + WPlane(const Vec4d& coefs, double size = 1.0, const Color &color = Color::white()); + WPlane(const Vec4d& coefs, const Point3d& pt, double size = 1.0, const Color &color = Color::white()); }; class CV_EXPORTS WSphere : public Widget3D @@ -227,7 +227,7 @@ namespace cv class CV_EXPORTS WCoordinateSystem : public Widget3D { public: - WCoordinateSystem(double scale = 1.f); + WCoordinateSystem(double scale = 1.0); }; class CV_EXPORTS WGrid : public Widget3D @@ -263,7 +263,7 @@ namespace cv enum {FRAMES = 1, PATH = 2, BOTH = FRAMES + PATH }; //! Takes vector> and displays trajectory of the given path either by coordinate frames or polyline - WTrajectory(InputArray path, int display_mode = WTrajectory::PATH, double scale = 1.f, const Color &color = Color::white()); + WTrajectory(InputArray path, int display_mode = WTrajectory::PATH, double scale = 1.0, const Color &color = Color::white()); }; class CV_EXPORTS WTrajectoryFrustums : public Widget3D diff --git a/modules/viz/src/vizcore.cpp b/modules/viz/src/vizcore.cpp index a6b2fff..bf01ff5 100644 --- a/modules/viz/src/vizcore.cpp +++ b/modules/viz/src/vizcore.cpp @@ -119,7 +119,7 @@ cv::String cv::viz::VizStorage::generateWindowName(const String &window_name) return output; } -cv::viz::Viz3d cv::viz::get(const String &window_name) { return Viz3d (window_name); } +cv::viz::Viz3d cv::viz::getWindowByName(const String &window_name) { return Viz3d (window_name); } void cv::viz::unregisterAllWindows() { VizStorage::unregisterAll(); } /////////////////////////////////////////////////////////////////////////////////////////////// -- 2.7.4