------------------------------------------------------------------------------
| 1533 | |
| 1534 | //------------------------------------------------------------------------------ |
| 1535 | void vtkCoordinateFrameRepresentation::SizeHandles() |
| 1536 | { |
| 1537 | double* origin = this->GetOrigin(); |
| 1538 | double* xNormal = this->GetXVectorNormal(); |
| 1539 | double* yNormal = this->GetYVectorNormal(); |
| 1540 | double* zNormal = this->GetZVectorNormal(); |
| 1541 | |
| 1542 | const double d = |
| 1543 | vtkWidgetRepresentation::SizeHandlesRelativeToViewport(this->LengthFactor, origin); |
| 1544 | const double radius = this->vtkWidgetRepresentation::SizeHandlesInPixels(3.0, origin); |
| 1545 | |
| 1546 | // set up origin |
| 1547 | this->OriginSphereSource->SetRadius(radius); |
| 1548 | |
| 1549 | // set up the x vector |
| 1550 | double xP2[3], xLocker[3]; |
| 1551 | xP2[0] = origin[0] + d * xNormal[0]; |
| 1552 | xP2[1] = origin[1] + d * xNormal[1]; |
| 1553 | xP2[2] = origin[2] + d * xNormal[2]; |
| 1554 | |
| 1555 | xLocker[0] = xP2[0] + 2 * radius * xNormal[0]; |
| 1556 | xLocker[1] = xP2[1] + 2 * radius * xNormal[1]; |
| 1557 | xLocker[2] = xP2[2] + 2 * radius * xNormal[2]; |
| 1558 | |
| 1559 | this->XVectorLineSource->SetPoint2(xP2); |
| 1560 | this->XVectorConeSource->SetCenter(xP2); |
| 1561 | this->LockerXVectorConeSource->SetCenter(xLocker); |
| 1562 | |
| 1563 | this->XVectorConeSource->SetHeight(2.0 * radius); |
| 1564 | this->XVectorConeSource->SetRadius(radius); |
| 1565 | this->LockerXVectorConeSource->SetHeight(2.0 * radius); |
| 1566 | this->LockerXVectorConeSource->SetRadius(radius); |
| 1567 | |
| 1568 | // set up the y vector |
| 1569 | double yP2[3], yLocker[3]; |
| 1570 | yP2[0] = origin[0] + d * yNormal[0]; |
| 1571 | yP2[1] = origin[1] + d * yNormal[1]; |
| 1572 | yP2[2] = origin[2] + d * yNormal[2]; |
| 1573 | |
| 1574 | yLocker[0] = yP2[0] + 2 * radius * yNormal[0]; |
| 1575 | yLocker[1] = yP2[1] + 2 * radius * yNormal[1]; |
| 1576 | yLocker[2] = yP2[2] + 2 * radius * yNormal[2]; |
| 1577 | |
| 1578 | this->YVectorLineSource->SetPoint2(yP2); |
| 1579 | this->YVectorConeSource->SetCenter(yP2); |
| 1580 | this->LockerYVectorConeSource->SetCenter(yLocker); |
| 1581 | |
| 1582 | this->YVectorConeSource->SetHeight(2.0 * radius); |
| 1583 | this->YVectorConeSource->SetRadius(radius); |
| 1584 | this->LockerYVectorConeSource->SetHeight(2.0 * radius); |
| 1585 | this->LockerYVectorConeSource->SetRadius(radius); |
| 1586 | |
| 1587 | // set up the z vector |
| 1588 | double zP2[3], zLocker[3]; |
| 1589 | zP2[0] = origin[0] + d * zNormal[0]; |
| 1590 | zP2[1] = origin[1] + d * zNormal[1]; |
| 1591 | zP2[2] = origin[2] + d * zNormal[2]; |
| 1592 |