]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Porting to OCCT development version: Standard_PI -> M_PI V6_main_20111227 V6_main_20111228 V6_main_20111229 V6_main_20111230
authorjfa <jfa@opencascade.com>
Mon, 26 Dec 2011 14:00:51 +0000 (14:00 +0000)
committerjfa <jfa@opencascade.com>
Mon, 26 Dec 2011 14:00:51 +0000 (14:00 +0000)
src/VISUGUI/VisuGUI_CutLinesDlg.cxx
src/VISUGUI/VisuGUI_CutPlanesDlg.cxx
src/VISUGUI/VisuGUI_Plot3DDlg.cxx

index e8b4d4efc6e819fccb61186909d14d73c50b1ea8..561151f597bfe60acc16e83570584bdc21c2e057 100644 (file)
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 //  File   : VisuGUI_CutLinesDlg.cxx
 //  Author : VSV
 //  Module : VISU
-//
+
 #include "VisuGUI_CutLinesDlg.h"
 
 #include "VISU_ColoredPrs3dFactory.hh"
@@ -363,14 +362,14 @@ void VisuGUI_CutLinesDlg::initFromPrsObject ( VISU::ColoredPrs3d_i* thePrs,
 
   VisuGUI_ScalarBarBaseDlg::initFromPrsObject(myPrsCopy, theInit);
 
-  myRotXSpn->setValue(myPrsCopy->GetRotateX()*180./PI);
-  myRotYSpn->setValue(myPrsCopy->GetRotateY()*180./PI);
+  myRotXSpn->setValue(myPrsCopy->GetRotateX()*180./M_PI);
+  myRotYSpn->setValue(myPrsCopy->GetRotateY()*180./M_PI);
   myPosSpn->setValue(myPrsCopy->GetDisplacement());
   setOrientation(myPrsCopy->GetOrientationType());
 
   myNbSpn->setValue( (int)myPrsCopy->GetNbLines() );
-  myRotXSpn2->setValue(myPrsCopy->GetRotateX2()*180./PI);
-  myRotYSpn2->setValue(myPrsCopy->GetRotateY2()*180./PI);
+  myRotXSpn2->setValue(myPrsCopy->GetRotateX2()*180./M_PI);
+  myRotYSpn2->setValue(myPrsCopy->GetRotateY2()*180./M_PI);
   myPosSpn2->setValue(myPrsCopy->GetDisplacement2());
   setOrientation2(myPrsCopy->GetOrientationType2());
 
@@ -405,14 +404,14 @@ int VisuGUI_CutLinesDlg::storeToPrsObject (VISU::ColoredPrs3d_i* thePrs)
   anIsOk &= GetScalarPane()->storeToPrsObject( myPrsCopy );
 
   myPrsCopy->SetOrientation(getOrientaion(),
-                            myRotXSpn->value()*PI/180.,
-                            myRotYSpn->value()*PI/180.);
+                            myRotXSpn->value()*M_PI/180.,
+                            myRotYSpn->value()*M_PI/180.);
   myPrsCopy->SetDisplacement(myPosSpn->value());
   myPrsCopy->SetNbLines((int)myNbSpn->value());
 
   myPrsCopy->SetOrientation2(getOrientaion(false),
-                             myRotXSpn2->value()*PI/180.,
-                             myRotYSpn2->value()*PI/180.);
+                             myRotXSpn2->value()*M_PI/180.,
+                             myRotYSpn2->value()*M_PI/180.);
   myPrsCopy->SetDisplacement2(myPosSpn2->value());
 
   if (!myCBSetDef->isChecked())
@@ -588,14 +587,14 @@ void VisuGUI_CutLinesDlg::DrawTable()
     return;
 
   myCutLines->SetOrientation(getOrientaion(),
-                             myRotXSpn->value()*PI/180.,
-                             myRotYSpn->value()*PI/180.);
+                             myRotXSpn->value()*M_PI/180.,
+                             myRotYSpn->value()*M_PI/180.);
 
   myCutLines->SetNbLines(aNbPlanes);
   myCutLines->SetDisplacement2(myPosSpn2->value());
   myCutLines->SetOrientation2(getOrientaion(false),
-                              myRotXSpn2->value()*PI/180.,
-                              myRotYSpn2->value()*PI/180.);
+                              myRotXSpn2->value()*M_PI/180.,
+                              myRotYSpn2->value()*M_PI/180.);
 
   if (aNbRows>0)
     for (int i = 0; i < aNbRows; ++i)
index 20cf4beb8d4eabd5ca7fd341bfa6ec42efb23a51..09a7266fac8ba453c700c0c1890ccf606abed56e 100644 (file)
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 //  VISU VISUGUI : GUI of VISU component
 //  File   : VisuGUI_CutPlanesDlg.cxx
 //  Author : Laurent CORNABE & Hubert ROLLAND
 //  Module : VISU
