------------------------------------------------------------------------------
| 318 | |
| 319 | //------------------------------------------------------------------------------ |
| 320 | void vtkAbstractTransform::Update() |
| 321 | { |
| 322 | auto& internals = *(this->Internals); |
| 323 | |
| 324 | // locking is required to ensure that the class is thread-safe |
| 325 | internals.UpdateMutex.lock(); |
| 326 | internals.InUpdate = true; |
| 327 | |
| 328 | // check to see if we are a special 'inverse' transform |
| 329 | if (internals.DependsOnInverse && |
| 330 | internals.MyInverse->GetMTime() >= internals.UpdateTime.GetMTime()) |
| 331 | { |
| 332 | vtkDebugMacro("Updating transformation from its inverse"); |
| 333 | this->InternalDeepCopy(internals.MyInverse); |
| 334 | this->Inverse(); |
| 335 | vtkDebugMacro("Calling InternalUpdate on the transformation"); |
| 336 | this->InternalUpdate(); |
| 337 | } |
| 338 | // otherwise just check our MTime against our last update |
| 339 | else if (this->GetMTime() >= internals.UpdateTime.GetMTime()) |
| 340 | { |
| 341 | // do internal update for subclass |
| 342 | vtkDebugMacro("Calling InternalUpdate on the transformation"); |
| 343 | this->InternalUpdate(); |
| 344 | } |
| 345 | |
| 346 | internals.InUpdate = false; |
| 347 | internals.UpdateTime.Modified(); |
| 348 | internals.UpdateMutex.unlock(); |
| 349 | } |
| 350 | |
| 351 | //------------------------------------------------------------------------------ |
| 352 | int vtkAbstractTransform::CircuitCheck(vtkAbstractTransform* transform) |