From 0e90c0fff26e7b5afc58c56549bf5fb1a36bfcde Mon Sep 17 00:00:00 2001 From: ozantonkal Date: Wed, 12 Jun 2013 10:56:46 +0200 Subject: [PATCH] updated test for single color --- modules/viz/test/test_viz3d.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/viz/test/test_viz3d.cpp b/modules/viz/test/test_viz3d.cpp index 3214a81790..5c9141f988 100644 --- a/modules/viz/test/test_viz3d.cpp +++ b/modules/viz/test/test_viz3d.cpp @@ -89,12 +89,15 @@ TEST(Viz_viz3d, accuracy) temp_viz::Mesh3d::Ptr mesh = temp_viz::mesh_load("d:/horse.ply"); v.addPolygonMesh(*mesh, "pq"); + int col_blue = 0; + int col_green = 0; + int col_red = 0; while(!v.wasStopped()) { // Creating new point cloud with id cloud1 cv::Affine3f cloudPosition(angle_x, angle_y, angle_z, cv::Vec3f(pos_x, pos_y, pos_z)); - v.showPointCloud("cloud1", cloud, colors, cloudPosition); + v.showPointCloud("cloud1", cloud, temp_viz::Color(col_blue, col_green, col_red), cloudPosition); angle_x += 0.1f; angle_y -= 0.1f; @@ -102,6 +105,9 @@ TEST(Viz_viz3d, accuracy) pos_x = std::sin(angle_x); pos_y = std::sin(angle_x); pos_z = std::sin(angle_x); + col_blue = int(angle_x * 10) % 256; + col_green = int(angle_x * 20) % 256; + col_red = int(angle_x * 30) % 256; v.spinOnce(1, true); }