------------------------------------------------------------------------------
| 300 | |
| 301 | //------------------------------------------------------------------------------ |
| 302 | void vtkRenderWindow::GetPhysicalToWorldMatrix(vtkMatrix4x4* physicalToWorldMatrix) |
| 303 | { |
| 304 | if (!physicalToWorldMatrix) |
| 305 | { |
| 306 | return; |
| 307 | } |
| 308 | |
| 309 | physicalToWorldMatrix->Identity(); |
| 310 | |
| 311 | // construct physical to non-scaled world axes (scaling is applied later) |
| 312 | double physicalZ_NonscaledWorld[3] = { -this->PhysicalViewDirection[0], |
| 313 | -this->PhysicalViewDirection[1], -this->PhysicalViewDirection[2] }; |
| 314 | double* physicalY_NonscaledWorld = this->PhysicalViewUp; |
| 315 | double physicalX_NonscaledWorld[3] = { 0.0 }; |
| 316 | vtkMath::Cross(physicalY_NonscaledWorld, physicalZ_NonscaledWorld, physicalX_NonscaledWorld); |
| 317 | |
| 318 | for (int row = 0; row < 3; ++row) |
| 319 | { |
| 320 | physicalToWorldMatrix->SetElement(row, 0, physicalX_NonscaledWorld[row] * this->PhysicalScale); |
| 321 | physicalToWorldMatrix->SetElement(row, 1, physicalY_NonscaledWorld[row] * this->PhysicalScale); |
| 322 | physicalToWorldMatrix->SetElement(row, 2, physicalZ_NonscaledWorld[row] * this->PhysicalScale); |
| 323 | physicalToWorldMatrix->SetElement(row, 3, -this->PhysicalTranslation[row]); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | //------------------------------------------------------------------------------ |
| 328 | bool vtkRenderWindow::GetDeviceToWorldMatrixForDevice( |
no test coverage detected