summaryrefslogtreecommitdiffhomepage
path: root/tracker-wii/wii_point_extractor.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-04-14 05:32:33 +0200
committerStanislaw Halik <sthalik@misaki.pl>2019-04-14 06:16:41 +0200
commit6d8321785f34f7cad6c02c2d91fc3961f57a853c (patch)
treec5d1a68cd20234b9caae7cc7caa73fc7770bbdbd /tracker-wii/wii_point_extractor.cpp
parentb324372971f722e77d0b71f4287bb650628234c9 (diff)
tracker/wii: kill leading underscore in identifiers
Diffstat (limited to 'tracker-wii/wii_point_extractor.cpp')
-rw-r--r--tracker-wii/wii_point_extractor.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/tracker-wii/wii_point_extractor.cpp b/tracker-wii/wii_point_extractor.cpp
index 69dfda53..553abdab 100644
--- a/tracker-wii/wii_point_extractor.cpp
+++ b/tracker-wii/wii_point_extractor.cpp
@@ -31,7 +31,7 @@ WIIPointExtractor::WIIPointExtractor(const QString& module_name) : s(module_name
}
//define a temp draw function
-void WIIPointExtractor::_draw_point(cv::Mat& preview_frame, const vec2& p, const cv::Scalar& color, int thickness)
+void WIIPointExtractor::draw_point(cv::Mat& preview_frame, const vec2& p, const cv::Scalar& color, int thickness)
{
static constexpr int len = 9;
@@ -50,7 +50,7 @@ void WIIPointExtractor::_draw_point(cv::Mat& preview_frame, const vec2& p, const
thickness);
};
-bool WIIPointExtractor::_draw_points(cv::Mat& preview_frame, const struct wii_info &wii, std::vector<vec2>& points)
+bool WIIPointExtractor::draw_points(cv::Mat& preview_frame, const struct wii_info& wii, std::vector<vec2>& points)
{
const float W = 1024.0f;
const float H = 768.0f;
@@ -72,7 +72,7 @@ bool WIIPointExtractor::_draw_points(cv::Mat& preview_frame, const struct wii_in
std::tie(dt[0], dt[1]) = to_screen_pos(RX, RY, W, H);
points.push_back(dt);
- _draw_point(preview_frame, dt, cv::Scalar(0, 255, 0), clamp(dot.isize, 1, 32));
+ draw_point(preview_frame, dt, cv::Scalar(0, 255, 0), clamp(dot.isize, 1, 32));
}
}
const bool success = points.size() >= PointModel::N_POINTS;
@@ -105,11 +105,10 @@ void WIIPointExtractor::extract_points(const pt_frame& frame_, pt_preview& previ
const struct wii_info& wii = frame_.as_const<WIIFrame>()->wii;
cv::Mat& preview_frame = *preview_frame_.as<WIIPreview>();
- switch (wii.status) {
- case wii_cam_data_change:
- _draw_bg(preview_frame, wii);
- _draw_points(preview_frame, wii, points);
- break;
- }
+ if (wii.status == wii_cam_data_change)
+ {
+ draw_bg(preview_frame, wii);
+ draw_points(preview_frame, wii, points);
+ }
}