-//  $Header$
-//
+
 #include "VisuGUI_CutPlanesDlg.h"
 
 #include "VISU_ColoredPrs3dFactory.hh"
@@ -241,7 +239,7 @@ VisuGUI_CutPlanesPane::~VisuGUI_CutPlanesPane()
 void VisuGUI_CutPlanesPane::initFromPrsObject (VISU::CutPlanes_i* thePrs)
 {
   setNbPlanes(thePrs->GetNbPlanes());
-  setRotation(thePrs->GetRotateX()*180./PI, thePrs->GetRotateY()*180./PI);
+  setRotation(thePrs->GetRotateX()*180./M_PI, thePrs->GetRotateY()*180./M_PI);
   setPlanePos(thePrs->GetOrientationType());
   myPosSpn->setValue(thePrs->GetDisplacement());
   InitEntity2VectorialFieldsMap(thePrs);
@@ -357,7 +355,7 @@ void VisuGUI_CutPlanesPane::createPlanes()
 
 int VisuGUI_CutPlanesPane::storeToPrsObject (VISU::CutPlanes_i* thePrs)
 {
-  thePrs->SetOrientation(getOrientaion(), getRotation1()*PI/180., getRotation2()*PI/180.);
+  thePrs->SetOrientation(getOrientaion(), getRotation1()*M_PI/180., getRotation2()*M_PI/180.);
   thePrs->SetNbPlanes(getNbPlanes());
   thePrs->SetDisplacement(myPosSpn->value());
   for (int i = 0; i < getNbPlanes(); ++i) {
@@ -512,7 +510,7 @@ void VisuGUI_CutPlanesPane::DrawTable()
   int aNbRows = myPosTable->rowCount();
   int aNbPlanes = getNbPlanes();
 
-  myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*PI/180.,getRotation2()*PI/180.);
+  myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*M_PI/180.,getRotation2()*M_PI/180.);
   myCutPlanes->SetNbPlanes(aNbPlanes);
   myCutPlanes->SetDisplacement(myPosSpn->value());
   myCutPlanes->SetScale(getScaleFactor());
@@ -733,7 +731,7 @@ void VisuGUI_CutPlanesPane::onRotation (double theValue)
   if (!(bool)myCutPlanes) return;
   if (myPreviewCheck->isChecked()) {
     if (SVTK_ViewWindow* vf = VISU::GetActiveViewWindow<SVTK_ViewWindow>()) {
-      myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*PI/180.,getRotation2()*PI/180.);
+      myCutPlanes->SetOrientation(getOrientaion(),getRotation1()*M_PI/180.,getRotation2()*M_PI/180.);
       myCutPlanes->GetPipeLine()->Update();
       deletePlanes();
       createPlanes();
index 5b0b86c6709391fb694d7ec5a3acbabc21d268e8..f7cbb6c14d73cc241885e466ccad75c046f4e96a 100644 (file)
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
 
 //  VISU VISUGUI : GUI of VISU component
 //  File   : VisuGUI_Plot3DDlg.cxx
 //  Author : Laurent CORNABE & Hubert ROLLAND
 //  Module : VISU
-//  $Header$
-//
+
 #include "VisuGUI_Plot3DDlg.h"
 
 #include "VisuGUI.h"
@@ -455,8 +453,8 @@ void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs)
   GBOrientation->button(id)->click();
 
   // rotation
-  Rot1->setValue(thePrs->GetRotateX() * 180./PI);
-  Rot2->setValue(thePrs->GetRotateY() * 180./PI);
+  Rot1->setValue(thePrs->GetRotateX() * 180./M_PI);
+  Rot2->setValue(thePrs->GetRotateY() * 180./M_PI);
 
   // position
   RelativeChkB->setChecked(thePrs->IsPositionRelative());
@@ -507,7 +505,7 @@ int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs)
   default: ori = VISU::Plot3D::ZX;
   }
   // rotation
-  thePrs->SetOrientation(ori, Rot1->value()*PI/180., Rot2->value()*PI/180.);
+  thePrs->SetOrientation(ori, Rot1->value()*M_PI/180., Rot2->value()*M_PI/180.);
 
   // position
   thePrs->SetPlanePosition(PositionSpn->value(), RelativeChkB->isChecked());
@@ -559,9 +557,9 @@ void VisuGUI_Plot3DPane::setPlane(int theOrientation, double theXRotation, doubl
 
 
   // Set rotation
-  Rot1->setValue(theXRotation * 180./PI);
+  Rot1->setValue(theXRotation * 180./M_PI);
   Rot1->setEnabled(false);
-  Rot2->setValue(theYRotation * 180./PI);
+  Rot2->setValue(theYRotation * 180./M_PI);
   Rot2->setEnabled(false);
 
   // Set position