void VISU_CutPlanesPL::ShallowCopy(VISU_PipeLine *thePipeLine){
VISU_ScalarMapPL::ShallowCopy(thePipeLine);
if(VISU_CutPlanesPL *aPipeLine = dynamic_cast<VISU_CutPlanesPL*>(thePipeLine)){
- SetPlaneOrientation(aPipeLine->GetPlaneOrientation());
+ SetOrientation(aPipeLine->GetPlaneOrientation(),
+ aPipeLine->GetRotateX(),aPipeLine->GetRotateY());
SetDisplacement(aPipeLine->GetDisplacement());
SetNbParts(aPipeLine->GetNbParts());
for (int i = 0, iend = GetNbParts(); i < iend; i++)
if(!aPipeLine->IsPartDefault(i)) SetPartPosition(i, aPipeLine->GetPartPosition(i));
- SetRotateX(aPipeLine->GetRotateX());
- SetRotateY(aPipeLine->GetRotateY());
}
}
BoundPrj[2] = BoundPrj[1] - BoundPrj[0];
}
-void VISU_CutPlanesPL::SetRotateX(float theAng, int theNum){
+
+void VISU_CutPlanesPL::SetOrientation(const VISU_CutPlanesPL::PlaneOrientation& theOrient,
+ float theXAng, float theYAng, int theNum)
+{
+ myBasePlane[theNum] = theOrient;
+ switch(myBasePlane[theNum]){
+ case XY: myAng[theNum][0] = theXAng; break;
+ case YZ: myAng[theNum][1] = theXAng; break;
+ case ZX: myAng[theNum][2] = theXAng; break;
+ }
switch(myBasePlane[theNum]){
- case XY: myAng[theNum][0] = theAng; break;
- case YZ: myAng[theNum][1] = theAng; break;
- case ZX: myAng[theNum][2] = theAng; break;
+ case XY: myAng[theNum][1] = theYAng; break;
+ case YZ: myAng[theNum][2] = theYAng; break;
+ case ZX: myAng[theNum][0] = theYAng; break;
}
}
+
+const VISU_CutPlanesPL::PlaneOrientation& VISU_CutPlanesPL::GetPlaneOrientation(int theNum){
+ return myBasePlane[theNum];
+}
+
float VISU_CutPlanesPL::GetRotateX(int theNum){
switch(myBasePlane[theNum]){
case XY: return myAng[theNum][0];
}
}
-void VISU_CutPlanesPL::SetRotateY(float theAng, int theNum){
- switch(myBasePlane[theNum]){
- case XY: myAng[theNum][1] = theAng; break;
- case YZ: myAng[theNum][2] = theAng; break;
- case ZX: myAng[theNum][0] = theAng; break;
- }
-}
-
float VISU_CutPlanesPL::GetRotateY(int theNum){
switch(myBasePlane[theNum]){
case XY: return myAng[theNum][1];