Commit bede1917 authored by Aashish Chaudhary's avatar Aashish Chaudhary
Browse files

Optimized setting eye and model transform matrices

Change-Id: Ifd0527cabadd36d93810591075f4f3f2cb18757a
parent 119fa901
......@@ -1693,56 +1693,54 @@ void vtkCamera::SetEyeTransformMatrix( double x00, double x01, double x02, doubl
double x20, double x21, double x22, double x23,
double x30, double x31, double x32, double x33)
{
vtkMatrix4x4 *matrix = vtkMatrix4x4::New();
matrix->Element[0][0] = x00;
matrix->Element[0][1] = x01;
matrix->Element[0][2] = x02;
matrix->Element[0][3] = x03;
matrix->Element[1][0] = x10;
matrix->Element[1][1] = x11;
matrix->Element[1][2] = x12;
matrix->Element[1][3] = x13;
matrix->Element[2][0] = x20;
matrix->Element[2][1] = x21;
matrix->Element[2][2] = x22;
matrix->Element[2][3] = x23;
matrix->Element[3][0] = x30;
matrix->Element[3][1] = x31;
matrix->Element[3][2] = x32;
matrix->Element[3][3] = x33;
this->SetEyeTransformMatrix( matrix );
matrix->Delete();
}
this->EyeTransformMatrix->Element[0][0] = x00;
this->EyeTransformMatrix->Element[0][1] = x01;
this->EyeTransformMatrix->Element[0][2] = x02;
this->EyeTransformMatrix->Element[0][3] = x03;
this->EyeTransformMatrix->Element[1][0] = x10;
this->EyeTransformMatrix->Element[1][1] = x11;
this->EyeTransformMatrix->Element[1][2] = x12;
this->EyeTransformMatrix->Element[1][3] = x13;
this->EyeTransformMatrix->Element[2][0] = x20;
this->EyeTransformMatrix->Element[2][1] = x21;
this->EyeTransformMatrix->Element[2][2] = x22;
this->EyeTransformMatrix->Element[2][3] = x23;
this->EyeTransformMatrix->Element[3][0] = x30;
this->EyeTransformMatrix->Element[3][1] = x31;
this->EyeTransformMatrix->Element[3][2] = x32;
this->EyeTransformMatrix->Element[3][3] = x33;
this->Modified();
}
// ----------------------------------------------------------------------------
void vtkCamera::SetModelTransformMatrix( double x00, double x01, double x02, double x03,
double x10, double x11, double x12, double x13,
double x20, double x21, double x22, double x23,
double x30, double x31, double x32, double x33)
{
vtkMatrix4x4 *matrix = vtkMatrix4x4::New();
matrix->Element[0][0] = x00;
matrix->Element[0][1] = x01;
matrix->Element[0][2] = x02;
matrix->Element[0][3] = x03;
matrix->Element[1][0] = x10;
matrix->Element[1][1] = x11;
matrix->Element[1][2] = x12;
matrix->Element[1][3] = x13;
matrix->Element[2][0] = x20;
matrix->Element[2][1] = x21;
matrix->Element[2][2] = x22;
matrix->Element[2][3] = x23;
matrix->Element[3][0] = x30;
matrix->Element[3][1] = x31;
matrix->Element[3][2] = x32;
matrix->Element[3][3] = x33;
this->SetModelTransformMatrix( matrix );
matrix->Delete();
this->ModelTransformMatrix->Element[0][0] = x00;
this->ModelTransformMatrix->Element[0][1] = x01;
this->ModelTransformMatrix->Element[0][2] = x02;
this->ModelTransformMatrix->Element[0][3] = x03;
this->ModelTransformMatrix->Element[1][0] = x10;
this->ModelTransformMatrix->Element[1][1] = x11;
this->ModelTransformMatrix->Element[1][2] = x12;
this->ModelTransformMatrix->Element[1][3] = x13;
this->ModelTransformMatrix->Element[2][0] = x20;
this->ModelTransformMatrix->Element[2][1] = x21;
this->ModelTransformMatrix->Element[2][2] = x22;
this->ModelTransformMatrix->Element[2][3] = x23;
this->ModelTransformMatrix->Element[3][0] = x30;
this->ModelTransformMatrix->Element[3][1] = x31;
this->ModelTransformMatrix->Element[3][2] = x32;
this->ModelTransformMatrix->Element[3][3] = x33;
this->Modified();
}
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