------------------------------------------------------------------------------
| 252 | |
| 253 | //------------------------------------------------------------------------------ |
| 254 | void vtkAbstractTransform::SetInverse(vtkAbstractTransform* transform) |
| 255 | { |
| 256 | auto& internals = *(this->Internals); |
| 257 | if (internals.MyInverse == transform) |
| 258 | { |
| 259 | return; |
| 260 | } |
| 261 | |
| 262 | // check type first |
| 263 | if (!transform->IsA(this->GetClassName())) |
| 264 | { |
| 265 | vtkErrorMacro("SetInverse: requires a " << this->GetClassName() << ", a " |
| 266 | << transform->GetClassName() << " is not compatible."); |
| 267 | return; |
| 268 | } |
| 269 | |
| 270 | if (transform->CircuitCheck(this)) |
| 271 | { |
| 272 | vtkErrorMacro("SetInverse: this would create a circular reference."); |
| 273 | return; |
| 274 | } |
| 275 | |
| 276 | if (internals.MyInverse) |
| 277 | { |
| 278 | internals.MyInverse->Delete(); |
| 279 | } |
| 280 | |
| 281 | transform->Register(this); |
| 282 | internals.MyInverse = transform; |
| 283 | |
| 284 | // we are now a special 'inverse transform' |
| 285 | internals.DependsOnInverse = (transform != nullptr); |
| 286 | |
| 287 | this->Modified(); |
| 288 | } |
| 289 | |
| 290 | //------------------------------------------------------------------------------ |
| 291 | void vtkAbstractTransform::DeepCopy(vtkAbstractTransform* transform) |
no test coverage detected