MCPcopy Create free account
hub / github.com/Kitware/VTK / GetKeyMatrices

Method GetKeyMatrices

Rendering/OpenGL2/vtkOpenGLCamera.cxx:104–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104void vtkOpenGLCamera::GetKeyMatrices(vtkRenderer* ren, vtkMatrix4x4*& wcvc, vtkMatrix3x3*& normMat,
105 vtkMatrix4x4*& vcdc, vtkMatrix4x4*& wcdc)
106{
107 // has the camera changed?
108 if (ren != this->LastRenderer || this->MTime > this->KeyMatrixTime ||
109 ren->GetMTime() > this->KeyMatrixTime)
110 {
111 this->WCVCMatrix->DeepCopy(this->GetModelViewTransformMatrix());
112
113 for (int i = 0; i < 3; ++i)
114 {
115 for (int j = 0; j < 3; ++j)
116 {
117 this->NormalMatrix->SetElement(i, j, this->WCVCMatrix->GetElement(i, j));
118 }
119 }
120 this->NormalMatrix->Invert();
121
122 this->WCVCMatrix->Transpose();
123
124 this->VCDCMatrix->DeepCopy(
125 this->GetProjectionTransformMatrix(ren->GetTiledAspectRatio(), -1, 1));
126 this->VCDCMatrix->Transpose();
127
128 vtkMatrix4x4::Multiply4x4(this->WCVCMatrix, this->VCDCMatrix, this->WCDCMatrix);
129
130 this->KeyMatrixTime.Modified();
131 this->LastRenderer = ren;
132 }
133
134 wcvc = this->WCVCMatrix;
135 normMat = this->NormalMatrix;
136 vcdc = this->VCDCMatrix;
137 wcdc = this->WCDCMatrix;
138}
139VTK_ABI_NAMESPACE_END

Callers

nothing calls this directly

Calls 9

GetTiledAspectRatioMethod · 0.80
GetMTimeMethod · 0.45
DeepCopyMethod · 0.45
SetElementMethod · 0.45
InvertMethod · 0.45
TransposeMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected