Salome HOME
updated copyright message
[modules/gui.git] / src / VTKViewer / VTKViewer_Transform.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 52d91ef..9d2afb1
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  Author : Laurent CORNABE with help of Nicolas REJNERI
 //  Module : SALOME
 //
+
 #include "VTKViewer_Transform.h"
 
 #include <vtkObjectFactory.h>
 #include <vtkMatrix4x4.h>
 
+#include <math.h>
+
 static double EPS = 10e-4;
 
 
-vtkStandardNewMacro(VTKViewer_Transform);
+vtkStandardNewMacro(VTKViewer_Transform)
 
 /*!Sets matrix scale.*/
-void VTKViewer_Transform::SetMatrixScale(double theScaleX, double theScaleY, double theScaleZ){ 
-  double aMatrix[16] = {theScaleX,0,0,0, 
-                        0,theScaleY,0,0, 
-                        0,0,theScaleZ,0, 
+void VTKViewer_Transform::SetMatrixScale(double theScaleX, double theScaleY, double theScaleZ){
+  double aMatrix[16] = {theScaleX,0,0,0,
+                        0,theScaleY,0,0,
+                        0,0,theScaleZ,0,
                         0,0,0,1.0000000};
   this->SetMatrix(aMatrix);
 }
@@ -58,10 +61,10 @@ void VTKViewer_Transform::GetMatrixScale(double theScale[3]){
 /*!Checks: Is matrix identity, where used EPS value.
  *If |aScaleX-1|<EPS && |aScaleY-1|<EPS && |aScaleY-1|<EPS return 1, esle 0.
  */
-int VTKViewer_Transform::IsIdentity(){ 
+int VTKViewer_Transform::IsIdentity(){
   double aScale[3];
   this->GetMatrixScale(aScale);
-  return (fabs(aScale[0] - 1.0) < EPS && 
-          fabs(aScale[1] - 1.0) < EPS && 
+  return (fabs(aScale[0] - 1.0) < EPS &&
+          fabs(aScale[1] - 1.0) < EPS &&
           fabs(aScale[2] - 1.0) < EPS);
 }