------------------------------------------------------------------------------
| 464 | |
| 465 | //------------------------------------------------------------------------------ |
| 466 | void vtkInteractorStyleTrackballActor::UniformScale() |
| 467 | { |
| 468 | if (this->CurrentRenderer == nullptr || this->InteractionProp == nullptr) |
| 469 | { |
| 470 | return; |
| 471 | } |
| 472 | |
| 473 | vtkRenderWindowInteractor* rwi = this->Interactor; |
| 474 | |
| 475 | int dy = rwi->GetEventPosition()[1] - rwi->GetLastEventPosition()[1]; |
| 476 | |
| 477 | double* obj_center = this->InteractionProp->GetCenter(); |
| 478 | double* center = this->CurrentRenderer->GetCenter(); |
| 479 | |
| 480 | double yf = dy / center[1] * this->MotionFactor; |
| 481 | double scaleFactor = pow(1.1, yf); |
| 482 | |
| 483 | double** rotate = nullptr; |
| 484 | |
| 485 | double scale[3]; |
| 486 | scale[0] = scale[1] = scale[2] = scaleFactor; |
| 487 | |
| 488 | this->Prop3DTransform(this->InteractionProp, obj_center, 0, rotate, scale); |
| 489 | |
| 490 | if (this->AutoAdjustCameraClippingRange) |
| 491 | { |
| 492 | this->CurrentRenderer->ResetCameraClippingRange(); |
| 493 | } |
| 494 | |
| 495 | rwi->Render(); |
| 496 | } |
| 497 | |
| 498 | //------------------------------------------------------------------------------ |
| 499 | void vtkInteractorStyleTrackballActor::PrintSelf(ostream& os, vtkIndent indent) |
no test coverage detected