| 867 | } |
| 868 | |
| 869 | void vtkBoxWidget::GetDirection( |
| 870 | const double Nx[3], const double Ny[3], const double Nz[3], double dir[3]) |
| 871 | { |
| 872 | double dotNy, dotNz; |
| 873 | double y[3]; |
| 874 | |
| 875 | if (vtkMath::Dot(Nx, Nx) != 0) |
| 876 | { |
| 877 | dir[0] = Nx[0]; |
| 878 | dir[1] = Nx[1]; |
| 879 | dir[2] = Nx[2]; |
| 880 | } |
| 881 | else |
| 882 | { |
| 883 | dotNy = vtkMath::Dot(Ny, Ny); |
| 884 | dotNz = vtkMath::Dot(Nz, Nz); |
| 885 | if (dotNy != 0 && dotNz != 0) |
| 886 | { |
| 887 | vtkMath::Cross(Ny, Nz, dir); |
| 888 | } |
| 889 | else if (dotNy != 0) |
| 890 | { |
| 891 | // dir must have been initialized to the |
| 892 | // corresponding coordinate direction before calling |
| 893 | // this method |
| 894 | vtkMath::Cross(Ny, dir, y); |
| 895 | vtkMath::Cross(y, Ny, dir); |
| 896 | } |
| 897 | else if (dotNz != 0) |
| 898 | { |
| 899 | // dir must have been initialized to the |
| 900 | // corresponding coordinate direction before calling |
| 901 | // this method |
| 902 | vtkMath::Cross(Nz, dir, y); |
| 903 | vtkMath::Cross(y, Nz, dir); |
| 904 | } |
| 905 | } |
| 906 | } |
| 907 | void vtkBoxWidget::MovePlusXFace(double* p1, double* p2) |
| 908 | { |
| 909 | double* pts = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(0); |
no test coverage detected