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

Method ModifyingLocker

Interaction/Widgets/vtkCoordinateFrameRepresentation.cxx:978–1048  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

976
977//------------------------------------------------------------------------------
978void vtkCoordinateFrameRepresentation::ModifyingLocker(int axis)
979{
980 switch (axis)
981 {
982 case Axis::XAxis:
983 {
984 this->XVectorIsLocked = !this->XVectorIsLocked;
985 this->HighlightLockerXVector(1);
986 // if we are locking the Χ vector
987 if (this->XVectorIsLocked)
988 {
989 // unlock the other vectors if needed
990 if (this->YVectorIsLocked)
991 {
992 this->YVectorIsLocked = false;
993 this->HighlightLockerYVector(0);
994 }
995 if (this->ZVectorIsLocked)
996 {
997 this->ZVectorIsLocked = false;
998 this->HighlightLockerZVector(0);
999 }
1000 }
1001 break;
1002 }
1003 case Axis::YAxis:
1004 {
1005 this->YVectorIsLocked = !this->YVectorIsLocked;
1006 this->HighlightLockerYVector(1);
1007 // if we are locking the Υ vector
1008 if (this->YVectorIsLocked)
1009 {
1010 // unlock the other vectors if needed
1011 if (this->XVectorIsLocked)
1012 {
1013 this->XVectorIsLocked = false;
1014 this->HighlightLockerXVector(0);
1015 }
1016 if (this->ZVectorIsLocked)
1017 {
1018 this->ZVectorIsLocked = false;
1019 this->HighlightLockerZVector(0);
1020 }
1021 }
1022 break;
1023 }
1024 case Axis::ZAxis:
1025 {
1026 this->ZVectorIsLocked = !this->ZVectorIsLocked;
1027 this->HighlightLockerZVector(1);
1028 // if we are locking the Ζ vector
1029 if (this->ZVectorIsLocked)
1030 {
1031 // unlock the other vectors if needed
1032 if (this->XVectorIsLocked)
1033 {
1034 this->XVectorIsLocked = false;
1035 this->HighlightLockerXVector(0);

Callers 2

WidgetInteractionMethod · 0.95
SetLockedAxisMethod · 0.95

Calls 5

BuildRepresentationMethod · 0.95
ModifiedMethod · 0.45

Tested by

no test coverage detected