------------------------------------------------------------------------------
| 807 | |
| 808 | //------------------------------------------------------------------------------ |
| 809 | void vtkTensorRepresentation::Scale( |
| 810 | const double* vtkNotUsed(p1), const double* vtkNotUsed(p2), int vtkNotUsed(X), int Y) |
| 811 | { |
| 812 | double* pts = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(0); |
| 813 | double* center = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(3 * 14); |
| 814 | double sf; |
| 815 | |
| 816 | if (Y > this->LastEventPosition[1]) |
| 817 | { |
| 818 | sf = 1.03; |
| 819 | } |
| 820 | else |
| 821 | { |
| 822 | sf = 0.97; |
| 823 | } |
| 824 | |
| 825 | // Move the corners |
| 826 | for (int i = 0; i < 8; i++, pts += 3) |
| 827 | { |
| 828 | pts[0] = sf * (pts[0] - center[0]) + center[0]; |
| 829 | pts[1] = sf * (pts[1] - center[1]) + center[1]; |
| 830 | pts[2] = sf * (pts[2] - center[2]) + center[2]; |
| 831 | } |
| 832 | this->PositionHandles(); |
| 833 | this->UpdateTensorFromWidget(); |
| 834 | } |
| 835 | |
| 836 | //------------------------------------------------------------------------------ |
| 837 | void vtkTensorRepresentation::ComputeNormals() |
no test coverage detected