Commit 45537217 authored by Ken Martin's avatar Ken Martin
Browse files

corrected a bug in the user tranform

parent 35748fb1
......@@ -25,7 +25,7 @@
#include <math.h>
vtkCxxRevisionMacro(vtkCamera, "1.104.2.1");
vtkCxxRevisionMacro(vtkCamera, "1.104.2.2");
//----------------------------------------------------------------------------
// Needed when we don't use the vtkStandardNewMacro.
......@@ -735,6 +735,12 @@ void vtkCamera::ComputePerspectiveTransform(double aspect,
{
this->PerspectiveTransform->Identity();
// apply user defined transform last if there is one
if (this->UserTransform)
{
this->PerspectiveTransform->Concatenate(this->UserTransform->GetMatrix());
}
// adjust Z-buffer range
this->PerspectiveTransform->AdjustZBuffer(-1, +1, nearz, farz);
......@@ -804,11 +810,6 @@ void vtkCamera::ComputePerspectiveTransform(double aspect,
this->ViewShear[2]*this->Distance);
}
// apply user defined transform last if there is one
if (this->UserTransform)
{
this->PerspectiveTransform->Concatenate(this->UserTransform->GetMatrix());
}
}
//----------------------------------------------------------------------------
......
Supports Markdown
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