Commit b7a271ce authored by Lisa Avila's avatar Lisa Avila

Viewing rays bug fixed

parent 82b490b6
......@@ -397,7 +397,7 @@ void vtkRenderer::ViewToWorld()
// use the inverse matrix
mat.Invert();
// Transform point to world coordinates
result[0] = this->ViewPoint[0];
result[1] = this->ViewPoint[1];
......@@ -508,7 +508,7 @@ void vtkRenderer::UpdateViewRays()
// Loop through each pixel and compute viewing ray
// get the perspective transformation from the active camera
mat = this->ActiveCamera->GetCompositePerspectiveTransform(1,0,1);
mat = this->ActiveCamera->GetPerspectiveTransform(1,0,1);
mat.Invert();
mat.Transpose();
......@@ -530,7 +530,7 @@ void vtkRenderer::UpdateViewRays()
{
result[0] = xpos;
result[1] = ypos;
result[2] = zpos;
result[2] = 1.0;
result[3] = 1.0;
mat.PointMultiply(result,result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment