------------------------------------------------------------------------------
| 469 | |
| 470 | //------------------------------------------------------------------------------ |
| 471 | void vtkTensorRepresentation::ComplexInteraction( |
| 472 | vtkRenderWindowInteractor*, vtkAbstractWidget*, unsigned long, void* calldata) |
| 473 | { |
| 474 | vtkEventData* edata = static_cast<vtkEventData*>(calldata); |
| 475 | vtkEventDataDevice3D* edd = edata->GetAsEventDataDevice3D(); |
| 476 | if (edd) |
| 477 | { |
| 478 | // all others |
| 479 | double eventPos[3]; |
| 480 | edd->GetWorldPosition(eventPos); |
| 481 | double eventDir[4]; |
| 482 | edd->GetWorldOrientation(eventDir); |
| 483 | |
| 484 | double* prevPickPoint = this->LastEventPosition; |
| 485 | double* pickPoint = eventPos; |
| 486 | |
| 487 | if (this->InteractionState == vtkTensorRepresentation::MoveF0) |
| 488 | { |
| 489 | this->MoveMinusXFace(prevPickPoint, pickPoint, true); |
| 490 | } |
| 491 | |
| 492 | else if (this->InteractionState == vtkTensorRepresentation::MoveF1) |
| 493 | { |
| 494 | this->MovePlusXFace(prevPickPoint, pickPoint, true); |
| 495 | } |
| 496 | |
| 497 | else if (this->InteractionState == vtkTensorRepresentation::MoveF2) |
| 498 | { |
| 499 | this->MoveMinusYFace(prevPickPoint, pickPoint, true); |
| 500 | } |
| 501 | |
| 502 | else if (this->InteractionState == vtkTensorRepresentation::MoveF3) |
| 503 | { |
| 504 | this->MovePlusYFace(prevPickPoint, pickPoint, true); |
| 505 | } |
| 506 | |
| 507 | else if (this->InteractionState == vtkTensorRepresentation::MoveF4) |
| 508 | { |
| 509 | this->MoveMinusZFace(prevPickPoint, pickPoint, true); |
| 510 | } |
| 511 | |
| 512 | else if (this->InteractionState == vtkTensorRepresentation::MoveF5) |
| 513 | { |
| 514 | this->MovePlusZFace(prevPickPoint, pickPoint, true); |
| 515 | } |
| 516 | |
| 517 | else if (this->InteractionState == vtkTensorRepresentation::Translating) |
| 518 | { |
| 519 | this->UpdatePose(this->LastEventPosition, this->LastEventOrientation, eventPos, eventDir); |
| 520 | } |
| 521 | |
| 522 | // Book keeping |
| 523 | std::copy(eventPos, eventPos + 3, this->LastEventPosition); |
| 524 | std::copy(eventDir, eventDir + 4, this->LastEventOrientation); |
| 525 | this->Modified(); |
| 526 | } |
| 527 | } |
| 528 |
nothing calls this directly
no test coverage detected