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;
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);
}