------------------------------------------------------------------------------
| 625 | |
| 626 | //------------------------------------------------------------------------------ |
| 627 | void vtkTransformConcatenation::Inverse() |
| 628 | { |
| 629 | // invert the matrices |
| 630 | if (this->PreMatrix) |
| 631 | { |
| 632 | this->PreMatrix->Invert(); |
| 633 | this->PreMatrixTransform->Modified(); |
| 634 | int i = (this->InverseFlag ? this->NumberOfTransforms - 1 : 0); |
| 635 | this->TransformList[i].SwapForwardInverse(); |
| 636 | } |
| 637 | |
| 638 | if (this->PostMatrix) |
| 639 | { |
| 640 | this->PostMatrix->Invert(); |
| 641 | this->PostMatrixTransform->Modified(); |
| 642 | int i = (this->InverseFlag ? 0 : this->NumberOfTransforms - 1); |
| 643 | this->TransformList[i].SwapForwardInverse(); |
| 644 | } |
| 645 | |
| 646 | // swap the pre- and post-matrices |
| 647 | vtkMatrix4x4* tmp = this->PreMatrix; |
| 648 | vtkAbstractTransform* tmp2 = this->PreMatrixTransform; |
| 649 | this->PreMatrix = this->PostMatrix; |
| 650 | this->PreMatrixTransform = this->PostMatrixTransform; |
| 651 | this->PostMatrix = tmp; |
| 652 | this->PostMatrixTransform = tmp2; |
| 653 | |
| 654 | // what used to be pre-transforms are now post-transforms |
| 655 | this->NumberOfPreTransforms = this->NumberOfTransforms - this->NumberOfPreTransforms; |
| 656 | |
| 657 | this->InverseFlag = !this->InverseFlag; |
| 658 | } |
| 659 | |
| 660 | //------------------------------------------------------------------------------ |
| 661 | void vtkTransformConcatenation::Identity() |
no test coverage detected