Skip to content

Commit

Permalink
Merge pull request #1026 from Tonsty/master
Browse files Browse the repository at this point in the history
fix bugs in renderView
  • Loading branch information
jspricke committed Dec 14, 2014
2 parents 3b86719 + f08f5c1 commit a2afba1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions visualization/src/pcl_visualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3792,15 +3792,14 @@ pcl::visualization::PCLVisualizer::renderView (int xres, int yres, pcl::PointClo
dheight * float (y) - 1.0f,
depth[ptr],
1.0f);
world_coords = mat1 * world_coords;
world_coords = mat2 * mat1 * world_coords;

float w3 = 1.0f / world_coords[3];
world_coords[0] *= w3;
// vtk view coordinate system is different than the standard camera coordinates (z forward, y down, x right), thus, the fliping in y and z
world_coords[1] *= -w3;
world_coords[2] *= -w3;

world_coords = mat2 * world_coords;
pt.x = static_cast<float> (world_coords[0]);
pt.y = static_cast<float> (world_coords[1]);
pt.z = static_cast<float> (world_coords[2]);
Expand Down

0 comments on commit a2afba1

Please sign in to comment.