MCPcopy Create free account
hub / github.com/Kitware/VTK / GetDirection

Method GetDirection

Interaction/Widgets/vtkBoxWidget.cxx:869–906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

867}
868
869void 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}
907void vtkBoxWidget::MovePlusXFace(double* p1, double* p2)
908{
909 double* pts = static_cast<vtkDoubleArray*>(this->Points->GetData())->GetPointer(0);

Callers 10

MovePlusXFaceMethod · 0.95
MoveMinusXFaceMethod · 0.95
MovePlusYFaceMethod · 0.95
MoveMinusYFaceMethod · 0.95
MovePlusZFaceMethod · 0.95
MoveMinusZFaceMethod · 0.95
ReconfigureHandlesMethod · 0.45
InsertHandleOnLineMethod · 0.45
DeepCopyMethod · 0.45
vtkImageResliceExecuteFunction · 0.45

Calls 2

DotFunction · 0.50
CrossFunction · 0.50

Tested by

no test coverage detected