]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
untabify
authoreap <eap@opencascade.com>
Wed, 4 Nov 2009 08:41:56 +0000 (08:41 +0000)
committereap <eap@opencascade.com>
Wed, 4 Nov 2009 08:41:56 +0000 (08:41 +0000)
25 files changed:
src/VTKViewer/VTKViewer_Actor.cxx
src/VTKViewer/VTKViewer_Actor.h
src/VTKViewer/VTKViewer_Algorithm.h
src/VTKViewer/VTKViewer_AppendFilter.cxx
src/VTKViewer/VTKViewer_AppendFilter.h
src/VTKViewer/VTKViewer_ArcBuilder.cxx
src/VTKViewer/VTKViewer_ArcBuilder.h
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_ExtractUnstructuredGrid.cxx
src/VTKViewer/VTKViewer_FramedTextActor.cxx
src/VTKViewer/VTKViewer_FramedTextActor.h
src/VTKViewer/VTKViewer_Functor.h
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_InteractorStyle.cxx
src/VTKViewer/VTKViewer_InteractorStyle.h
src/VTKViewer/VTKViewer_RenderWindow.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.cxx
src/VTKViewer/VTKViewer_RenderWindowInteractor.h
src/VTKViewer/VTKViewer_ShrinkFilter.cxx
src/VTKViewer/VTKViewer_Transform.cxx
src/VTKViewer/VTKViewer_Trihedron.cxx
src/VTKViewer/VTKViewer_Utilities.cxx
src/VTKViewer/VTKViewer_Utilities.h
src/VTKViewer/VTKViewer_ViewWindow.cxx
src/VTKViewer/VTKViewer_ViewWindow.h

index 920e3b08ceaa01ca98dcd825be969ef63cc58492..5118c43902a556cd93c2b127e84c06a26ef0c30e 100755 (executable)
@@ -79,7 +79,7 @@ VTKViewer_Actor
   myTransformFilter(VTKViewer_TransformFilter::New())
 {
   vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
-                                                                myPolygonOffsetUnits);
+                                                                 myPolygonOffsetUnits);
 
   for(int i = 0; i < 6; i++)
     myPassFilter.push_back(vtkPassThroughFilter::New());
@@ -233,7 +233,7 @@ VTKViewer_Actor
     
     vtkMapper::SetResolveCoincidentTopologyToPolygonOffset();
     vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
-                                                                  myPolygonOffsetUnits);
+                                                                   myPolygonOffsetUnits);
     Superclass::Render(ren,m);
     
     vtkMapper::SetResolveCoincidentTopologyPolygonOffsetParameters(aFactor,aUnit);
@@ -261,7 +261,7 @@ VTKViewer_Actor
 void
 VTKViewer_Actor
 ::SetPolygonOffsetParameters(vtkFloatingPointType factor, 
-                            vtkFloatingPointType units)
+                             vtkFloatingPointType units)
 {
   myPolygonOffsetFactor = factor;
   myPolygonOffsetUnits = units;
@@ -274,7 +274,7 @@ VTKViewer_Actor
 void
 VTKViewer_Actor
 ::GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
-                            vtkFloatingPointType& units)
+                             vtkFloatingPointType& units)
 {
   factor = myPolygonOffsetFactor;
   units = myPolygonOffsetUnits;
@@ -578,8 +578,8 @@ VTKViewer_Actor
 void
 VTKViewer_Actor
 ::SetColor(vtkFloatingPointType r,
-          vtkFloatingPointType g,
-          vtkFloatingPointType b)
+           vtkFloatingPointType g,
+           vtkFloatingPointType b)
 {
   GetProperty()->SetColor(r,g,b);
 }
@@ -600,8 +600,8 @@ VTKViewer_Actor
 void
 VTKViewer_Actor
 ::GetColor(vtkFloatingPointType& r,
-          vtkFloatingPointType& g,
-          vtkFloatingPointType& b)
+           vtkFloatingPointType& g,
+           vtkFloatingPointType& b)
 {
   vtkFloatingPointType aColor[3];
   GetProperty()->GetColor(aColor);
index 439e45dbf4dc21b9b56625c7cb7fb077048b85b7..d41760d9f26a5af8b762beeb6034a6344feba031 100755 (executable)
@@ -91,15 +91,15 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   virtual
   void
   SetColor(vtkFloatingPointType r,
-          vtkFloatingPointType g,
-          vtkFloatingPointType b);
+           vtkFloatingPointType g,
+           vtkFloatingPointType b);
 
   //! Get current color
   virtual
   void
   GetColor(vtkFloatingPointType& r,
-          vtkFloatingPointType& g,
-          vtkFloatingPointType& b);
+           vtkFloatingPointType& g,
+           vtkFloatingPointType& b);
 
   //! Change color
   virtual
@@ -223,12 +223,12 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor
   //! Set ResolveCoincidentTopology parameters
   void
   SetPolygonOffsetParameters(vtkFloatingPointType factor, 
-                            vtkFloatingPointType units);
+                             vtkFloatingPointType units);
 
   //! Get current ResolveCoincidentTopology parameters
   void
   GetPolygonOffsetParameters(vtkFloatingPointType& factor, 
-                            vtkFloatingPointType& units);
+                             vtkFloatingPointType& units);
 
   virtual
   void
index 436efa9feb06dc0db6d2d6d1148664c588da1d3f..78d489b058d06d1cd496cb17a5af527df2b843fc 100644 (file)
@@ -68,13 +68,13 @@ namespace VTK
     template<typename TActor, typename TFunction>
       TFunction ForEach(vtkActorCollection *theCollection, TFunction theFun)
       {
-       if(theCollection){
-         theCollection->InitTraversal();
-         while(vtkActor *anAct = theCollection->GetNextActor())
-           if(TActor *anActor = dynamic_cast<TActor*>(anAct))
-             theFun(anActor);
-       }
-       return theFun;
+        if(theCollection){
+          theCollection->InitTraversal();
+          while(vtkActor *anAct = theCollection->GetNextActor())
+            if(TActor *anActor = dynamic_cast<TActor*>(anAct))
+              theFun(anActor);
+        }
+        return theFun;
       }
   
     /*!For each actor(for ex: someActor) from \a theCollection(that can be dynamic cast to type TActor and \n
@@ -83,17 +83,17 @@ namespace VTK
      */
     template<typename TActor, typename TPredicate, typename TFunction>
       TFunction ForEachIf(vtkActorCollection *theCollection, 
-                         TPredicate thePredicate,
-                         TFunction theFun)
+                          TPredicate thePredicate,
+                          TFunction theFun)
       {
-       if(theCollection){
-         theCollection->InitTraversal();
-         while(vtkActor *anAct = theCollection->GetNextActor())
-           if(TActor *anActor = dynamic_cast<TActor*>(anAct))
-             if(thePredicate(anActor))
-               theFun(anActor);
-       }
-       return theFun;
+        if(theCollection){
+          theCollection->InitTraversal();
+          while(vtkActor *anAct = theCollection->GetNextActor())
+            if(TActor *anActor = dynamic_cast<TActor*>(anAct))
+              if(thePredicate(anActor))
+                theFun(anActor);
+        }
+        return theFun;
       }
   
     /*!Find actor from collection, that can be dynamicaly cast to \a TActor, \n
@@ -103,14 +103,14 @@ namespace VTK
     template<typename TActor, typename TPredicate>
       TActor* Find(vtkActorCollection *theCollection, TPredicate thePredicate)
       {
-       if(theCollection){
-         theCollection->InitTraversal();
-         while(vtkActor *anAct = theCollection->GetNextActor())
-           if(TActor *anActor = dynamic_cast<TActor*>(anAct))
-             if(thePredicate(anActor))
-               return anActor;
-       }
-       return NULL;
+        if(theCollection){
+          theCollection->InitTraversal();
+          while(vtkActor *anAct = theCollection->GetNextActor())
+            if(TActor *anActor = dynamic_cast<TActor*>(anAct))
+              if(thePredicate(anActor))
+                return anActor;
+        }
+        return NULL;
       }
 
 }
index ccde1876d6d497e6e6edd29676e625e945fecd37..fe6550c8247fc557c1102d3f67ce4db828d6084e 100644 (file)
@@ -99,9 +99,9 @@ VTKViewer_AppendFilter
 int
 VTKViewer_AppendFilter
 ::RequestData(
-             vtkInformation *request,
-             vtkInformationVector **inputVector,
-             vtkInformationVector *outputVector)
+              vtkInformation *request,
+              vtkInformationVector **inputVector,
+              vtkInformationVector *outputVector)
 {
   int aRet = 0;
   if(GetSharedPointsDataSet())
@@ -146,8 +146,8 @@ namespace
   inline
   vtkIdType
   GetOutputID(vtkIdType theInputID,
-             vtkIdType theInputDataSetID,
-             const VTKViewer_AppendFilter::TVectorIds& theRanges)
+              vtkIdType theInputDataSetID,
+              const VTKViewer_AppendFilter::TVectorIds& theRanges)
   {
     theInputID = theInputDataSetID = -1;
 
@@ -163,7 +163,7 @@ namespace
 vtkIdType
 VTKViewer_AppendFilter
 ::GetPointOutputID(vtkIdType theInputID,
-                  vtkIdType theInputDataSetID)
+                   vtkIdType theInputDataSetID)
 {
   if(GetSharedPointsDataSet())
     return theInputID;
@@ -175,7 +175,7 @@ VTKViewer_AppendFilter
 vtkIdType 
 VTKViewer_AppendFilter
 ::GetCellOutputID(vtkIdType theInputID,
-                  vtkIdType theInputDataSetID)
+                   vtkIdType theInputDataSetID)
 {
   if(GetSharedPointsDataSet())
     return theInputID;
@@ -188,10 +188,10 @@ namespace
 {
   void
   GetInputID(vtkIdType theOutputID,
-            vtkIdType& theInputID,
-            vtkIdType& theStartID,
-            vtkIdType& theInputDataSetID,
-            const VTKViewer_AppendFilter::TVectorIds& theRanges)
+             vtkIdType& theInputID,
+             vtkIdType& theStartID,
+             vtkIdType& theInputDataSetID,
+             const VTKViewer_AppendFilter::TVectorIds& theRanges)
   {
     theInputID = theStartID = theInputDataSetID = -1;
 
@@ -207,10 +207,10 @@ namespace
     for(vtkIdType aDataSetId = 0; aDataSetId < aNbInputs; ++aDataSetId){
       vtkIdType aRange = theRanges[aDataSetId];
       if(aRange > theOutputID){
-       theInputID = theOutputID - aStartId;
-       theInputDataSetID = aDataSetId;
-       theStartID = aStartId;
-       break;
+        theInputID = theOutputID - aStartId;
+        theInputDataSetID = aDataSetId;
+        theStartID = aStartId;
+        break;
       }
       aStartId = aRange;
     }
@@ -220,9 +220,9 @@ namespace
 void 
 VTKViewer_AppendFilter
 ::GetPointInputID(vtkIdType theOutputID,
-                 vtkIdType& theInputID,
-                 vtkIdType& theStartID,
-                 vtkIdType& theInputDataSetID)
+                  vtkIdType& theInputID,
+                  vtkIdType& theStartID,
+                  vtkIdType& theInputDataSetID)
 {
   if(GetSharedPointsDataSet()) {
     theStartID = theInputDataSetID = 0;
@@ -231,25 +231,25 @@ VTKViewer_AppendFilter
   }
 
   ::GetInputID(theOutputID,
-              theInputID,
-              theStartID,
-              theInputDataSetID,
-              myNodeRanges);
+               theInputID,
+               theStartID,
+               theInputDataSetID,
+               myNodeRanges);
 }
 
 
 void
 VTKViewer_AppendFilter
 ::GetCellInputID(vtkIdType theOutputID,
-                vtkIdType& theInputID,
-                vtkIdType& theStartID,
-                vtkIdType& theInputDataSetID)
+                 vtkIdType& theInputID,
+                 vtkIdType& theStartID,
+                 vtkIdType& theInputDataSetID)
 {
   ::GetInputID(theOutputID,
-              theInputID,
-              theStartID,
-              theInputDataSetID,
-              myCellRanges);
+               theInputID,
+               theStartID,
+               theInputDataSetID,
+               myCellRanges);
 }
 
 
index 9f90c66581f6420fb6b0093469b200672c3f7ff5..5531d38d66ef5dcc033798fcba64c119a8bded24 100644 (file)
@@ -62,23 +62,23 @@ public:
 
   vtkIdType
   GetPointOutputID(vtkIdType theInputID,
-                  vtkIdType theInputDataSetID);
+                   vtkIdType theInputDataSetID);
 
   vtkIdType
   GetCellOutputID(vtkIdType theInputID,
-                 vtkIdType theInputDataSetID);
+                  vtkIdType theInputDataSetID);
 
   void 
   GetPointInputID(vtkIdType theOutputID,
-                vtkIdType& theInputID,
-                vtkIdType& theStartID,
-                vtkIdType& theInputDataSetID);
+                 vtkIdType& theInputID,
+                 vtkIdType& theStartID,
+                 vtkIdType& theInputDataSetID);
 
   void
   GetCellInputID(vtkIdType theOutputID,
-                vtkIdType& theInputID,
-                vtkIdType& theStartID,
-                vtkIdType& theInputDataSetID);
+                 vtkIdType& theInputID,
+                 vtkIdType& theStartID,
+                 vtkIdType& theInputDataSetID);
 
   typedef std::vector<vtkIdType> TVectorIds;
 
index e8cd9e4796f8b6349cc2e8d23ea2e13cb6ebcaca..392cbd18726331df4eeed462e8eb2a8fe5c91b13 100644 (file)
@@ -89,7 +89,7 @@ double XYZ::Modulus () const {
 Pnt::Pnt(double X, 
          double Y, 
          double Z,
-        double ScalarValue):
+         double ScalarValue):
   coord(X,Y,Z),
   scalarValue(ScalarValue)
 {
@@ -617,7 +617,7 @@ vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input,
     for(vtkIdType idx = 1; idx < aNbPts-1;idx++) {
       curID = output->GetPoints()->InsertNextPoint(aPoints->GetPoint(idx));
       if( outputScalars )
-       outputScalars->InsertNextTuple1(aScalarValues[idx]);
+        outputScalars->InsertNextTuple1(aScalarValues[idx]);
       aNewPoints[idx] = curID;
     }
     aNewPoints[aNbPts-1] = pts[1];
@@ -632,10 +632,10 @@ vtkIdType Build1DArc(vtkIdType cellId, vtkUnstructuredGrid* input,
  * Array theIds - it is array with ids of added points.
  */
 vtkIdType MergevtkPoints(const std::vector<vtkPoints*>& theCollection,
-                        const std::vector< std::vector<double> >& theScalarCollection,
-                        vtkPoints* thePoints,
-                        std::map<int, double>& thePntId2ScalarValue,
-                        vtkIdType* &theIds){
+                         const std::vector< std::vector<double> >& theScalarCollection,
+                         vtkPoints* thePoints,
+                         std::map<int, double>& thePntId2ScalarValue,
+                         vtkIdType* &theIds){
   vtkIdType aNbPoints = 0;
   vtkIdType anIdCounter = 0;
   vtkIdType aNewPntId = 0;
@@ -660,7 +660,7 @@ vtkIdType MergevtkPoints(const std::vector<vtkPoints*>& theCollection,
       for(vtkIdType idx = 0;idx < aPoints->GetNumberOfPoints()-1;idx++){
         aNewPntId = thePoints->InsertNextPoint(aPoints->GetPoint(idx));
         theIds[anIdCounter] = aNewPntId;
-       thePntId2ScalarValue[ aNewPntId ] = aScalarValues[idx];
+        thePntId2ScalarValue[ aNewPntId ] = aScalarValues[idx];
         anIdCounter++;
       }
     }
index 4ad39dc5f874008015ce6a0690a63d18f0cf4715..4362b6df0ebcacbd3c3a0514582291f448580315 100644 (file)
@@ -38,9 +38,9 @@ class Pnt;
 typedef std::list<Pnt> PntList;
 
 vtkIdType MergevtkPoints(const std::vector<vtkPoints*>& theCollection,
-                        const std::vector< std::vector<double> >& theScalarCollection,
+                         const std::vector< std::vector<double> >& theScalarCollection,
                          vtkPoints* thePoints,
-                        std::map<int, double>& thePntId2ScalarValue,
+                         std::map<int, double>& thePntId2ScalarValue,
                          vtkIdType* &theIds);
 
 vtkIdType Build1DArc(vtkIdType cellId, 
@@ -50,8 +50,8 @@ vtkIdType Build1DArc(vtkIdType cellId,
                      vtkFloatingPointType myMaxArcAngle);
 
 Pnt CreatePnt(vtkCell* cell,
-             vtkDataArray* scalars,
-             vtkIdType index);
+              vtkDataArray* scalars,
+              vtkIdType index);
 
 /*!
  * Class for represenation coordinates X,Y,Z
@@ -138,9 +138,9 @@ class Plane{
   void CalculatePlane(const Pnt& thePnt1, const Pnt& thePnt2, const Pnt& thePnt3);
   
  private:
-       double myA;
-       double myB;
-       double myC;
+        double myA;
+        double myB;
+        double myC;
 };
 
 
@@ -148,9 +148,9 @@ class VTKViewer_ArcBuilder{
  public:
   enum ArcStatus {Arc_Done=0, Arc_Error};
   VTKViewer_ArcBuilder(const Pnt& thePnt1,
-                      const Pnt& thePnt2,
-                      const Pnt& thePnt3,
-                      double theAngle);
+                       const Pnt& thePnt2,
+                       const Pnt& thePnt3,
+                       double theAngle);
   
   ~VTKViewer_ArcBuilder();  
 
@@ -161,7 +161,7 @@ class VTKViewer_ArcBuilder{
   void GetAngle(const double theAngle);
 
   static double GetPointAngleOnCircle(const double theXCenter, const double theYCenter,
-                                     const double theXPoint, const double theYPoint);
+                                      const double theXPoint, const double theYPoint);
 
   vtkPoints* GetPoints();
   const std::vector<double>& GetScalarValues();
index 96b6bec3384f233676cd7fb4313364525520acd9..229f28e1b7de5833019df3bbe707c50a0c77cd6a 100644 (file)
@@ -56,8 +56,8 @@ namespace
     vtkFloatingPointType myOrigin[3];
     vtkFloatingPointType myNormal[3];
     TPolygon(const TConnectivities& theConnectivities,
-            vtkFloatingPointType theOrigin[3],
-            vtkFloatingPointType theNormal[3]):
+             vtkFloatingPointType theOrigin[3],
+             vtkFloatingPointType theNormal[3]):
       myConnectivities(theConnectivities)
     {
       myOrigin[0] = theOrigin[0];
@@ -98,7 +98,7 @@ VTKViewer_Triangulator
 vtkPoints*
 VTKViewer_Triangulator
 ::InitPoints(vtkUnstructuredGrid *theInput,
-            vtkIdType theCellId)
+             vtkIdType theCellId)
 {
   myPoints->Reset();
   myPoints->Modified(); // the VTK bug
@@ -151,8 +151,8 @@ VTKViewer_Triangulator
   aCoordDiff[2] = (aBounds[5] - aBounds[4]);
 
   return sqrt(aCoordDiff[0]*aCoordDiff[0] + 
-             aCoordDiff[1]*aCoordDiff[1] + 
-             aCoordDiff[2]*aCoordDiff[2]);
+              aCoordDiff[1]*aCoordDiff[1] + 
+              aCoordDiff[2]*aCoordDiff[2]);
 }
 
 
@@ -160,9 +160,9 @@ VTKViewer_Triangulator
 void 
 VTKViewer_Triangulator
 ::GetCellNeighbors(vtkUnstructuredGrid *theInput,
-                  vtkIdType theCellId,
-                  vtkCell* theFace,
-                  vtkIdList* theCellIds)
+                   vtkIdType theCellId,
+                   vtkCell* theFace,
+                   vtkIdList* theCellIds)
 {
   myFaceIds->Reset();
   vtkIdList *anIdList = theFace->PointIds;  
@@ -187,16 +187,16 @@ VTKViewer_Triangulator
 bool 
 VTKViewer_Triangulator
 ::Execute(vtkUnstructuredGrid *theInput,
-         vtkCellData* thInputCD,
-         vtkIdType theCellId,
-         int theShowInside,
-         int theAllVisible,
-         const char* theCellsVisibility,
-         vtkPolyData *theOutput,
-         vtkCellData* theOutputCD,
-         int theStoreMapping,
-         std::vector<vtkIdType>& theVTK2ObjIds,
-         bool theIsCheckConvex)
+          vtkCellData* thInputCD,
+          vtkIdType theCellId,
+          int theShowInside,
+          int theAllVisible,
+          const char* theCellsVisibility,
+          vtkPolyData *theOutput,
+          vtkCellData* theOutputCD,
+          int theStoreMapping,
+          std::vector<vtkIdType>& theVTK2ObjIds,
+          bool theIsCheckConvex)
 {
   vtkPoints *aPoints = InitPoints(theInput, theCellId);
   vtkIdType aNumPts = GetNbOfPoints();
@@ -270,7 +270,7 @@ VTKViewer_Triangulator
 
     vtkIdList *anIdList = aFace->PointIds;
     vtkIdType aNewPts[3] = {anIdList->GetId(0), anIdList->GetId(1), anIdList->GetId(2)};
-           
+            
     // To initialize set of points for the plane where the trinangle face belong to
     TPointIds aPointIds;
     aPointIds.insert(aNewPts[0]);
@@ -294,21 +294,21 @@ VTKViewer_Triangulator
       /* To calculate plane normal for face (aFace)
 
 
-       ^ aNormal
-       |     
-       |   ^ aVector01
-       | /
-       /_________> aVector02
+        ^ aNormal
+        |     
+        |   ^ aVector01
+        | /
+        /_________> aVector02
        
       
       */
       vtkFloatingPointType aVector01[3] = { aCoord[1][0] - aCoord[0][0],
-                                           aCoord[1][1] - aCoord[0][1],
-                                           aCoord[1][2] - aCoord[0][2] };
+                                            aCoord[1][1] - aCoord[0][1],
+                                            aCoord[1][2] - aCoord[0][2] };
       
       vtkFloatingPointType aVector02[3] = { aCoord[2][0] - aCoord[0][0],
-                                           aCoord[2][1] - aCoord[0][1],
-                                           aCoord[2][2] - aCoord[0][2] };
+                                            aCoord[2][1] - aCoord[0][1],
+                                            aCoord[2][2] - aCoord[0][2] };
       
       vtkMath::Normalize(aVector01);
       vtkMath::Normalize(aVector02);
@@ -323,211 +323,211 @@ VTKViewer_Triangulator
       // To calculate bounds of the point set
       vtkFloatingPointType aCenter[3] = {0.0, 0.0, 0.0};
       {
-       TPointIds::const_iterator anIter = anInitialPointIds.begin();
-       TPointIds::const_iterator anEndIter = anInitialPointIds.end();
-       for(; anIter != anEndIter; anIter++){
-         vtkFloatingPointType aPntCoord[3];
-         vtkIdType aPntId = *anIter;
-         aPoints->GetPoint(aPntId,aPntCoord);
-         
-         vtkFloatingPointType aVector0Pnt[3] = { aPntCoord[0] - aCoord[0][0],
-                                                 aPntCoord[1] - aCoord[0][1],
-                                                 aPntCoord[2] - aCoord[0][2] };
-
-         
-         vtkMath::Normalize(aVector0Pnt);
-         
-         vtkFloatingPointType aNormalPnt[3];
-         // calculate aNormalPnt
-         {
-           vtkFloatingPointType aCosPnt01 = vtkMath::Dot(aVector0Pnt,aVector01);
-           vtkFloatingPointType aCosPnt02 = vtkMath::Dot(aVector0Pnt,aVector02);
-           if(aCosPnt01<-1)
-             aCosPnt01 = -1;
-           if(aCosPnt01>1)
-             aCosPnt01 = 1;
-           if(aCosPnt02<-1)
-             aCosPnt02 = -1;
-           if(aCosPnt02>1)
-             aCosPnt02 = 1;
-
-           vtkFloatingPointType aDist01,aDist02;// deflection from Pi/3 angle (equilateral triangle)
-           vtkFloatingPointType aAngPnt01 = fabs(acos(aCosPnt01));
-           vtkFloatingPointType aAngPnt02 = fabs(acos(aCosPnt02));
-
-           /*  check that triangle similar to equilateral triangle
-               AOC or COB ?
-               aVector0Pnt = (OC)
-               aVector01   = (OB)
-               aVector02   = (OA)
-           
-           B
-           ^ aVector01  C     
-           |           ^ aVector0Pnt  
-           |     _____/ 
-           | ___/
-           |/________> aVector02
-           O          A
-           */
-           aDist01 = fabs(aAngPnt01-(vtkMath::Pi())/3.0); 
-           aDist02 = fabs(aAngPnt02-(vtkMath::Pi())/3.0);
-           
-           // caculate a normal for best triangle
-           if(aDist01 <= aDist02)
-             vtkMath::Cross(aVector0Pnt,aVector01,aNormalPnt);
-           else
-             vtkMath::Cross(aVector0Pnt,aVector02,aNormalPnt);
-
-         }
-         
-         vtkMath::Normalize(aNormalPnt);
-         
-         if(DEBUG_TRIA_EXECUTE)
-           cout<<"\t\taPntId = "<<aPntId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"};";
-         
-         vtkFloatingPointType aDist = vtkPlane::DistanceToPlane(aPntCoord,aNormal,aCoord[0]);
-         if(DEBUG_TRIA_EXECUTE) cout<<": aDist = "<<aDist;
-         if(fabs(aDist) < aDistEps){
-           aPointIds.insert(aPntId);
-           aCenter[0] += aPntCoord[0];
-           aCenter[1] += aPntCoord[1];
-           aCenter[2] += aPntCoord[2];
-           if(DEBUG_TRIA_EXECUTE) cout  << "; Added = TRUE" << endl;
-         } else {
-           if(DEBUG_TRIA_EXECUTE) cout  << "; Added = FALSE" << endl;
-         }
-       }
-       int aNbPoints = aPointIds.size();
-       aCenter[0] /= aNbPoints;
-       aCenter[1] /= aNbPoints;
-       aCenter[2] /= aNbPoints;
+        TPointIds::const_iterator anIter = anInitialPointIds.begin();
+        TPointIds::const_iterator anEndIter = anInitialPointIds.end();
+        for(; anIter != anEndIter; anIter++){
+          vtkFloatingPointType aPntCoord[3];
+          vtkIdType aPntId = *anIter;
+          aPoints->GetPoint(aPntId,aPntCoord);
+          
+          vtkFloatingPointType aVector0Pnt[3] = { aPntCoord[0] - aCoord[0][0],
+                                                  aPntCoord[1] - aCoord[0][1],
+                                                  aPntCoord[2] - aCoord[0][2] };
+
+          
+          vtkMath::Normalize(aVector0Pnt);
+          
+          vtkFloatingPointType aNormalPnt[3];
+          // calculate aNormalPnt
+          {
+            vtkFloatingPointType aCosPnt01 = vtkMath::Dot(aVector0Pnt,aVector01);
+            vtkFloatingPointType aCosPnt02 = vtkMath::Dot(aVector0Pnt,aVector02);
+            if(aCosPnt01<-1)
+              aCosPnt01 = -1;
+            if(aCosPnt01>1)
+              aCosPnt01 = 1;
+            if(aCosPnt02<-1)
+              aCosPnt02 = -1;
+            if(aCosPnt02>1)
+              aCosPnt02 = 1;
+
+            vtkFloatingPointType aDist01,aDist02;// deflection from Pi/3 angle (equilateral triangle)
+            vtkFloatingPointType aAngPnt01 = fabs(acos(aCosPnt01));
+            vtkFloatingPointType aAngPnt02 = fabs(acos(aCosPnt02));
+
+            /*  check that triangle similar to equilateral triangle
+                AOC or COB ?
+                aVector0Pnt = (OC)
+                aVector01   = (OB)
+                aVector02   = (OA)
+            
+            B
+            ^ aVector01  C     
+            |           ^ aVector0Pnt  
+            |     _____/ 
+            | ___/
+            |/________> aVector02
+            O          A
+            */
+            aDist01 = fabs(aAngPnt01-(vtkMath::Pi())/3.0); 
+            aDist02 = fabs(aAngPnt02-(vtkMath::Pi())/3.0);
+            
+            // caculate a normal for best triangle
+            if(aDist01 <= aDist02)
+              vtkMath::Cross(aVector0Pnt,aVector01,aNormalPnt);
+            else
+              vtkMath::Cross(aVector0Pnt,aVector02,aNormalPnt);
+
+          }
+          
+          vtkMath::Normalize(aNormalPnt);
+          
+          if(DEBUG_TRIA_EXECUTE)
+            cout<<"\t\taPntId = "<<aPntId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"};";
+          
+          vtkFloatingPointType aDist = vtkPlane::DistanceToPlane(aPntCoord,aNormal,aCoord[0]);
+          if(DEBUG_TRIA_EXECUTE) cout<<": aDist = "<<aDist;
+          if(fabs(aDist) < aDistEps){
+            aPointIds.insert(aPntId);
+            aCenter[0] += aPntCoord[0];
+            aCenter[1] += aPntCoord[1];
+            aCenter[2] += aPntCoord[2];
+            if(DEBUG_TRIA_EXECUTE) cout  << "; Added = TRUE" << endl;
+          } else {
+            if(DEBUG_TRIA_EXECUTE) cout  << "; Added = FALSE" << endl;
+          }
+        }
+        int aNbPoints = aPointIds.size();
+        aCenter[0] /= aNbPoints;
+        aCenter[1] /= aNbPoints;
+        aCenter[2] /= aNbPoints;
       }
       
       //To sinchronize orientation of the cell and its face
       vtkFloatingPointType aVectorC[3] = { aCenter[0] - aCellCenter[0],
-                                          aCenter[1] - aCellCenter[1],
-                                          aCenter[2] - aCellCenter[2] };
+                                           aCenter[1] - aCellCenter[1],
+                                           aCenter[2] - aCellCenter[2] };
       vtkMath::Normalize(aVectorC);
       
       vtkFloatingPointType aDot = vtkMath::Dot(aNormal,aVectorC);
       if(DEBUG_TRIA_EXECUTE) {
-       cout<<"\t\taNormal = {"<<aNormal[0]<<", "<<aNormal[1]<<", "<<aNormal[2]<<"}";
-       cout<<"; aVectorC = {"<<aVectorC[0]<<", "<<aVectorC[1]<<", "<<aVectorC[2]<<"}\n";
-       cout<<"\t\taDot = "<<aDot<<"\n";
+        cout<<"\t\taNormal = {"<<aNormal[0]<<", "<<aNormal[1]<<", "<<aNormal[2]<<"}";
+        cout<<"; aVectorC = {"<<aVectorC[0]<<", "<<aVectorC[1]<<", "<<aVectorC[2]<<"}\n";
+        cout<<"\t\taDot = "<<aDot<<"\n";
       }
       if(aDot > 0){
-       aNormal[0] = -aNormal[0];
-       aNormal[1] = -aNormal[1];
-       aNormal[2] = -aNormal[2];
+        aNormal[0] = -aNormal[0];
+        aNormal[1] = -aNormal[1];
+        aNormal[2] = -aNormal[2];
       }
       
       // To calculate the primary direction for point set
       vtkFloatingPointType aVector0[3] = { aCoord[0][0] - aCenter[0],
-                                          aCoord[0][1] - aCenter[1],
-                                          aCoord[0][2] - aCenter[2] };
+                                           aCoord[0][1] - aCenter[1],
+                                           aCoord[0][2] - aCenter[2] };
       vtkMath::Normalize(aVector0);
       
       if(DEBUG_TRIA_EXECUTE) {
-       cout<<"\t\taCenter = {"<<aCenter[0]<<", "<<aCenter[1]<<", "<<aCenter[2]<<"}";
-       cout<<"; aVector0 = {"<<aVector0[0]<<", "<<aVector0[1]<<", "<<aVector0[2]<<"}\n";
+        cout<<"\t\taCenter = {"<<aCenter[0]<<", "<<aCenter[1]<<", "<<aCenter[2]<<"}";
+        cout<<"; aVector0 = {"<<aVector0[0]<<", "<<aVector0[1]<<", "<<aVector0[2]<<"}\n";
       }
       
       // To calculate the set of points by face those that belong to the plane
       TFace2PointIds aRemoveFace2PointIds;
       {
-       TFace2PointIds::const_iterator anIter = aFace2PointIds.begin();
-       TFace2PointIds::const_iterator anEndIter = aFace2PointIds.end();
-       for(; anIter != anEndIter; anIter++){
-         const TPointIds& anIds = *anIter;
-         TPointIds anIntersection;
-         std::set_intersection(aPointIds.begin(),aPointIds.end(),
-                               anIds.begin(),anIds.end(),
-                               std::inserter(anIntersection,anIntersection.begin()));
-         
-
-         if(DEBUG_TRIA_EXECUTE) {
-           cout << "anIntersection:";
-           TPointIds::iterator aII = anIntersection.begin();
-           for(;aII!=anIntersection.end();aII++)
-             cout << *aII << ",";
-           cout << endl;
-           cout << "anIds         :";
-           TPointIds::const_iterator aIIds = anIds.begin();
-           for(;aIIds!=anIds.end();aIIds++)
-             cout << *aIIds << ",";
-           cout << endl;
-         }
-         if(anIntersection == anIds){
-           aRemoveFace2PointIds.insert(anIds);
-         }
-       }
+        TFace2PointIds::const_iterator anIter = aFace2PointIds.begin();
+        TFace2PointIds::const_iterator anEndIter = aFace2PointIds.end();
+        for(; anIter != anEndIter; anIter++){
+          const TPointIds& anIds = *anIter;
+          TPointIds anIntersection;
+          std::set_intersection(aPointIds.begin(),aPointIds.end(),
+                                anIds.begin(),anIds.end(),
+                                std::inserter(anIntersection,anIntersection.begin()));
+          
+
+          if(DEBUG_TRIA_EXECUTE) {
+            cout << "anIntersection:";
+            TPointIds::iterator aII = anIntersection.begin();
+            for(;aII!=anIntersection.end();aII++)
+              cout << *aII << ",";
+            cout << endl;
+            cout << "anIds         :";
+            TPointIds::const_iterator aIIds = anIds.begin();
+            for(;aIIds!=anIds.end();aIIds++)
+              cout << *aIIds << ",";
+            cout << endl;
+          }
+          if(anIntersection == anIds){
+            aRemoveFace2PointIds.insert(anIds);
+          }
+        }
       }
       
       // To remove from the set of points by face those that belong to the plane
       {
-       TFace2PointIds::const_iterator anIter = aRemoveFace2PointIds.begin();
-       TFace2PointIds::const_iterator anEndIter = aRemoveFace2PointIds.end();
-       for(; anIter != anEndIter; anIter++){
-         const TPointIds& anIds = *anIter;
-         aFace2PointIds.erase(anIds);
-       }
+        TFace2PointIds::const_iterator anIter = aRemoveFace2PointIds.begin();
+        TFace2PointIds::const_iterator anEndIter = aRemoveFace2PointIds.end();
+        for(; anIter != anEndIter; anIter++){
+          const TPointIds& anIds = *anIter;
+          aFace2PointIds.erase(anIds);
+        }
       }
       
       // To sort the planar set of the points accrding to the angle
       {
-       typedef std::map<vtkFloatingPointType,vtkIdType> TSortedPointIds;
-       TSortedPointIds aSortedPointIds;
-       
-       TPointIds::const_iterator anIter = aPointIds.begin();
-       TPointIds::const_iterator anEndIter = aPointIds.end();
-       for(; anIter != anEndIter; anIter++){
-         vtkFloatingPointType aPntCoord[3];
-         vtkIdType aPntId = *anIter;
-         aPoints->GetPoint(aPntId,aPntCoord);
-         vtkFloatingPointType aVector[3] = { aPntCoord[0] - aCenter[0],
-                                             aPntCoord[1] - aCenter[1],
-                                             aPntCoord[2] - aCenter[2] };
-         vtkMath::Normalize(aVector);
-         
-         vtkFloatingPointType aCross[3];
-         vtkMath::Cross(aVector,aVector0,aCross);
-         vtkFloatingPointType aCr = vtkMath::Dot(aCross,aNormal);
-         bool aGreaterThanPi = aCr < 0;
-         vtkFloatingPointType aCosinus = vtkMath::Dot(aVector,aVector0);
-         vtkFloatingPointType anAngle = 0.0;
-         if(aCosinus >= 1.0){
-           aCosinus = 1.0;
-         } else if (aCosinus <= -1.0){
-           aCosinus = -1.0;
-           anAngle = vtkMath::Pi();
-         } else {
-           anAngle = acos(aCosinus);
-           if(aGreaterThanPi)
-             anAngle = 2*vtkMath::Pi() - anAngle;
-         }
-         
-         if(DEBUG_TRIA_EXECUTE) {
-           cout << "\t\t\t vtkMath::Dot(aCross,aNormal)="<<aCr<<endl;
-           cout<<"\t\t\taPntId = "<<aPntId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}";
-           cout<<"; aGreaterThanPi = "<<aGreaterThanPi<<"; aCosinus = "<<aCosinus<<"; anAngle = "<<anAngle<<"\n";
-         }
-         aSortedPointIds[anAngle] = aPntId;
-       }
-
-       if(!aSortedPointIds.empty()){
-         int aNumFacePts = aSortedPointIds.size();
-         ::TConnectivities aConnectivities(aNumFacePts);
-         TSortedPointIds::const_iterator anIter = aSortedPointIds.begin();
-         TSortedPointIds::const_iterator anEndIter = aSortedPointIds.end();
-         if(DEBUG_TRIA_EXECUTE) cout << "Polygon:";
-         for(vtkIdType anId = 0; anIter != anEndIter; anIter++, anId++){
-           vtkIdType aPntId = anIter->second;
-           aConnectivities[anId] = GetConnectivity(aPntId);
-           if(DEBUG_TRIA_EXECUTE) cout << aPntId << ",";
-         }
-         if(DEBUG_TRIA_EXECUTE) cout << endl;
-         aPolygons.push_back(::TPolygon(aConnectivities,aCenter,aNormal));
-       }
+        typedef std::map<vtkFloatingPointType,vtkIdType> TSortedPointIds;
+        TSortedPointIds aSortedPointIds;
+        
+        TPointIds::const_iterator anIter = aPointIds.begin();
+        TPointIds::const_iterator anEndIter = aPointIds.end();
+        for(; anIter != anEndIter; anIter++){
+          vtkFloatingPointType aPntCoord[3];
+          vtkIdType aPntId = *anIter;
+          aPoints->GetPoint(aPntId,aPntCoord);
+          vtkFloatingPointType aVector[3] = { aPntCoord[0] - aCenter[0],
+                                              aPntCoord[1] - aCenter[1],
+                                              aPntCoord[2] - aCenter[2] };
+          vtkMath::Normalize(aVector);
+          
+          vtkFloatingPointType aCross[3];
+          vtkMath::Cross(aVector,aVector0,aCross);
+          vtkFloatingPointType aCr = vtkMath::Dot(aCross,aNormal);
+          bool aGreaterThanPi = aCr < 0;
+          vtkFloatingPointType aCosinus = vtkMath::Dot(aVector,aVector0);
+          vtkFloatingPointType anAngle = 0.0;
+          if(aCosinus >= 1.0){
+            aCosinus = 1.0;
+          } else if (aCosinus <= -1.0){
+            aCosinus = -1.0;
+            anAngle = vtkMath::Pi();
+          } else {
+            anAngle = acos(aCosinus);
+            if(aGreaterThanPi)
+              anAngle = 2*vtkMath::Pi() - anAngle;
+          }
+          
+          if(DEBUG_TRIA_EXECUTE) {
+            cout << "\t\t\t vtkMath::Dot(aCross,aNormal)="<<aCr<<endl;
+            cout<<"\t\t\taPntId = "<<aPntId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}";
+            cout<<"; aGreaterThanPi = "<<aGreaterThanPi<<"; aCosinus = "<<aCosinus<<"; anAngle = "<<anAngle<<"\n";
+          }
+          aSortedPointIds[anAngle] = aPntId;
+        }
+
+        if(!aSortedPointIds.empty()){
+          int aNumFacePts = aSortedPointIds.size();
+          ::TConnectivities aConnectivities(aNumFacePts);
+          TSortedPointIds::const_iterator anIter = aSortedPointIds.begin();
+          TSortedPointIds::const_iterator anEndIter = aSortedPointIds.end();
+          if(DEBUG_TRIA_EXECUTE) cout << "Polygon:";
+          for(vtkIdType anId = 0; anIter != anEndIter; anIter++, anId++){
+            vtkIdType aPntId = anIter->second;
+            aConnectivities[anId] = GetConnectivity(aPntId);
+            if(DEBUG_TRIA_EXECUTE) cout << aPntId << ",";
+          }
+          if(DEBUG_TRIA_EXECUTE) cout << endl;
+          aPolygons.push_back(::TPolygon(aConnectivities,aCenter,aNormal));
+        }
       }
     }
   }
@@ -542,18 +542,18 @@ VTKViewer_Triangulator
       vtkFloatingPointType* aNormal = aPolygon.myNormal;
       vtkFloatingPointType* anOrigin = aPolygon.myOrigin;
       if(DEBUG_TRIA_EXECUTE) {
-       cout<<"\taPolygonId = "<<aPolygonId<<"\n";
-       cout<<"\t\taNormal = {"<<aNormal[0]<<", "<<aNormal[1]<<", "<<aNormal[2]<<"}";
-       cout<<"; anOrigin = {"<<anOrigin[0]<<", "<<anOrigin[1]<<", "<<anOrigin[2]<<"}\n";
+        cout<<"\taPolygonId = "<<aPolygonId<<"\n";
+        cout<<"\t\taNormal = {"<<aNormal[0]<<", "<<aNormal[1]<<", "<<aNormal[2]<<"}";
+        cout<<"; anOrigin = {"<<anOrigin[0]<<", "<<anOrigin[1]<<", "<<anOrigin[2]<<"}\n";
       }
       for(vtkIdType aPntId = 0; aPntId < aNumPts; aPntId++){
-       vtkFloatingPointType aPntCoord[3];
-       vtkIdType anId = GetPointId(aPntId);
-       aPoints->GetPoint(anId,aPntCoord);
-       vtkFloatingPointType aDist = vtkPlane::Evaluate(aNormal,anOrigin,aPntCoord);
-       if(DEBUG_TRIA_EXECUTE) cout<<"\t\taPntId = "<<anId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}; aDist = "<<aDist<<"\n";
-       if(aDist < -aDistEps)
-         return false;
+        vtkFloatingPointType aPntCoord[3];
+        vtkIdType anId = GetPointId(aPntId);
+        aPoints->GetPoint(anId,aPntCoord);
+        vtkFloatingPointType aDist = vtkPlane::Evaluate(aNormal,anOrigin,aPntCoord);
+        if(DEBUG_TRIA_EXECUTE) cout<<"\t\taPntId = "<<anId<<" {"<<aPntCoord[0]<<", "<<aPntCoord[1]<<", "<<aPntCoord[2]<<"}; aDist = "<<aDist<<"\n";
+        if(aDist < -aDistEps)
+          return false;
       }
     }
   }
@@ -567,14 +567,14 @@ VTKViewer_Triangulator
       if(DEBUG_TRIA_EXECUTE) cout << "PoilygonId="<<aPolygonId<<" | ";
       TConnectivities& aConnectivities = aPolygon.myConnectivities;
       if(DEBUG_TRIA_EXECUTE) {
-       for(int i=0;i<aConnectivities.size();i++)
-         cout << aConnectivities[i] << ",";
-       cout << endl;
+        for(int i=0;i<aConnectivities.size();i++)
+          cout << aConnectivities[i] << ",";
+        cout << endl;
       }
       int aNbPoints = aConnectivities.size();
       vtkIdType aNewCellId = theOutput->InsertNextCell(VTK_POLYGON,aNbPoints,&aConnectivities[0]);
       if(theStoreMapping)
-       theVTK2ObjIds.push_back(theCellId);
+        theVTK2ObjIds.push_back(theCellId);
       theOutputCD->CopyData(thInputCD,theCellId,aNewCellId);
     }
   }
@@ -611,7 +611,7 @@ VTKViewer_OrderedTriangulator
 vtkPoints*
 VTKViewer_OrderedTriangulator
 ::InitPoints(vtkUnstructuredGrid *theInput,
-            vtkIdType theCellId)
+             vtkIdType theCellId)
 {
   myBoundaryTris->Reset();
 
@@ -709,7 +709,7 @@ VTKViewer_DelaunayTriangulator
 vtkPoints* 
 VTKViewer_DelaunayTriangulator
 ::InitPoints(vtkUnstructuredGrid *theInput,
-            vtkIdType theCellId)
+             vtkIdType theCellId)
 {
   vtkPoints* aPoints = VTKViewer_Triangulator::InitPoints(theInput, theCellId);
 
index 0203f97f10041ff65cf0b9f6dab1a3b6895d0d22..cb326fff6d2846869658cb8299d82e595f72d96d 100755 (executable)
@@ -99,14 +99,14 @@ vtkIdType VTKViewer_ExtractUnstructuredGrid::GetOutputId(int theInId) const{
 
 
 inline void InsertCell(vtkUnstructuredGrid *theInput,
-                      vtkCellArray *theConnectivity, 
-                      vtkUnsignedCharArray* theCellTypesArray,
-                      vtkIdType theCellId, 
-                      vtkIdList *theIdList,
-                      bool theStoreMapping,
-                      vtkIdType theOutId, 
-                      VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId,
-                      VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId)
+                       vtkCellArray *theConnectivity, 
+                       vtkUnsignedCharArray* theCellTypesArray,
+                       vtkIdType theCellId, 
+                       vtkIdList *theIdList,
+                       bool theStoreMapping,
+                       vtkIdType theOutId, 
+                       VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId,
+                       VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId)
 {
   vtkCell *aCell = theInput->GetCell(theCellId);
   vtkIdList *aPntIds = aCell->GetPointIds();
@@ -126,13 +126,13 @@ inline void InsertCell(vtkUnstructuredGrid *theInput,
 }
 
 inline void InsertPointCell(vtkCellArray *theConnectivity, 
-                           vtkUnsignedCharArray* theCellTypesArray,
-                           vtkIdType theCellId, 
-                           vtkIdList *theIdList,
-                           bool theStoreMapping,
-                           vtkIdType theOutId, 
-                           VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId,
-                           VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId)
+                            vtkUnsignedCharArray* theCellTypesArray,
+                            vtkIdType theCellId, 
+                            vtkIdList *theIdList,
+                            bool theStoreMapping,
+                            vtkIdType theOutId, 
+                            VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId,
+                            VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId)
 {
   theIdList->SetId(0,theCellId);
   theConnectivity->InsertNextCell(theIdList);
index 50600be3115069873dce0426425c70748529b015..bd20dc84b6a53c8b3dce99a6793aa6288e524918 100644 (file)
@@ -162,8 +162,8 @@ void VTKViewer_FramedTextActor::GetSize(vtkRenderer* theRenderer, int theSize[2]
 // purpose  :
 //==================================================================
 void VTKViewer_FramedTextActor::SetForegroundColor(const vtkFloatingPointType r,
-                                                  const vtkFloatingPointType g,
-                                                  const vtkFloatingPointType b)
+                                                   const vtkFloatingPointType g,
+                                                   const vtkFloatingPointType b)
 {
   myTextProperty->SetColor(r, g, b);
   myTextMapper->GetTextProperty()->ShallowCopy(myTextProperty);
@@ -175,8 +175,8 @@ void VTKViewer_FramedTextActor::SetForegroundColor(const vtkFloatingPointType r,
 // purpose  :
 //==================================================================
 void VTKViewer_FramedTextActor::GetForegroundColor(vtkFloatingPointType& r,
-                                                  vtkFloatingPointType& g,
-                                                  vtkFloatingPointType& b)
+                                                   vtkFloatingPointType& g,
+                                                   vtkFloatingPointType& b)
 {
   vtkFloatingPointType aColor[3];
   myTextProperty->GetColor(aColor);
@@ -190,8 +190,8 @@ void VTKViewer_FramedTextActor::GetForegroundColor(vtkFloatingPointType& r,
 // purpose  :
 //==================================================================
 void VTKViewer_FramedTextActor::SetBackgroundColor(const vtkFloatingPointType r,
-                                                  const vtkFloatingPointType g,
-                                                  const vtkFloatingPointType b)
+                                                   const vtkFloatingPointType g,
+                                                   const vtkFloatingPointType b)
 {
   myBarActor->GetProperty()->SetColor(r, g, b);
   Modified();
@@ -202,8 +202,8 @@ void VTKViewer_FramedTextActor::SetBackgroundColor(const vtkFloatingPointType r,
 // purpose  :
 //==================================================================
 void VTKViewer_FramedTextActor::GetBackgroundColor(vtkFloatingPointType& r,
-                                                  vtkFloatingPointType& g,
-                                                  vtkFloatingPointType& b)
+                                                   vtkFloatingPointType& g,
+                                                   vtkFloatingPointType& b)
 {
   vtkFloatingPointType aColor[3];
   myBarActor->GetProperty()->GetColor(aColor);
@@ -485,7 +485,7 @@ VTKViewer_FramedTextActor
     }
 
     PositionCoordinate->SetValue(x / (vtkFloatingPointType)aViewPortWidth,
-                                y / (vtkFloatingPointType)aViewPortHeight);
+                                 y / (vtkFloatingPointType)aViewPortHeight);
   }
 
   aPoints->SetPoint(0, xMin, yMax, 0.0);
index 71130ac40908a4080d69f2ca1c520eeec577301f..abc93cb40f22dcd7469972ce34d2c96c98f56d7f 100644 (file)
@@ -73,18 +73,18 @@ public:
   vtkFloatingPointType        GetDistance() const;
 
   void                        SetForegroundColor(const vtkFloatingPointType r,
-                                                const vtkFloatingPointType g,
-                                                const vtkFloatingPointType b);
+                                                 const vtkFloatingPointType g,
+                                                 const vtkFloatingPointType b);
   void                        GetForegroundColor(vtkFloatingPointType& r,
-                                                vtkFloatingPointType& g,
-                                                vtkFloatingPointType& b);
+                                                 vtkFloatingPointType& g,
+                                                 vtkFloatingPointType& b);
 
   void                        SetBackgroundColor(const vtkFloatingPointType r,
-                                                const vtkFloatingPointType g,
-                                                const vtkFloatingPointType b);
+                                                 const vtkFloatingPointType g,
+                                                 const vtkFloatingPointType b);
   void                        GetBackgroundColor(vtkFloatingPointType& r,
-                                                vtkFloatingPointType& g,
-                                                vtkFloatingPointType& b);
+                                                 vtkFloatingPointType& g,
+                                                 vtkFloatingPointType& b);
 
   void                        SetTransparency(const vtkFloatingPointType theTransparency);
   vtkFloatingPointType        GetTransparency() const;
index e1bb57b173b8fe9dc895b51cc8285961e82634b3..b0cdf1483f94b272ed26c4689a20cf6c22834308 100644 (file)
@@ -43,14 +43,14 @@ namespace VTK
     {}
     void operator()(TActor* theActor)
     {
-           (theActor->*myAction)(myArg);
+            (theActor->*myAction)(myArg);
     }
   };
 
   template<class TActor, class TArg = int> struct TSetVisibility: TSetFunction<TActor,TArg>
   {
     TSetVisibility(TArg theArg): 
-           TSetFunction<TActor,TArg>(&TActor::SetVisibility,theArg)
+            TSetFunction<TActor,TArg>(&TActor::SetVisibility,theArg)
     {}
   };
 }
index be5781ae0489162deb6cdb20f699d35e8381c98b..b5f44058cb1826deec00c7cda4a0601d3d561dc8 100755 (executable)
@@ -117,9 +117,9 @@ VTKViewer_GeometryFilter
 int
 VTKViewer_GeometryFilter
 ::UnstructuredGridExecute(
-                         vtkDataSet *dataSetInput,
-                         vtkPolyData *output,
-                         vtkInformation *outInfo)
+                          vtkDataSet *dataSetInput,
+                          vtkPolyData *output,
+                          vtkInformation *outInfo)
 {
   
   vtkUnstructuredGrid *input= (vtkUnstructuredGrid *)dataSetInput;
@@ -281,17 +281,17 @@ VTKViewer_GeometryFilter
         case VTK_VERTEX:
         case VTK_POLY_VERTEX:
           newCellId = output->InsertNextCell(aCellType,npts,pts);
-         if(myStoreMapping){
-           myVTK2ObjIds.push_back(cellId); //apo
-         }
+          if(myStoreMapping){
+            myVTK2ObjIds.push_back(cellId); //apo
+          }
           outputCD->CopyData(cd,cellId,newCellId);
           break;
 
         case VTK_LINE: 
         case VTK_POLY_LINE:
           newCellId = output->InsertNextCell(aCellType,npts,pts);
-         if(myStoreMapping)
-           myVTK2ObjIds.push_back(cellId);
+          if(myStoreMapping)
+            myVTK2ObjIds.push_back(cellId);
           outputCD->CopyData(cd,cellId,newCellId);
           break;
 
@@ -299,52 +299,52 @@ VTKViewer_GeometryFilter
         case VTK_QUAD:
         case VTK_POLYGON:
           newCellId = output->InsertNextCell(aCellType,npts,pts);
-         if(myStoreMapping)
-           myVTK2ObjIds.push_back(cellId);
+          if(myStoreMapping)
+            myVTK2ObjIds.push_back(cellId);
           outputCD->CopyData(cd,cellId,newCellId);
           break;
 
         case VTK_TRIANGLE_STRIP:
           newCellId = output->InsertNextCell(aCellType,npts,pts);
-         if(myStoreMapping)
-           myVTK2ObjIds.push_back(cellId);
+          if(myStoreMapping)
+            myVTK2ObjIds.push_back(cellId);
           outputCD->CopyData(cd,cellId,newCellId);
           break;
 
         case VTK_PIXEL:
           newCellId = output->InsertNextCell(aCellType,npts,pts);
-         if(myStoreMapping)
-           myVTK2ObjIds.push_back(cellId);
-         outputCD->CopyData(cd,cellId,newCellId);
+          if(myStoreMapping)
+            myVTK2ObjIds.push_back(cellId);
+          outputCD->CopyData(cd,cellId,newCellId);
+          break;
+          
+        case VTK_CONVEX_POINT_SET: {
+          bool anIsOk = anOrderedTriangulator.Execute(input,
+                                                      cd,
+                                                      cellId,
+                                                      myShowInside,
+                                                      allVisible,
+                                                      cellVis,
+                                                      output,
+                                                      outputCD,
+                                                      myStoreMapping,
+                                                      myVTK2ObjIds,
+                                                      true);
+          if(!anIsOk)
+            aDelaunayTriangulator.Execute(input,
+                                          cd,
+                                          cellId,
+                                          myShowInside,
+                                          allVisible,
+                                          cellVis,
+                                          output,
+                                          outputCD,
+                                          myStoreMapping,
+                                          myVTK2ObjIds,
+                                          false);
+              
           break;
-         
-       case VTK_CONVEX_POINT_SET: {
-         bool anIsOk = anOrderedTriangulator.Execute(input,
-                                                     cd,
-                                                     cellId,
-                                                     myShowInside,
-                                                     allVisible,
-                                                     cellVis,
-                                                     output,
-                                                     outputCD,
-                                                     myStoreMapping,
-                                                     myVTK2ObjIds,
-                                                     true);
-         if(!anIsOk)
-           aDelaunayTriangulator.Execute(input,
-                                         cd,
-                                         cellId,
-                                         myShowInside,
-                                         allVisible,
-                                         cellVis,
-                                         output,
-                                         outputCD,
-                                         myStoreMapping,
-                                         myVTK2ObjIds,
-                                         false);
-             
-         break;
-       }
+        }
         case VTK_TETRA: {
           for (faceId = 0; faceId < 4; faceId++)
             {
@@ -353,7 +353,7 @@ VTKViewer_GeometryFilter
             faceIds->InsertNextId(pts[faceVerts[0]]);
             faceIds->InsertNextId(pts[faceVerts[1]]);
             faceIds->InsertNextId(pts[faceVerts[2]]);
-           aCellType = VTK_TRIANGLE;
+            aCellType = VTK_TRIANGLE;
             numFacePts = 3;
             input->GetCellNeighbors(cellId, faceIds, cellIds);
             if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ||
@@ -362,13 +362,13 @@ VTKViewer_GeometryFilter
               for ( i=0; i < numFacePts; i++)
                 aNewPts[i] = pts[faceVerts[i]];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
               }
             }
           break;
-       }
+        }
         case VTK_VOXEL: {
           for (faceId = 0; faceId < 6; faceId++)
             {
@@ -378,7 +378,7 @@ VTKViewer_GeometryFilter
             faceIds->InsertNextId(pts[faceVerts[1]]);
             faceIds->InsertNextId(pts[faceVerts[2]]);
             faceIds->InsertNextId(pts[faceVerts[3]]);
-           aCellType = VTK_QUAD;
+            aCellType = VTK_QUAD;
             numFacePts = 4;
             input->GetCellNeighbors(cellId, faceIds, cellIds);
             if ( cellIds->GetNumberOfIds() <= 0 || myShowInside || 
@@ -387,13 +387,13 @@ VTKViewer_GeometryFilter
               for ( i=0; i < numFacePts; i++)
                 aNewPts[i] = pts[faceVerts[PixelConvert[i]]];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
               }
             }
           break;
-       }
+        }
         case VTK_HEXAHEDRON: {
           for (faceId = 0; faceId < 6; faceId++)
             {
@@ -403,7 +403,7 @@ VTKViewer_GeometryFilter
             faceIds->InsertNextId(pts[faceVerts[1]]);
             faceIds->InsertNextId(pts[faceVerts[2]]);
             faceIds->InsertNextId(pts[faceVerts[3]]);
-           aCellType = VTK_QUAD;
+            aCellType = VTK_QUAD;
             numFacePts = 4;
             input->GetCellNeighbors(cellId, faceIds, cellIds);
             if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ||
@@ -412,13 +412,13 @@ VTKViewer_GeometryFilter
               for ( i=0; i < numFacePts; i++)
                 aNewPts[i] = pts[faceVerts[i]];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
               }
             }
           break;
-       }
+        }
         case VTK_WEDGE: {
           for (faceId = 0; faceId < 5; faceId++)
             {
@@ -427,12 +427,12 @@ VTKViewer_GeometryFilter
             faceIds->InsertNextId(pts[faceVerts[0]]);
             faceIds->InsertNextId(pts[faceVerts[1]]);
             faceIds->InsertNextId(pts[faceVerts[2]]);
-           aCellType = VTK_TRIANGLE;
+            aCellType = VTK_TRIANGLE;
             numFacePts = 3;
             if (faceVerts[3] >= 0)
               {
               faceIds->InsertNextId(pts[faceVerts[3]]);
-             aCellType = VTK_QUAD;
+              aCellType = VTK_QUAD;
               numFacePts = 4;
               }
             input->GetCellNeighbors(cellId, faceIds, cellIds);
@@ -442,13 +442,13 @@ VTKViewer_GeometryFilter
               for ( i=0; i < numFacePts; i++)
                 aNewPts[i] = pts[faceVerts[i]];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
               }
             }
           break;
-       }
+        }
         case VTK_PYRAMID: {
           for (faceId = 0; faceId < 5; faceId++)
             {
@@ -457,12 +457,12 @@ VTKViewer_GeometryFilter
             faceIds->InsertNextId(pts[faceVerts[0]]);
             faceIds->InsertNextId(pts[faceVerts[1]]);
             faceIds->InsertNextId(pts[faceVerts[2]]);
-           aCellType = VTK_TRIANGLE;
+            aCellType = VTK_TRIANGLE;
             numFacePts = 3;
             if (faceVerts[3] >= 0)
               {
               faceIds->InsertNextId(pts[faceVerts[3]]);
-             aCellType = VTK_QUAD;
+              aCellType = VTK_QUAD;
               numFacePts = 4;
               }
             input->GetCellNeighbors(cellId, faceIds, cellIds);
@@ -472,13 +472,13 @@ VTKViewer_GeometryFilter
               for ( i=0; i < numFacePts; i++)
                 aNewPts[i] = pts[faceVerts[i]];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
               }
             }
           break;
-       }
+        }
         //Quadratic cells
         case VTK_QUADRATIC_EDGE:
         case VTK_QUADRATIC_TRIANGLE:
@@ -487,14 +487,14 @@ VTKViewer_GeometryFilter
         case VTK_QUADRATIC_HEXAHEDRON:
         case VTK_QUADRATIC_WEDGE:
         case VTK_QUADRATIC_PYRAMID:
-         if(!myIsWireframeMode){
-           input->GetCell(cellId,cell);
-           vtkIdList *lpts = vtkIdList::New();  
-           vtkPoints *coords = vtkPoints::New();
-           vtkIdList *cellIds = vtkIdList::New();
-           vtkIdType newCellId;
-           
-           if ( cell->GetCellDimension() == 1 ) {
+          if(!myIsWireframeMode){
+            input->GetCell(cellId,cell);
+            vtkIdList *lpts = vtkIdList::New();  
+            vtkPoints *coords = vtkPoints::New();
+            vtkIdList *cellIds = vtkIdList::New();
+            vtkIdType newCellId;
+            
+            if ( cell->GetCellDimension() == 1 ) {
               vtkIdType arcResult = -1;
               if(myIsBuildArc) {
                 arcResult = Build1DArc(cellId, input, output, pts, myMaxArcAngle);
@@ -520,7 +520,7 @@ VTKViewer_GeometryFilter
                 outputCD->CopyData(cd,cellId,newCellId);
               }            
             }
-           else if ( cell->GetCellDimension() == 2 ) {
+            else if ( cell->GetCellDimension() == 2 ) {
               if(!myIsBuildArc) {
                 aCellType = VTK_TRIANGLE;
                 numFacePts = 3;
@@ -539,34 +539,34 @@ VTKViewer_GeometryFilter
                 BuildArcedPolygon(cellId,input,output,true);
               }
             } 
-           else //3D nonlinear cell
+            else //3D nonlinear cell
             {
-             aCellType = VTK_TRIANGLE;
-             numFacePts = 3;
-             for (int j=0; j < cell->GetNumberOfFaces(); j++){
-               vtkCell *face = cell->GetFace(j);
-               input->GetCellNeighbors(cellId, face->PointIds, cellIds);
-               if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ) {
-                 face->Triangulate(0,lpts,coords);
-                 for (i=0; i < lpts->GetNumberOfIds(); i+=3) {
-                   aNewPts[0] = lpts->GetId(i);
-                   aNewPts[1] = lpts->GetId(i+1);
-                   aNewPts[2] = lpts->GetId(i+2);
-                   newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-                   if(myStoreMapping)
-                     myVTK2ObjIds.push_back(cellId);
-                   outputCD->CopyData(cd,cellId,newCellId);
+              aCellType = VTK_TRIANGLE;
+              numFacePts = 3;
+              for (int j=0; j < cell->GetNumberOfFaces(); j++){
+                vtkCell *face = cell->GetFace(j);
+                input->GetCellNeighbors(cellId, face->PointIds, cellIds);
+                if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ) {
+                  face->Triangulate(0,lpts,coords);
+                  for (i=0; i < lpts->GetNumberOfIds(); i+=3) {
+                    aNewPts[0] = lpts->GetId(i);
+                    aNewPts[1] = lpts->GetId(i+1);
+                    aNewPts[2] = lpts->GetId(i+2);
+                    newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+                    if(myStoreMapping)
+                      myVTK2ObjIds.push_back(cellId);
+                    outputCD->CopyData(cd,cellId,newCellId);
                   }
                 }
               }
             } //3d nonlinear cell
-           cellIds->Delete();
-           coords->Delete();
-           lpts->Delete();
-           break;
+            cellIds->Delete();
+            coords->Delete();
+            lpts->Delete();
+            break;
           }else{
-           switch(aCellType){
-           case VTK_QUADRATIC_EDGE: {
+            switch(aCellType){
+            case VTK_QUADRATIC_EDGE: {
               vtkIdType arcResult =-1;
               if(myIsBuildArc) {
                arcResult = Build1DArc(cellId, input, output, pts,myMaxArcAngle);
@@ -575,21 +575,21 @@ VTKViewer_GeometryFilter
               if(!myIsBuildArc || arcResult == -1) {
                 aCellType = VTK_POLY_LINE;
                 numFacePts = 3;
-             
+              
                 aNewPts[0] = pts[0];
                 aNewPts[2] = pts[1];
                 aNewPts[1] = pts[2];
-             
+              
                 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
               }
               
               if(myStoreMapping)
                 myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-             break;
-           }
-           case VTK_QUADRATIC_TRIANGLE: {            
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+              break;
+            }
+            case VTK_QUADRATIC_TRIANGLE: {            
               if(!myIsBuildArc) {
                 aCellType = VTK_POLYGON;
                 numFacePts = 6;              
@@ -600,18 +600,18 @@ VTKViewer_GeometryFilter
                 aNewPts[3] = pts[4];
                 aNewPts[4] = pts[2];
                 aNewPts[5] = pts[5];
-               
+                
                 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-               if(myStoreMapping)
-                 myVTK2ObjIds.push_back(cellId);
-               
-               outputCD->CopyData(cd,cellId,newCellId);
+                if(myStoreMapping)
+                  myVTK2ObjIds.push_back(cellId);
+                
+                outputCD->CopyData(cd,cellId,newCellId);
               }
               else 
                 BuildArcedPolygon(cellId,input,output);
               break;
-           }
-           case VTK_QUADRATIC_QUAD: {                
+            }
+            case VTK_QUADRATIC_QUAD: {                
               if(!myIsBuildArc) {
                 aCellType = VTK_POLYGON;
                 numFacePts = 8;
@@ -624,338 +624,338 @@ VTKViewer_GeometryFilter
                 aNewPts[5] = pts[6];
                 aNewPts[6] = pts[3];
                 aNewPts[7] = pts[7];
-               
+                
                 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-               if(myStoreMapping)
-                 myVTK2ObjIds.push_back(cellId);
-               
-               outputCD->CopyData(cd,cellId,newCellId);
+                if(myStoreMapping)
+                  myVTK2ObjIds.push_back(cellId);
+                
+                outputCD->CopyData(cd,cellId,newCellId);
               }
               else 
                 BuildArcedPolygon(cellId,input,output);
               break;
-           }
-           case VTK_QUADRATIC_TETRA: {
-             aCellType = VTK_POLYGON;
-             numFacePts = 6;
-             
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[0];
-             aNewPts[1] = pts[4];
-             aNewPts[2] = pts[1];
-             aNewPts[3] = pts[5];
-             aNewPts[4] = pts[2];
-             aNewPts[5] = pts[6];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[0];
-             aNewPts[1] = pts[7];
-             aNewPts[2] = pts[3];
-             aNewPts[3] = pts[8];
-             aNewPts[4] = pts[1];
-             aNewPts[5] = pts[4];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[1];
-             aNewPts[1] = pts[8];
-             aNewPts[2] = pts[3];
-             aNewPts[3] = pts[9];
-             aNewPts[4] = pts[2];
-             aNewPts[5] = pts[5];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[2];
-             aNewPts[1] = pts[9];
-             aNewPts[2] = pts[3];
-             aNewPts[3] = pts[7];
-             aNewPts[4] = pts[0];
-             aNewPts[5] = pts[6];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             break;
-           }
+            }
+            case VTK_QUADRATIC_TETRA: {
+              aCellType = VTK_POLYGON;
+              numFacePts = 6;
+              
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[0];
+              aNewPts[1] = pts[4];
+              aNewPts[2] = pts[1];
+              aNewPts[3] = pts[5];
+              aNewPts[4] = pts[2];
+              aNewPts[5] = pts[6];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[0];
+              aNewPts[1] = pts[7];
+              aNewPts[2] = pts[3];
+              aNewPts[3] = pts[8];
+              aNewPts[4] = pts[1];
+              aNewPts[5] = pts[4];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[1];
+              aNewPts[1] = pts[8];
+              aNewPts[2] = pts[3];
+              aNewPts[3] = pts[9];
+              aNewPts[4] = pts[2];
+              aNewPts[5] = pts[5];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[2];
+              aNewPts[1] = pts[9];
+              aNewPts[2] = pts[3];
+              aNewPts[3] = pts[7];
+              aNewPts[4] = pts[0];
+              aNewPts[5] = pts[6];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              break;
+            }
             case VTK_QUADRATIC_WEDGE: {
               aCellType = VTK_POLYGON;
-             numFacePts = 6;
+              numFacePts = 6;
               //---------------------------------------------------------------
               //Face 1
-             aNewPts[0] = pts[0];
-             aNewPts[1] = pts[6];
-             aNewPts[2] = pts[1];
-             aNewPts[3] = pts[7];
-             aNewPts[4] = pts[2];
-             aNewPts[5] = pts[8];
+              aNewPts[0] = pts[0];
+              aNewPts[1] = pts[6];
+              aNewPts[2] = pts[1];
+              aNewPts[3] = pts[7];
+              aNewPts[4] = pts[2];
+              aNewPts[5] = pts[8];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
               
               //---------------------------------------------------------------
               //Face 2
               aNewPts[0] = pts[3];
-             aNewPts[1] = pts[9];
-             aNewPts[2] = pts[4];
-             aNewPts[3] = pts[10];
-             aNewPts[4] = pts[5];
-             aNewPts[5] = pts[11];
+              aNewPts[1] = pts[9];
+              aNewPts[2] = pts[4];
+              aNewPts[3] = pts[10];
+              aNewPts[4] = pts[5];
+              aNewPts[5] = pts[11];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
               
               //---------------------------------------------------------------
               //Face 3
               numFacePts = 8;
               aNewPts[0] = pts[0];
-             aNewPts[1] = pts[8];
-             aNewPts[2] = pts[2];
-             aNewPts[3] = pts[14];
-             aNewPts[4] = pts[5];
-             aNewPts[5] = pts[11];
-             aNewPts[6] = pts[3];
-             aNewPts[7] = pts[12];
+              aNewPts[1] = pts[8];
+              aNewPts[2] = pts[2];
+              aNewPts[3] = pts[14];
+              aNewPts[4] = pts[5];
+              aNewPts[5] = pts[11];
+              aNewPts[6] = pts[3];
+              aNewPts[7] = pts[12];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
 
               //---------------------------------------------------------------
               //Face 4
               aNewPts[0] = pts[1];
-             aNewPts[1] = pts[13];
-             aNewPts[2] = pts[4];
-             aNewPts[3] = pts[10];
-             aNewPts[4] = pts[5];
-             aNewPts[5] = pts[14];
-             aNewPts[6] = pts[2];
-             aNewPts[7] = pts[7];
+              aNewPts[1] = pts[13];
+              aNewPts[2] = pts[4];
+              aNewPts[3] = pts[10];
+              aNewPts[4] = pts[5];
+              aNewPts[5] = pts[14];
+              aNewPts[6] = pts[2];
+              aNewPts[7] = pts[7];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
               outputCD->CopyData(cd,cellId,newCellId);
 
               //---------------------------------------------------------------
               //Face 5
               aNewPts[0] = pts[0];
-             aNewPts[1] = pts[12];
-             aNewPts[2] = pts[3];
-             aNewPts[3] = pts[9];
-             aNewPts[4] = pts[4];
-             aNewPts[5] = pts[13];
+              aNewPts[1] = pts[12];
+              aNewPts[2] = pts[3];
+              aNewPts[3] = pts[9];
+              aNewPts[4] = pts[4];
+              aNewPts[5] = pts[13];
               aNewPts[6] = pts[1];
               aNewPts[7] = pts[6];
               newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              outputCD->CopyData(cd,cellId,newCellId);
+              break;
+            }
+            case VTK_QUADRATIC_HEXAHEDRON: {
+              aCellType = VTK_POLYGON;
+              numFacePts = 8;
+              
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[0];
+              aNewPts[1] = pts[8];
+              aNewPts[2] = pts[1];
+              aNewPts[3] = pts[17];
+              aNewPts[4] = pts[5];
+              aNewPts[5] = pts[12];
+              aNewPts[6] = pts[4];
+              aNewPts[7] = pts[16];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+              
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[1];
+              aNewPts[1] = pts[9];
+              aNewPts[2] = pts[2];
+              aNewPts[3] = pts[18];
+              aNewPts[4] = pts[6];
+              aNewPts[5] = pts[13];
+              aNewPts[6] = pts[5];
+              aNewPts[7] = pts[17];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
               outputCD->CopyData(cd,cellId,newCellId);
+              
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[2];
+              aNewPts[1] = pts[10];
+              aNewPts[2] = pts[3];
+              aNewPts[3] = pts[19];
+              aNewPts[4] = pts[7];
+              aNewPts[5] = pts[14];
+              aNewPts[6] = pts[6];
+              aNewPts[7] = pts[18];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+              
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[3];
+              aNewPts[1] = pts[11];
+              aNewPts[2] = pts[0];
+              aNewPts[3] = pts[16];
+              aNewPts[4] = pts[4];
+              aNewPts[5] = pts[15];
+              aNewPts[6] = pts[7];
+              aNewPts[7] = pts[19];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+              
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[0];
+              aNewPts[1] = pts[8];
+              aNewPts[2] = pts[1];
+              aNewPts[3] = pts[9];
+              aNewPts[4] = pts[2];
+              aNewPts[5] = pts[10];
+              aNewPts[6] = pts[3];
+              aNewPts[7] = pts[11];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+              
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[4];
+              aNewPts[1] = pts[12];
+              aNewPts[2] = pts[5];
+              aNewPts[3] = pts[13];
+              aNewPts[4] = pts[6];
+              aNewPts[5] = pts[14];
+              aNewPts[6] = pts[7];
+              aNewPts[7] = pts[15];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+              
               break;
             }
-           case VTK_QUADRATIC_HEXAHEDRON: {
-             aCellType = VTK_POLYGON;
-             numFacePts = 8;
-             
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[0];
-             aNewPts[1] = pts[8];
-             aNewPts[2] = pts[1];
-             aNewPts[3] = pts[17];
-             aNewPts[4] = pts[5];
-             aNewPts[5] = pts[12];
-             aNewPts[6] = pts[4];
-             aNewPts[7] = pts[16];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-             
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[1];
-             aNewPts[1] = pts[9];
-             aNewPts[2] = pts[2];
-             aNewPts[3] = pts[18];
-             aNewPts[4] = pts[6];
-             aNewPts[5] = pts[13];
-             aNewPts[6] = pts[5];
-             aNewPts[7] = pts[17];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-             
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[2];
-             aNewPts[1] = pts[10];
-             aNewPts[2] = pts[3];
-             aNewPts[3] = pts[19];
-             aNewPts[4] = pts[7];
-             aNewPts[5] = pts[14];
-             aNewPts[6] = pts[6];
-             aNewPts[7] = pts[18];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-             
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[3];
-             aNewPts[1] = pts[11];
-             aNewPts[2] = pts[0];
-             aNewPts[3] = pts[16];
-             aNewPts[4] = pts[4];
-             aNewPts[5] = pts[15];
-             aNewPts[6] = pts[7];
-             aNewPts[7] = pts[19];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-             
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[0];
-             aNewPts[1] = pts[8];
-             aNewPts[2] = pts[1];
-             aNewPts[3] = pts[9];
-             aNewPts[4] = pts[2];
-             aNewPts[5] = pts[10];
-             aNewPts[6] = pts[3];
-             aNewPts[7] = pts[11];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-             
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[4];
-             aNewPts[1] = pts[12];
-             aNewPts[2] = pts[5];
-             aNewPts[3] = pts[13];
-             aNewPts[4] = pts[6];
-             aNewPts[5] = pts[14];
-             aNewPts[6] = pts[7];
-             aNewPts[7] = pts[15];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-             
-             break;
-           }
-           case VTK_QUADRATIC_PYRAMID: {
-             aCellType = VTK_POLYGON;
-             numFacePts = 6;
-             
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[0];
-             aNewPts[1] = pts[8];
-             aNewPts[2] = pts[3];
-             aNewPts[3] = pts[12];
-             aNewPts[4] = pts[4];
-             aNewPts[5] = pts[9];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[0];
-             aNewPts[1] = pts[9];
-             aNewPts[2] = pts[4];
-             aNewPts[3] = pts[10];
-             aNewPts[4] = pts[1];
-             aNewPts[5] = pts[5];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[1];
-             aNewPts[1] = pts[10];
-             aNewPts[2] = pts[4];
-             aNewPts[3] = pts[11];
-             aNewPts[4] = pts[2];
-             aNewPts[5] = pts[6];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             //---------------------------------------------------------------
-             aNewPts[0] = pts[2];
-             aNewPts[1] = pts[11];
-             aNewPts[2] = pts[4];
-             aNewPts[3] = pts[12];
-             aNewPts[4] = pts[3];
-             aNewPts[5] = pts[7];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             //---------------------------------------------------------------
+            case VTK_QUADRATIC_PYRAMID: {
+              aCellType = VTK_POLYGON;
+              numFacePts = 6;
+              
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[0];
+              aNewPts[1] = pts[8];
+              aNewPts[2] = pts[3];
+              aNewPts[3] = pts[12];
+              aNewPts[4] = pts[4];
+              aNewPts[5] = pts[9];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[0];
+              aNewPts[1] = pts[9];
+              aNewPts[2] = pts[4];
+              aNewPts[3] = pts[10];
+              aNewPts[4] = pts[1];
+              aNewPts[5] = pts[5];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[1];
+              aNewPts[1] = pts[10];
+              aNewPts[2] = pts[4];
+              aNewPts[3] = pts[11];
+              aNewPts[4] = pts[2];
+              aNewPts[5] = pts[6];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              //---------------------------------------------------------------
+              aNewPts[0] = pts[2];
+              aNewPts[1] = pts[11];
+              aNewPts[2] = pts[4];
+              aNewPts[3] = pts[12];
+              aNewPts[4] = pts[3];
+              aNewPts[5] = pts[7];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              //---------------------------------------------------------------
               numFacePts = 8;
-             aNewPts[0] = pts[0];
-             aNewPts[1] = pts[5];
-             aNewPts[2] = pts[1];
-             aNewPts[3] = pts[6];
-             aNewPts[4] = pts[2];
-             aNewPts[5] = pts[7];
-             aNewPts[6] = pts[3];
-             aNewPts[7] = pts[8];
-             
-             newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
-             if(myStoreMapping)
-               myVTK2ObjIds.push_back(cellId);
-             
-             outputCD->CopyData(cd,cellId,newCellId);
-
-             break;
-           }}
-         }
-       } //switch
+              aNewPts[0] = pts[0];
+              aNewPts[1] = pts[5];
+              aNewPts[2] = pts[1];
+              aNewPts[3] = pts[6];
+              aNewPts[4] = pts[2];
+              aNewPts[5] = pts[7];
+              aNewPts[6] = pts[3];
+              aNewPts[7] = pts[8];
+              
+              newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
+              if(myStoreMapping)
+                myVTK2ObjIds.push_back(cellId);
+              
+              outputCD->CopyData(cd,cellId,newCellId);
+
+              break;
+            }}
+          }
+        } //switch
       } //if visible
     } //for all cells
     
@@ -1168,15 +1168,15 @@ void VTKViewer_GeometryFilter::BuildArcedPolygon(vtkIdType cellId, vtkUnstructur
       aNewPts[2] = output->GetPoints()->InsertNextPoint(coords->GetPoint(i+2));
 
       if(outputScalars) {
-       outputScalars->InsertNextTuple1(aPntId2ScalarValue[pts->GetId(i)]);
-       outputScalars->InsertNextTuple1(aPntId2ScalarValue[pts->GetId(i+1)]);
-       outputScalars->InsertNextTuple1(aPntId2ScalarValue[pts->GetId(i+2)]);
+        outputScalars->InsertNextTuple1(aPntId2ScalarValue[pts->GetId(i)]);
+        outputScalars->InsertNextTuple1(aPntId2ScalarValue[pts->GetId(i+1)]);
+        outputScalars->InsertNextTuple1(aPntId2ScalarValue[pts->GetId(i+2)]);
       }
 
       aTriangleId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
 
       if(myStoreMapping)
-       myVTK2ObjIds.push_back(cellId);
+        myVTK2ObjIds.push_back(cellId);
       outputCD->CopyData(cd,cellId,aTriangleId);          
     }
     pts->Delete();
@@ -1188,7 +1188,7 @@ void VTKViewer_GeometryFilter::BuildArcedPolygon(vtkIdType cellId, vtkUnstructur
     aNbPoints = MergevtkPoints(aCollection, aScalarCollection, output->GetPoints(), aPntId2ScalarValue, aNewPoints);
     if(outputScalars)
       for(vtkIdType i = 0; i < aNbPoints; i++)
-       outputScalars->InsertNextTuple1(aPntId2ScalarValue[aNewPoints[i]]);
+        outputScalars->InsertNextTuple1(aPntId2ScalarValue[aNewPoints[i]]);
     newCellId = output->InsertNextCell(aCellType,aNbPoints,aNewPoints);
     outputCD->CopyData(cd,cellId,newCellId);
 
index e69a47edf5092b0bf2fbcbf6685408be5475f217..6a11d6eda760125504d02622d27a515d4e3725d5 100644 (file)
@@ -68,12 +68,12 @@ static int GetEdgeId(vtkPicker *thePicker, SALOME_Actor *theActor, int theObjId)
     float aMinDist = 1000000.0, aDist = 0;
     for (int i = 0, iEnd = aPickedCell->GetNumberOfEdges(); i < iEnd; i++){
       if(vtkLine* aLine = vtkLine::SafeDownCast(aPickedCell->GetEdge(i))){
-       int subId;  float pcoords[3], closestPoint[3], weights[3];
-       aLine->EvaluatePosition(aPickPosition,closestPoint,subId,pcoords,aDist,weights);
-       if (aDist < aMinDist) {
-         aMinDist = aDist;
-         anEdgeId = i;
-       }
+        int subId;  float pcoords[3], closestPoint[3], weights[3];
+        aLine->EvaluatePosition(aPickPosition,closestPoint,subId,pcoords,aDist,weights);
+        if (aDist < aMinDist) {
+          aMinDist = aDist;
+          anEdgeId = i;
+        }
       }
     }
   }
@@ -120,7 +120,7 @@ VTKViewer_InteractorStyle::~VTKViewer_InteractorStyle()
  *\param theWidth - width..
  */
 void VTKViewer_InteractorStyle::setPreselectionProp(const double& theRed, const double& theGreen, 
-                                                         const double& theBlue, const int& theWidth) 
+                                                          const double& theBlue, const int& theWidth) 
 {
   if ( myPreSelectionActor->GetProperty() == 0 )
     return;
@@ -235,9 +235,9 @@ void VTKViewer_InteractorStyle::SpinXY(int x, int y, int oldX, int oldY)
     }
 
   double newAngle = atan2((double)(y - this->CurrentRenderer->GetCenter()[1]),
-                         (double)(x - this->CurrentRenderer->GetCenter()[0]));
+                          (double)(x - this->CurrentRenderer->GetCenter()[0]));
   double oldAngle = atan2((double)(oldY -this->CurrentRenderer->GetCenter()[1]),
-                         (double)(oldX - this->CurrentRenderer->GetCenter()[0]));
+                          (double)(oldX - this->CurrentRenderer->GetCenter()[0]));
   
   newAngle *= this->RadianToDegree;
   oldAngle *= this->RadianToDegree;
@@ -258,8 +258,8 @@ void VTKViewer_InteractorStyle::SpinXY(int x, int y, int oldX, int oldY)
  *\param y - y coordinate
  */
 void VTKViewer_InteractorStyle::OnMouseMove(int vtkNotUsed(ctrl), 
-                                                 int shift,
-                                                 int x, int y) 
+                                                  int shift,
+                                                  int x, int y) 
 {
   myShiftState = shift;
   if (State != VTK_INTERACTOR_STYLE_CAMERA_NONE)
@@ -276,7 +276,7 @@ void VTKViewer_InteractorStyle::OnMouseMove(int vtkNotUsed(ctrl),
  *\param y - y coordinate
  */
 void VTKViewer_InteractorStyle::OnLeftButtonDown(int ctrl, int shift, 
-                                                      int x, int y) 
+                                                       int x, int y) 
 {
   if (this->HasObserver(vtkCommand::LeftButtonPressEvent)) {
     this->InvokeEvent(vtkCommand::LeftButtonPressEvent,NULL);
@@ -312,9 +312,9 @@ void VTKViewer_InteractorStyle::OnLeftButtonDown(int ctrl, int shift,
  *\param y - y coordinate (not used)
  */
 void VTKViewer_InteractorStyle::OnLeftButtonUp(int vtkNotUsed(ctrl),
-                                                    int shift, 
-                                                    int vtkNotUsed(x),
-                                                    int vtkNotUsed(y))
+                                                     int shift, 
+                                                     int vtkNotUsed(x),
+                                                     int vtkNotUsed(y))
 {
   myShiftState = shift;
   // finishing current viewer operation
@@ -332,8 +332,8 @@ void VTKViewer_InteractorStyle::OnLeftButtonUp(int vtkNotUsed(ctrl),
  *\param y - y coordinate
  */
 void VTKViewer_InteractorStyle::OnMiddleButtonDown(int ctrl,
-                                                        int shift, 
-                                                        int x, int y) 
+                                                         int shift, 
+                                                         int x, int y) 
 {
   if (this->HasObserver(vtkCommand::MiddleButtonPressEvent)) 
     {
@@ -369,9 +369,9 @@ void VTKViewer_InteractorStyle::OnMiddleButtonDown(int ctrl,
  *\param y - y coordinate (not used)
  */
 void VTKViewer_InteractorStyle::OnMiddleButtonUp(int vtkNotUsed(ctrl),
-                                                      int shift, 
-                                                      int vtkNotUsed(x),
-                                                      int vtkNotUsed(y))
+                                                       int shift, 
+                                                       int vtkNotUsed(x),
+                                                       int vtkNotUsed(y))
 {
   myShiftState = shift;
   // finishing current viewer operation
@@ -389,8 +389,8 @@ void VTKViewer_InteractorStyle::OnMiddleButtonUp(int vtkNotUsed(ctrl),
  *\param y - y coordinate
  */
 void VTKViewer_InteractorStyle::OnRightButtonDown(int ctrl,
-                                                       int shift, 
-                                                       int x, int y) 
+                                                        int shift, 
+                                                        int x, int y) 
 {
   if (this->HasObserver(vtkCommand::RightButtonPressEvent)) 
     {
@@ -425,9 +425,9 @@ void VTKViewer_InteractorStyle::OnRightButtonDown(int ctrl,
  *\param y - y coordinate (not used)
  */
 void VTKViewer_InteractorStyle::OnRightButtonUp(int vtkNotUsed(ctrl),
-                                                     int shift, 
-                                                     int vtkNotUsed(x),
-                                                     int vtkNotUsed(y))
+                                                      int shift, 
+                                                      int vtkNotUsed(x),
+                                                      int vtkNotUsed(y))
 {
   myShiftState = shift;
   // finishing current viewer operation
@@ -863,256 +863,256 @@ void VTKViewer_InteractorStyle::onFinishOperation()
       }
       else {
         if (myPoint == myOtherPoint) {
-         // process point selection
+          // process point selection
           int w, h, x, y;
           m_Interactor->GetSize(w, h);
           x = myPoint.x(); 
           y = h - myPoint.y() - 1;
 
           this->FindPokedRenderer(x, y);
-         m_Interactor->StartPickCallback();
+          m_Interactor->StartPickCallback();
 
-         vtkPicker* aPicker = vtkPicker::SafeDownCast(m_Interactor->GetPicker());
+          vtkPicker* aPicker = vtkPicker::SafeDownCast(m_Interactor->GetPicker());
           aPicker->Pick(x, y, 0.0, this->CurrentRenderer);
     
-         SALOME_Actor* SActor = SALOME_Actor::SafeDownCast(aPicker->GetActor());
+          SALOME_Actor* SActor = SALOME_Actor::SafeDownCast(aPicker->GetActor());
 
           if (vtkCellPicker* picker = vtkCellPicker::SafeDownCast(aPicker)) {
-           int aVtkId = picker->GetCellId();
-           if ( aVtkId >= 0 && SActor && SActor->hasIO() && IsValid( SActor, aVtkId ) ) {
-             int anObjId = SActor->GetElemObjId(aVtkId);
-             if(anObjId >= 0){
-               Handle(SALOME_InteractiveObject) IO = SActor->getIO();
-               if(aSelectionMode != EdgeOfCellSelection) {
-                 if(CheckDimensionId(aSelectionMode,SActor,anObjId)){
-                   if (IsSelected(IO,aSel)) {
-                     // This IO is already in the selection
-                     aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
-                   } else {
-                     if (!myShiftState) {
-                       this->HighlightProp( NULL );
-                       aSel->ClearIObjects();
-                     }
-                     aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
-                     aSel->AddIObject( IO, false );
-                   }
-                 }
-               }else{
-                 if (!myShiftState) {
-                   this->HighlightProp( NULL );
-                   aSel->ClearIObjects();
-                 }
-                 int anEdgeId = GetEdgeId(picker,SActor,anObjId);
-                 if (anEdgeId >= 0) {
-                   aSel->AddOrRemoveIndex( IO, anObjId, true, false);
-                   aSel->AddOrRemoveIndex( IO, -anEdgeId-1, true, true );
-                   aSel->AddIObject( IO, false );
-                 } 
-               }
-             }
-           } else {
-             this->HighlightProp( NULL );
-             aSel->ClearIObjects();
-           }
+            int aVtkId = picker->GetCellId();
+            if ( aVtkId >= 0 && SActor && SActor->hasIO() && IsValid( SActor, aVtkId ) ) {
+              int anObjId = SActor->GetElemObjId(aVtkId);
+              if(anObjId >= 0){
+                Handle(SALOME_InteractiveObject) IO = SActor->getIO();
+                if(aSelectionMode != EdgeOfCellSelection) {
+                  if(CheckDimensionId(aSelectionMode,SActor,anObjId)){
+                    if (IsSelected(IO,aSel)) {
+                      // This IO is already in the selection
+                      aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
+                    } else {
+                      if (!myShiftState) {
+                        this->HighlightProp( NULL );
+                        aSel->ClearIObjects();
+                      }
+                      aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
+                      aSel->AddIObject( IO, false );
+                    }
+                  }
+                }else{
+                  if (!myShiftState) {
+                    this->HighlightProp( NULL );
+                    aSel->ClearIObjects();
+                  }
+                  int anEdgeId = GetEdgeId(picker,SActor,anObjId);
+                  if (anEdgeId >= 0) {
+                    aSel->AddOrRemoveIndex( IO, anObjId, true, false);
+                    aSel->AddOrRemoveIndex( IO, -anEdgeId-1, true, true );
+                    aSel->AddIObject( IO, false );
+                  
+                }
+              }
+            } else {
+              this->HighlightProp( NULL );
+              aSel->ClearIObjects();
+            }
           } else if ( vtkPointPicker* picker = vtkPointPicker::SafeDownCast(aPicker) ) {
-           int aVtkId = picker->GetPointId();
-           if ( aVtkId >= 0 && IsValid( SActor, aVtkId, true ) ) {
-             if ( SActor && SActor->hasIO() ) {
-               int anObjId = SActor->GetNodeObjId(aVtkId);
-               if(anObjId >= 0){
-                 Handle(SALOME_InteractiveObject) IO = SActor->getIO();
-                 if(IsSelected(IO,aSel)) {
-                   // This IO is already in the selection
-                   aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
-                 } else {
-                   if(!myShiftState) {
-                     this->HighlightProp( NULL );
-                     aSel->ClearIObjects();
-                   }
-                   aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
-                   aSel->AddIObject( IO, false );
-                 }
-               }
-             }
-           } else {
-             this->HighlightProp( NULL );
-             aSel->ClearIObjects();
-           } 
-         } else {
-           if ( SActor && SActor->hasIO() ) {
-             this->PropPicked++;
-             Handle(SALOME_InteractiveObject) IO = SActor->getIO();
-             if(IsSelected(IO,aSel)) {
-               // This IO is already in the selection
-               if(myShiftState) {
-                 aSel->RemoveIObject(IO);
-               }
-             }
-             else {
-               if(!myShiftState) {
-                 this->HighlightProp( NULL );
-                 aSel->ClearIObjects();
-               }
-               aSel->AddIObject( IO, false );
-             }
-           }else{
-             // No selection clear all
-             this->PropPicked = 0;
-             this->HighlightProp( NULL );
-             aSel->ClearIObjects();
-           }
-         }
-         m_Interactor->EndPickCallback();
+            int aVtkId = picker->GetPointId();
+            if ( aVtkId >= 0 && IsValid( SActor, aVtkId, true ) ) {
+              if ( SActor && SActor->hasIO() ) {
+                int anObjId = SActor->GetNodeObjId(aVtkId);
+                if(anObjId >= 0){
+                  Handle(SALOME_InteractiveObject) IO = SActor->getIO();
+                  if(IsSelected(IO,aSel)) {
+                    // This IO is already in the selection
+                    aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
+                  } else {
+                    if(!myShiftState) {
+                      this->HighlightProp( NULL );
+                      aSel->ClearIObjects();
+                    }
+                    aSel->AddOrRemoveIndex( IO, anObjId, myShiftState, false );
+                    aSel->AddIObject( IO, false );
+                  }
+                }
+              }
+            } else {
+              this->HighlightProp( NULL );
+              aSel->ClearIObjects();
+            
+          } else {
+            if ( SActor && SActor->hasIO() ) {
+              this->PropPicked++;
+              Handle(SALOME_InteractiveObject) IO = SActor->getIO();
+              if(IsSelected(IO,aSel)) {
+                // This IO is already in the selection
+                if(myShiftState) {
+                  aSel->RemoveIObject(IO);
+                }
+              }
+              else {
+                if(!myShiftState) {
+                  this->HighlightProp( NULL );
+                  aSel->ClearIObjects();
+                }
+                aSel->AddIObject( IO, false );
+              }
+            }else{
+              // No selection clear all
+              this->PropPicked = 0;
+              this->HighlightProp( NULL );
+              aSel->ClearIObjects();
+            }
+          }
+          m_Interactor->EndPickCallback();
         } else {
           //processing rectangle selection
-         QString aComponentDataType = SUIT_Application::getDesktop()->getComponentDataType();
-         if(aSelActiveCompOnly && aComponentDataType.isEmpty()) return;
-         m_Interactor->StartPickCallback();
-
-         if (!myShiftState) {
-           this->PropPicked = 0;
-           this->HighlightProp( NULL );
-           aSel->ClearIObjects();
-         }
-
-         // Compute bounds
-         //      vtkCamera *cam = this->CurrentRenderer->GetActiveCamera();
-         QRect rect(myPoint, myOtherPoint);
-         rect = rect.normalize();
-         int w, h;
-         m_Interactor->GetSize(w, h);
-         int x1, y1, x2, y2;
-         x1 = rect.left(); 
-         y1 = h - rect.top() - 1;
-         x2 = rect.right(); 
-         y2 = h - rect.bottom() - 1;
-
-         switch (aSelectionMode) {
-         case NodeSelection: {
-           if ( vtkPointPicker* aPointPicker = vtkPointPicker::SafeDownCast(m_Interactor->GetPicker()) ) {
-             vtkActorCollection* aListActors = this->CurrentRenderer->GetActors();
-             aListActors->InitTraversal();
-             while (vtkActor* aActor = aListActors->GetNextActor()) {
-               if (!aActor->GetVisibility()) 
-                 continue;
-               if(SALOME_Actor* SActor = SALOME_Actor::SafeDownCast(aActor)) {
-                 if (SActor->hasIO()) {
-                   Handle(SALOME_InteractiveObject) IO = SActor->getIO();
-                   if (IO.IsNull()) 
-                     continue;
-                   if (aSelActiveCompOnly && aComponentDataType != IO->getComponentDataType())
-                     continue;
-                   if (vtkDataSet* aDataSet = SActor->GetInput()) {
-                     SALOME_Selection::TContainerOfId anIndices;
-                     for(int i = 0; i < aDataSet->GetNumberOfPoints(); i++) {
-                       float aPoint[3];
-                       aDataSet->GetPoint(i,aPoint);
-                       if (IsInRect(aPoint,x1,y1,x2,y2)){
-                         float aDisp[3];
-                         ComputeWorldToDisplay(aPoint[0],aPoint[1],aPoint[2],aDisp);
-                         if(aPointPicker->Pick(aDisp[0],aDisp[1],0.0,CurrentRenderer)){
-                           if(vtkActorCollection *anActorCollection = aPointPicker->GetActors()){
-                             if(anActorCollection->IsItemPresent(SActor)){
-                               float aPickedPoint[3];
-                               aPointPicker->GetMapperPosition(aPickedPoint);
-                               vtkIdType aVtkId = aDataSet->FindPoint(aPickedPoint);
-                               if ( aVtkId >= 0 && IsValid( SActor, aVtkId, true ) ){
-                                 int anObjId = SActor->GetNodeObjId(aVtkId);
-                                 anIndices.insert(anObjId);
-                               }
-                             }
-                           }
-                         }
-                       }
-                     }
-                     if (!anIndices.empty()) {
-                       aSel->AddOrRemoveIndex(IO, anIndices, true, false);
-                       aSel->AddIObject(IO, false);
-                       anIndices.clear();
-                     }else{
-                       aSel->RemoveIObject(IO, false);
-                     }
-                   }
-                 }
-               }
-             }
-           }
-           break;
-         }
-         case CellSelection:
-         case EdgeOfCellSelection:
-         case EdgeSelection:
-         case FaceSelection:
-         case VolumeSelection: 
-           {
-             vtkSmartPointer<VTKViewer_CellRectPicker> picker = VTKViewer_CellRectPicker::New();
-             picker->SetTolerance(0.001);
-             picker->Pick(x1, y1, 0.0, x2, y2, 0.0, this->CurrentRenderer);
-             
-             vtkActorCollection* aListActors = picker->GetActors();
-             aListActors->InitTraversal();
-             while(vtkActor* aActor = aListActors->GetNextActor()) {
-               if (SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(aActor)) {
-                 if (aSActor->hasIO()) {
-                   Handle(SALOME_InteractiveObject) aIO = aSActor->getIO();
-                   if (aSelActiveCompOnly && aComponentDataType != aIO->getComponentDataType())
-                     continue;
-                   VTKViewer_CellDataSet cellList = picker->GetCellData(aActor);
-                   if ( !cellList.empty() ) {
-                     SALOME_Selection::TContainerOfId anIndexes;
-                     VTKViewer_CellDataSet::iterator it;
-                     for ( it = cellList.begin(); it != cellList.end(); ++it ) {
-                       int aCellId = (*it).cellId;
-                       
-                       if ( !IsValid( aSActor, aCellId ) )
-                         continue;
-                       
-                       int anObjId = aSActor->GetElemObjId(aCellId);
-                       if (anObjId != -1){
-                         if ( CheckDimensionId(aSelectionMode,aSActor,anObjId) ) {
-                           anIndexes.insert(anObjId);
-                         }
-                       }
-                     }
-                     aSel->AddOrRemoveIndex(aIO, anIndexes, true, false);
-                     aSel->AddIObject(aIO, false);
-                   }
-                 }
-               }
-             }
-           }
-           break;          
-         case ActorSelection: // objects selection
-           {
-             vtkSmartPointer<VTKViewer_RectPicker> picker = VTKViewer_RectPicker::New();
-             picker->SetTolerance(0.001);
-             picker->Pick(x1, y1, 0.0, x2, y2, 0.0, this->CurrentRenderer);
-
-             vtkActorCollection* aListActors = picker->GetActors();
-             SALOME_ListIO aListIO;
-             aListActors->InitTraversal();
-             while(vtkActor* aActor = aListActors->GetNextActor()) {
-               if (SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(aActor)) {
-                 if (aSActor->hasIO()) {
-                   Handle(SALOME_InteractiveObject) aIO = aSActor->getIO();
-                   if (!IsStored(aIO,aListIO))
-                     aListIO.Append(aIO);
-                 }
-               }
-             }
-             if (!aListIO.IsEmpty()) {
-               SALOME_ListIteratorOfListIO It(aListIO);
-               for(;It.More();It.Next()) {
-                 Handle(SALOME_InteractiveObject) IOS = It.Value();
-                 this->PropPicked++;
-                 aSel->AddIObject( IOS, false );
-               }
-             }
-           } // end case 4
-         } //end switch
-         m_Interactor->EndPickCallback();
-       }
-       aActiveStudy->update3dViewers();
+          QString aComponentDataType = SUIT_Application::getDesktop()->getComponentDataType();
+          if(aSelActiveCompOnly && aComponentDataType.isEmpty()) return;
+          m_Interactor->StartPickCallback();
+
+          if (!myShiftState) {
+            this->PropPicked = 0;
+            this->HighlightProp( NULL );
+            aSel->ClearIObjects();
+          }
+
+          // Compute bounds
+          //      vtkCamera *cam = this->CurrentRenderer->GetActiveCamera();
+          QRect rect(myPoint, myOtherPoint);
+          rect = rect.normalize();
+          int w, h;
+          m_Interactor->GetSize(w, h);
+          int x1, y1, x2, y2;
+          x1 = rect.left(); 
+          y1 = h - rect.top() - 1;
+          x2 = rect.right(); 
+          y2 = h - rect.bottom() - 1;
+
+          switch (aSelectionMode) {
+          case NodeSelection: {
+            if ( vtkPointPicker* aPointPicker = vtkPointPicker::SafeDownCast(m_Interactor->GetPicker()) ) {
+              vtkActorCollection* aListActors = this->CurrentRenderer->GetActors();
+              aListActors->InitTraversal();
+              while (vtkActor* aActor = aListActors->GetNextActor()) {
+                if (!aActor->GetVisibility()) 
+                  continue;
+                if(SALOME_Actor* SActor = SALOME_Actor::SafeDownCast(aActor)) {
+                  if (SActor->hasIO()) {
+                    Handle(SALOME_InteractiveObject) IO = SActor->getIO();
+                    if (IO.IsNull()) 
+                      continue;
+                    if (aSelActiveCompOnly && aComponentDataType != IO->getComponentDataType())
+                      continue;
+                    if (vtkDataSet* aDataSet = SActor->GetInput()) {
+                      SALOME_Selection::TContainerOfId anIndices;
+                      for(int i = 0; i < aDataSet->GetNumberOfPoints(); i++) {
+                        float aPoint[3];
+                        aDataSet->GetPoint(i,aPoint);
+                        if (IsInRect(aPoint,x1,y1,x2,y2)){
+                          float aDisp[3];
+                          ComputeWorldToDisplay(aPoint[0],aPoint[1],aPoint[2],aDisp);
+                          if(aPointPicker->Pick(aDisp[0],aDisp[1],0.0,CurrentRenderer)){
+                            if(vtkActorCollection *anActorCollection = aPointPicker->GetActors()){
+                              if(anActorCollection->IsItemPresent(SActor)){
+                                float aPickedPoint[3];
+                                aPointPicker->GetMapperPosition(aPickedPoint);
+                                vtkIdType aVtkId = aDataSet->FindPoint(aPickedPoint);
+                                if ( aVtkId >= 0 && IsValid( SActor, aVtkId, true ) ){
+                                  int anObjId = SActor->GetNodeObjId(aVtkId);
+                                  anIndices.insert(anObjId);
+                                }
+                              }
+                            }
+                          }
+                        }
+                      }
+                      if (!anIndices.empty()) {
+                        aSel->AddOrRemoveIndex(IO, anIndices, true, false);
+                        aSel->AddIObject(IO, false);
+                        anIndices.clear();
+                      }else{
+                        aSel->RemoveIObject(IO, false);
+                      }
+                    }
+                  }
+                }
+              }
+            }
+            break;
+          }
+          case CellSelection:
+          case EdgeOfCellSelection:
+          case EdgeSelection:
+          case FaceSelection:
+          case VolumeSelection: 
+            {
+              vtkSmartPointer<VTKViewer_CellRectPicker> picker = VTKViewer_CellRectPicker::New();
+              picker->SetTolerance(0.001);
+              picker->Pick(x1, y1, 0.0, x2, y2, 0.0, this->CurrentRenderer);
+              
+              vtkActorCollection* aListActors = picker->GetActors();
+              aListActors->InitTraversal();
+              while(vtkActor* aActor = aListActors->GetNextActor()) {
+                if (SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(aActor)) {
+                  if (aSActor->hasIO()) {
+                    Handle(SALOME_InteractiveObject) aIO = aSActor->getIO();
+                    if (aSelActiveCompOnly && aComponentDataType != aIO->getComponentDataType())
+                      continue;
+                    VTKViewer_CellDataSet cellList = picker->GetCellData(aActor);
+                    if ( !cellList.empty() ) {
+                      SALOME_Selection::TContainerOfId anIndexes;
+                      VTKViewer_CellDataSet::iterator it;
+                      for ( it = cellList.begin(); it != cellList.end(); ++it ) {
+                        int aCellId = (*it).cellId;
+                        
+                        if ( !IsValid( aSActor, aCellId ) )
+                          continue;
+                        
+                        int anObjId = aSActor->GetElemObjId(aCellId);
+                        if (anObjId != -1){
+                          if ( CheckDimensionId(aSelectionMode,aSActor,anObjId) ) {
+                            anIndexes.insert(anObjId);
+                          }
+                        }
+                      }
+                      aSel->AddOrRemoveIndex(aIO, anIndexes, true, false);
+                      aSel->AddIObject(aIO, false);
+                    }
+                  }
+                }
+              }
+            }
+            break;          
+          case ActorSelection: // objects selection
+            {
+              vtkSmartPointer<VTKViewer_RectPicker> picker = VTKViewer_RectPicker::New();
+              picker->SetTolerance(0.001);
+              picker->Pick(x1, y1, 0.0, x2, y2, 0.0, this->CurrentRenderer);
+
+              vtkActorCollection* aListActors = picker->GetActors();
+              SALOME_ListIO aListIO;
+              aListActors->InitTraversal();
+              while(vtkActor* aActor = aListActors->GetNextActor()) {
+                if (SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(aActor)) {
+                  if (aSActor->hasIO()) {
+                    Handle(SALOME_InteractiveObject) aIO = aSActor->getIO();
+                    if (!IsStored(aIO,aListIO))
+                      aListIO.Append(aIO);
+                  }
+                }
+              }
+              if (!aListIO.IsEmpty()) {
+                SALOME_ListIteratorOfListIO It(aListIO);
+                for(;It.More();It.Next()) {
+                  Handle(SALOME_InteractiveObject) IOS = It.Value();
+                  this->PropPicked++;
+                  aSel->AddIObject( IOS, false );
+                }
+              }
+            } // end case 4
+          } //end switch
+          m_Interactor->EndPickCallback();
+        }
+        aActiveStudy->update3dViewers();
       } 
     } 
     break;
@@ -1230,36 +1230,36 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) {
     if ( aVtkId >= 0 ) {
       int anObjId = SActor->GetElemObjId(aVtkId);
       if ( SActor && SActor->hasIO() && IsValid( SActor, aVtkId ) ) {
-       bool anIsSameObjId = (mySelectedActor == SActor && myElemId == anObjId);
-       bool aResult = anIsSameObjId;
-       if(!anIsSameObjId) {
-         if(aSelectionMode != EdgeOfCellSelection) {
-           aResult = CheckDimensionId(aSelectionMode,SActor,anObjId);
-           if(aResult){
-             mySelectedActor = SActor;
-             myElemId = anObjId;
-             m_Interactor->setCellData(anObjId,SActor,myPreSelectionActor);
-           }
-         }
-       }
-       if(aSelectionMode == EdgeOfCellSelection){
-         int anEdgeId = GetEdgeId(picker,SActor,anObjId);
-         bool anIsSameEdgeId = (myEdgeId != anEdgeId) && anIsSameObjId;
-         aResult = anIsSameEdgeId;
-         if(!anIsSameEdgeId) {
-           aResult = (anEdgeId >= 0);
-           if (aResult) {
-             mySelectedActor = SActor;
-             myEdgeId = anEdgeId;
-             myElemId = anObjId;
-             m_Interactor->setEdgeData(anObjId,SActor,-anEdgeId-1,myPreSelectionActor);
-           } 
-         }
-       }
-       if(aResult) {
-         myPreSelectionActor->GetProperty()->SetRepresentationToSurface();
-         myPreSelectionActor->SetVisibility(true);
-       }
+        bool anIsSameObjId = (mySelectedActor == SActor && myElemId == anObjId);
+        bool aResult = anIsSameObjId;
+        if(!anIsSameObjId) {
+          if(aSelectionMode != EdgeOfCellSelection) {
+            aResult = CheckDimensionId(aSelectionMode,SActor,anObjId);
+            if(aResult){
+              mySelectedActor = SActor;
+              myElemId = anObjId;
+              m_Interactor->setCellData(anObjId,SActor,myPreSelectionActor);
+            }
+          }
+        }
+        if(aSelectionMode == EdgeOfCellSelection){
+          int anEdgeId = GetEdgeId(picker,SActor,anObjId);
+          bool anIsSameEdgeId = (myEdgeId != anEdgeId) && anIsSameObjId;
+          aResult = anIsSameEdgeId;
+          if(!anIsSameEdgeId) {
+            aResult = (anEdgeId >= 0);
+            if (aResult) {
+              mySelectedActor = SActor;
+              myEdgeId = anEdgeId;
+              myElemId = anObjId;
+              m_Interactor->setEdgeData(anObjId,SActor,-anEdgeId-1,myPreSelectionActor);
+            
+          }
+        }
+        if(aResult) {
+          myPreSelectionActor->GetProperty()->SetRepresentationToSurface();
+          myPreSelectionActor->SetVisibility(true);
+        }
       }
     }
   }
@@ -1267,44 +1267,44 @@ void VTKViewer_InteractorStyle::onCursorMove(QPoint mousePos) {
     int aVtkId = picker->GetPointId();
     if ( aVtkId >= 0 && IsValid( SActor, aVtkId, true ) ) {
       if ( SActor && SActor->hasIO() ) {
-       int anObjId = SActor->GetNodeObjId(aVtkId);
-       bool anIsSameObjId = (mySelectedActor == SActor && myNodeId == anObjId);
-       if(!anIsSameObjId) {
-         mySelectedActor = SActor;
-         myNodeId = anObjId;
-         m_Interactor->setPointData(anObjId,SActor,myPreSelectionActor);
-       }
-       myPreSelectionActor->GetProperty()->SetRepresentationToSurface();
-       myPreSelectionActor->SetVisibility(true);
+        int anObjId = SActor->GetNodeObjId(aVtkId);
+        bool anIsSameObjId = (mySelectedActor == SActor && myNodeId == anObjId);
+        if(!anIsSameObjId) {
+          mySelectedActor = SActor;
+          myNodeId = anObjId;
+          m_Interactor->setPointData(anObjId,SActor,myPreSelectionActor);
+        }
+        myPreSelectionActor->GetProperty()->SetRepresentationToSurface();
+        myPreSelectionActor->SetVisibility(true);
       }
     }
   }
   else if ( vtkPicker::SafeDownCast(aPicker) ) {
     if ( SActor ) {
       if ( myPreViewActor != SActor ) {
-       if ( myPreViewActor != NULL ) {
-         myPreViewActor->SetPreSelected( false );
-       }
-       myPreViewActor = SActor;
-             
-       if ( SActor->hasIO() ) {
-         Handle( SALOME_InteractiveObject) IO = SActor->getIO();
-         if ( !IsSelected(IO,Sel) ) {
+        if ( myPreViewActor != NULL ) {
+          myPreViewActor->SetPreSelected( false );
+        }
+        myPreViewActor = SActor;
+              
+        if ( SActor->hasIO() ) {
+          Handle( SALOME_InteractiveObject) IO = SActor->getIO();
+          if ( !IsSelected(IO,Sel) ) {
             // Find All actors with same IO
-           vtkActorCollection* theActors = this->CurrentRenderer->GetActors();
-           theActors->InitTraversal();
-           while( vtkActor *ac = theActors->GetNextActor() ) {
-             if ( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac ) ) {
-               if ( anActor->hasIO() ) {
-                 Handle(SALOME_InteractiveObject) IOS = anActor->getIO();
-                 if(IO->isSame(IOS)) {
-                   anActor->SetPreSelected( true );
-                 }
-               }
-             }
-           }
-         }
-       }
+            vtkActorCollection* theActors = this->CurrentRenderer->GetActors();
+            theActors->InitTraversal();
+            while( vtkActor *ac = theActors->GetNextActor() ) {
+              if ( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( ac ) ) {
+                if ( anActor->hasIO() ) {
+                  Handle(SALOME_InteractiveObject) IOS = anActor->getIO();
+                  if(IO->isSame(IOS)) {
+                    anActor->SetPreSelected( true );
+                  }
+                }
+              }
+            }
+          }
+        }
       }
     } else {
       myPreViewActor = NULL;
@@ -1359,13 +1359,13 @@ void VTKViewer_InteractorStyle::TranslateView(int toX, int toY, int fromX, int f
   cam->GetFocalPoint(viewFocus);
 
   this->ComputeWorldToDisplay(viewFocus[0], viewFocus[1],
-                             viewFocus[2], viewFocus);
+                              viewFocus[2], viewFocus);
   focalDepth = viewFocus[2];
 
   this->ComputeDisplayToWorld(vtkFloatingPointType(toX), vtkFloatingPointType(toY),
-                             focalDepth, newPickPoint);
+                              focalDepth, newPickPoint);
   this->ComputeDisplayToWorld(vtkFloatingPointType(fromX),vtkFloatingPointType(fromY),
-                             focalDepth, oldPickPoint);
+                              focalDepth, oldPickPoint);
   
   // camera motion is reversed
   motionVector[0] = oldPickPoint[0] - newPickPoint[0];
@@ -1375,18 +1375,18 @@ void VTKViewer_InteractorStyle::TranslateView(int toX, int toY, int fromX, int f
   cam->GetFocalPoint(viewFocus);
   cam->GetPosition(viewPoint);
   cam->SetFocalPoint(motionVector[0] + viewFocus[0],
-                    motionVector[1] + viewFocus[1],
-                    motionVector[2] + viewFocus[2]);
+                     motionVector[1] + viewFocus[1],
+                     motionVector[2] + viewFocus[2]);
   cam->SetPosition(motionVector[0] + viewPoint[0],
-                  motionVector[1] + viewPoint[1],
-                  motionVector[2] + viewPoint[2]);
+                   motionVector[1] + viewPoint[1],
+                   motionVector[2] + viewPoint[2]);
 }
 
 
 /*! Checks: is the given Actor within display coordinates?*/
 bool VTKViewer_InteractorStyle::IsInRect(vtkActor* theActor, 
-                                              const int left, const int top, 
-                                              const int right, const int bottom)
+                                               const int left, const int top, 
+                                               const int right, const int bottom)
 {
   vtkFloatingPointType* aBounds = theActor->GetBounds();
   vtkFloatingPointType aMin[3], aMax[3];
@@ -1409,8 +1409,8 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkActor* theActor,
 
 /*! Checks: is the given Cell within display coordinates?*/
 bool VTKViewer_InteractorStyle::IsInRect(vtkCell* theCell, 
-                                              const int left, const int top, 
-                                              const int right, const int bottom)
+                                               const int left, const int top, 
+                                               const int right, const int bottom)
 {
   vtkFloatingPointType* aBounds = theCell->GetBounds();
   vtkFloatingPointType aMin[3], aMax[3];
@@ -1432,8 +1432,8 @@ bool VTKViewer_InteractorStyle::IsInRect(vtkCell* theCell,
 
 /*!Checks: is given point \a thePoint in rectangle*/
 bool VTKViewer_InteractorStyle::IsInRect(vtkFloatingPointType* thePoint, 
-                                        const int left, const int top, 
-                                        const int right, const int bottom)
+                                         const int left, const int top, 
+                                         const int right, const int bottom)
 {
   vtkFloatingPointType aPnt[3];
   ComputeWorldToDisplay(thePoint[0], thePoint[1], thePoint[2], aPnt);
index a3e36e0976d54ba93f4a7a240225375dd63bfb0f..f7391b19c360c127873b21eb5e4ab2ee00478fb3 100644 (file)
@@ -78,7 +78,7 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt
 
   void setTriedron(VTKViewer_Trihedron* theTrihedron);
   void setPreselectionProp(const double& theRed = 0, const double& theGreen = 1,
-                          const double& theBlue = 1, const int& theWidth = 5);
+                           const double& theBlue = 1, const int& theWidth = 5);
 
   // Generic event bindings must be overridden in subclasses
   void OnMouseMove  (int ctrl, int shift, int x, int y);
@@ -121,14 +121,14 @@ class VTKVIEWER_EXPORT VTKViewer_InteractorStyle : public QObject, public vtkInt
   void Place(const int theX, const int theY);
   void TranslateView(int toX, int toY, int fromX, int fromY);
   bool IsInRect(vtkActor* theActor, 
-               const int left, const int top, 
-               const int right, const int bottom);
+                const int left, const int top, 
+                const int right, const int bottom);
   bool IsInRect(vtkCell* theCell, 
-               const int left, const int top, 
-               const int right, const int bottom);
+                const int left, const int top, 
+                const int right, const int bottom);
   bool IsInRect(vtkFloatingPointType* thePoint, 
-               const int left, const int top, 
-               const int right, const int bottom);
+                const int left, const int top, 
+                const int right, const int bottom);
 
   int State;
   vtkFloatingPointType MotionFactor;
index e3039a3a4eeff294a27ff19d86264b1b1c2f42b2..62ad380d2292f9322486bcbee999310d9a3f058b 100755 (executable)
@@ -150,7 +150,7 @@ void VTKViewer_RenderWindow::onChangeBackgroundColor()
   vtkRenderer * theRenderer = theRenderers->GetNextItem();
   theRenderer->GetBackground(backint);
 
-  QColor selColor = QColorDialog::getColor ( QColor(int(backint[0]*255), int(backint[1]*255), int(backint[2]*255)), NULL );    
+  QColor selColor = QColorDialog::getColor ( QColor(int(backint[0]*255), int(backint[1]*255), int(backint[2]*255)), NULL );     
   if ( selColor.isValid() ) {
     theRenderer->SetBackground( selColor.red()/255., selColor.green()/255., selColor.blue()/255. ); 
     /* VSR : PAL5420 ---------------------------------------------------
index 4bb2dfab73961b67031deeaf0516214753b44481..8e6a7faef31b2f720a7f19a0d5db3397b3b576ad 100755 (executable)
@@ -391,8 +391,8 @@ void VTKViewer_RenderWindowInteractor::LeftButtonPressed(const QMouseEvent *even
     return ;
   }
   myInteractorStyle->OnLeftButtonDown((event->modifiers() & Qt::ControlModifier), 
-                                     (event->modifiers() & Qt::ShiftModifier), 
-                                     event->x(), event->y());
+                                      (event->modifiers() & Qt::ShiftModifier), 
+                                      event->x(), event->y());
 }
 
 /*!Reaction on left button releases.\n
@@ -404,8 +404,8 @@ void VTKViewer_RenderWindowInteractor::LeftButtonReleased(const QMouseEvent *eve
     return ;
   }
   myInteractorStyle->OnLeftButtonUp( (event->modifiers() & Qt::ControlModifier), 
-                                    (event->modifiers() & Qt::ShiftModifier), 
-                                    event->x(), event->y() ) ;
+                                     (event->modifiers() & Qt::ShiftModifier), 
+                                     event->x(), event->y() ) ;
 }
 
 /*!Reaction on middle button pressed.\n
@@ -417,8 +417,8 @@ void VTKViewer_RenderWindowInteractor::MiddleButtonPressed(const QMouseEvent *ev
     return ;
   }
   myInteractorStyle->OnMiddleButtonDown((event->modifiers() & Qt::ControlModifier), 
-                                       (event->modifiers() & Qt::ShiftModifier), 
-                                       event->x(), event->y() ) ;
+                                        (event->modifiers() & Qt::ShiftModifier), 
+                                        event->x(), event->y() ) ;
 }
 
 /*!Reaction on middle button released.\n
@@ -430,8 +430,8 @@ void VTKViewer_RenderWindowInteractor::MiddleButtonReleased(const QMouseEvent *e
     return ;
   }
   myInteractorStyle->OnMiddleButtonUp( (event->modifiers() & Qt::ControlModifier), 
-                                      (event->modifiers() & Qt::ShiftModifier), 
-                                      event->x(), event->y() ) ;
+                                       (event->modifiers() & Qt::ShiftModifier), 
+                                       event->x(), event->y() ) ;
 }
 
 /*!Reaction on right button pressed.\n
@@ -443,8 +443,8 @@ void VTKViewer_RenderWindowInteractor::RightButtonPressed(const QMouseEvent *eve
     return ;
   }
   myInteractorStyle->OnRightButtonDown( (event->modifiers() & Qt::ControlModifier), 
-                                       (event->modifiers() & Qt::ShiftModifier), 
-                                       event->x(), event->y() ) ;
+                                        (event->modifiers() & Qt::ShiftModifier), 
+                                        event->x(), event->y() ) ;
 }
 
 /*!Reaction on right button released.\n
@@ -457,8 +457,8 @@ void VTKViewer_RenderWindowInteractor::RightButtonReleased(const QMouseEvent *ev
   }
   bool isOperation = myInteractorStyle->CurrentState() != VTK_INTERACTOR_STYLE_CAMERA_NONE;
   myInteractorStyle->OnRightButtonUp( (event->modifiers() & Qt::ControlModifier),
-                                     (event->modifiers() & Qt::ShiftModifier),
-                                     event->x(), event->y() );
+                                      (event->modifiers() & Qt::ShiftModifier),
+                                      event->x(), event->y() );
   if ( !isOperation )
   {
     QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
@@ -518,8 +518,8 @@ void VTKViewer_RenderWindowInteractor::ChangeRepresentationToWireframe(vtkActorC
 {
   using namespace VTK;
   ForEach<VTKViewer_Actor>(theCollection,
-                       TSetFunction<VTKViewer_Actor,int>
-                       (&VTKViewer_Actor::setDisplayMode,0));
+                        TSetFunction<VTKViewer_Actor,int>
+                        (&VTKViewer_Actor::setDisplayMode,0));
   emit RenderWindowModified();
 }
 
@@ -530,8 +530,8 @@ void VTKViewer_RenderWindowInteractor::ChangeRepresentationToSurface(vtkActorCol
 {
   using namespace VTK;
   ForEach<VTKViewer_Actor>(theCollection,
-                       TSetFunction<VTKViewer_Actor,int>
-                       (&VTKViewer_Actor::setDisplayMode,1));
+                        TSetFunction<VTKViewer_Actor,int>
+                        (&VTKViewer_Actor::setDisplayMode,1));
   emit RenderWindowModified();
 }
 
@@ -664,8 +664,8 @@ bool VTKViewer_RenderWindowInteractor::unHighlightAll(){
  * \li Emit render window modified, if flag \a update - true.
  */
 bool VTKViewer_RenderWindowInteractor::highlight(const TColStd_IndexedMapOfInteger& theMapIndex,
-                                                VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor,
-                                                TUpdateActor theFun, bool hilight, bool update)
+                                                 VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor,
+                                                 TUpdateActor theFun, bool hilight, bool update)
 {
   if(theMapIndex.Extent() == 0) return false;
 
@@ -687,9 +687,9 @@ bool VTKViewer_RenderWindowInteractor::highlight(const TColStd_IndexedMapOfInteg
 
 /*!Sets actors data.*/
 void VTKViewer_RenderWindowInteractor::setActorData(const TColStd_IndexedMapOfInteger& theMapIndex,
-                                                   VTKViewer_Actor * theMapActor,
-                                                   VTKViewer_Actor * theActor,
-                                                   TUpdateActor theFun)
+                                                    VTKViewer_Actor * theMapActor,
+                                                    VTKViewer_Actor * theActor,
+                                                    TUpdateActor theFun)
 {
   (*theFun)(theMapIndex,theMapActor,theActor);
   vtkFloatingPointType aPos[3];
index 3edf9c8e32b78713b1800e779ca0faa1cb042c76..18d58645ca76f33820a276af4c639b9e98f4b065 100755 (executable)
@@ -104,24 +104,24 @@ public:
   /** @name Selection Management */
   //@{
   bool highlightCell(const TColStd_IndexedMapOfInteger& MapIndex,
-                    VTKViewer_Actor* theMapActor,
-                    bool hilight,
-                    bool update = true );
+                     VTKViewer_Actor* theMapActor,
+                     bool hilight,
+                     bool update = true );
   bool highlightEdge(const TColStd_IndexedMapOfInteger& MapIndex,
-                    VTKViewer_Actor* theMapActor,
-                    bool hilight,
-                    bool update = true );
+                     VTKViewer_Actor* theMapActor,
+                     bool hilight,
+                     bool update = true );
   bool highlightPoint(const TColStd_IndexedMapOfInteger& MapIndex,
-                     VTKViewer_Actor* theMapActor,
-                     bool hilight,
-                     bool update = true );
+                      VTKViewer_Actor* theMapActor,
+                      bool hilight,
+                      bool update = true );
 
   void unHighlightSubSelection();
   bool unHighlightAll();
 
   //void SetSelectionMode(Selection_Mode mode);
   void SetSelectionProp(const double& theRed = 1, const double& theGreen = 1,
-                       const double& theBlue = 0, const int& theWidth = 5);
+                        const double& theBlue = 0, const int& theWidth = 5);
   void SetSelectionTolerance(const double& theTolNodes = 0.025, const double& theTolCell = 0.001);
   //@}
 
@@ -161,19 +161,19 @@ public:
   void setViewWindow( VTKViewer_ViewWindow* theViewWnd );
 
   void setCellData(const int& theIndex,
-                  VTKViewer_Actor* theMapActor,
-                  VTKViewer_Actor* theActor) {}
+                   VTKViewer_Actor* theMapActor,
+                   VTKViewer_Actor* theActor) {}
   void setEdgeData(const int& theCellIndex,
-                  VTKViewer_Actor* theMapActor,
-                  const int& theEdgeIndex,
-                  VTKViewer_Actor* theActor ) {} //NB
+                   VTKViewer_Actor* theMapActor,
+                   const int& theEdgeIndex,
+                   VTKViewer_Actor* theActor ) {} //NB
   void setPointData(const int& theIndex,
-                   VTKViewer_Actor* theMapActor,
-                   VTKViewer_Actor* theActor) {}
+                    VTKViewer_Actor* theMapActor,
+                    VTKViewer_Actor* theActor) {}
 
   typedef void (*TUpdateActor)(const TColStd_IndexedMapOfInteger& theMapIndex,
-                              VTKViewer_Actor* theMapActor,
-                              VTKViewer_Actor* theActor);
+                               VTKViewer_Actor* theMapActor,
+                               VTKViewer_Actor* theActor);
  protected:
 
   VTKViewer_RenderWindowInteractor();
@@ -182,12 +182,12 @@ public:
   VTKViewer_InteractorStyle* myInteractorStyle;
 
   bool highlight(const TColStd_IndexedMapOfInteger& theMapIndex,
-                VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor,
-                TUpdateActor theFun, bool hilight, bool update);
+                 VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor,
+                 TUpdateActor theFun, bool hilight, bool update);
   void setActorData(const TColStd_IndexedMapOfInteger& theMapIndex,
-                   VTKViewer_Actor* theMapActor,
-                   VTKViewer_Actor *theActor,
-                   TUpdateActor theFun);
+                    VTKViewer_Actor* theMapActor,
+                    VTKViewer_Actor *theActor,
+                    TUpdateActor theFun);
 
   /*! Timer used during various mouse events to figure 
    * out mouse movements.
index 0084d939d5d9a7325426460c963f3875053815b1..8abd09202b94affa549123eb10b29f47317f454d 100755 (executable)
@@ -148,7 +148,7 @@ int VTKViewer_ShrinkFilter::RequestData(
       oldId = ptIds->GetId(i);
       newId = newPts->InsertNextPoint(pt);
       if(myStoreMapping)
-       myVTK2ObjIds.push_back(oldId);
+        myVTK2ObjIds.push_back(oldId);
       newPtIds->InsertId(i,newId);
 
       outPD->CopyData(pd, oldId, newId);
index 7b2f92767c6708d488fcd10050e7733c26299911..2385a2309075ddc92427c731b48c360874e9a7bb 100755 (executable)
@@ -61,6 +61,6 @@ int VTKViewer_Transform::IsIdentity(){
   double aScale[3];
   this->GetMatrixScale(aScale);
   return (fabs(aScale[0] - 1.0) < EPS && 
-         fabs(aScale[1] - 1.0) < EPS && 
-         fabs(aScale[2] - 1.0) < EPS);
+          fabs(aScale[1] - 1.0) < EPS && 
+          fabs(aScale[2] - 1.0) < EPS);
 }
index f847ad91bfc33c09e727e21d38f098a4f5315ddb..f2623192517c20640ac876875245dce8d0bea193 100755 (executable)
@@ -78,8 +78,8 @@ void VTKViewer_UnScaledActor::Render(vtkRenderer *theRenderer)
     theRenderer->ViewToWorld(P[0][0],P[0][1],P[0][2]);
     theRenderer->ViewToWorld(P[1][0],P[1][1],P[1][2]);
     vtkFloatingPointType aWorldDiag = sqrt((P[1][0]-P[0][0])*(P[1][0]-P[0][0])+
-                                          (P[1][1]-P[0][1])*(P[1][1]-P[0][1])+
-                                          (P[1][2]-P[0][2])*(P[1][2]-P[0][2]));
+                                           (P[1][1]-P[0][1])*(P[1][1]-P[0][1])+
+                                           (P[1][2]-P[0][2])*(P[1][2]-P[0][2]));
     int* aSize = theRenderer->GetRenderWindow()->GetSize();
     vtkFloatingPointType aWinDiag = sqrt(vtkFloatingPointType(aSize[0]*aSize[0]+aSize[1]*aSize[1]));
     vtkDataSet* aDataSet = GetMapper()->GetInput();
@@ -454,10 +454,10 @@ int VTKViewer_Trihedron::GetVisibleActorCount(vtkRenderer* theRenderer)
     if( prop->GetVisibility())
       if(VTKViewer_Actor* anActor = VTKViewer_Actor::SafeDownCast(prop)) {
         if(!anActor->IsInfinitive()) 
-         aCount++;
+          aCount++;
       }
       else if ( !OwnActor( anActor ) ) {
-       aCount++;
+        aCount++;
       }
         //int aCount = theRenderer->VisibleActorCount();
         //SetVisibility(aVis);
index 3714c74aa5b5f74b7140421e50853682eb8e725f..01e6e4ebeaddecade4fe01d53103946b3f270d22 100755 (executable)
@@ -36,7 +36,7 @@ using namespace std;
 /*!@see vtkRenderer::ResetCamera(vtkFloatingPointType bounds[6]) method*/
 void 
 ResetCamera(vtkRenderer* theRenderer, 
-           int theUsingZeroFocalPoint)
+            int theUsingZeroFocalPoint)
 {  
   if(!theRenderer)
     return;
@@ -60,8 +60,8 @@ ResetCamera(vtkRenderer* theRenderer,
 
     vtkFloatingPointType aWidth = 
       sqrt((aBounds[1]-aBounds[0])*(aBounds[1]-aBounds[0]) +
-          (aBounds[3]-aBounds[2])*(aBounds[3]-aBounds[2]) +
-          (aBounds[5]-aBounds[4])*(aBounds[5]-aBounds[4]));
+           (aBounds[3]-aBounds[2])*(aBounds[3]-aBounds[2]) +
+           (aBounds[5]-aBounds[4])*(aBounds[5]-aBounds[4]));
     
     if(aWidth < MIN_DISTANCE)
       return;
@@ -88,8 +88,8 @@ ResetCamera(vtkRenderer* theRenderer,
     
     // update the camera
     aCamera->SetPosition(aCenter[0]+aDistance*aViewPlaneNormal[0],
-                        aCenter[1]+aDistance*aViewPlaneNormal[1],
-                        aCenter[2]+aDistance*aViewPlaneNormal[2]);
+                         aCenter[1]+aDistance*aViewPlaneNormal[1],
+                         aCenter[2]+aDistance*aViewPlaneNormal[2]);
 
     // find size of the window
     int* aWinSize = theRenderer->GetSize();
@@ -108,7 +108,7 @@ ResetCamera(vtkRenderer* theRenderer,
 /*! Compute the bounds of the visible props*/
 int
 ComputeVisiblePropBounds(vtkRenderer* theRenderer, 
-                        vtkFloatingPointType theBounds[6])
+                         vtkFloatingPointType theBounds[6])
 {
   int aCount = 0;
   
@@ -124,25 +124,25 @@ ComputeVisiblePropBounds(vtkRenderer* theRenderer,
     if(aProp->GetVisibility() && aProp->GetMapper() && vtkMath::AreBoundsInitialized(aProp->GetBounds())){
       if(VTKViewer_Actor* anActor = VTKViewer_Actor::SafeDownCast(aProp))
         if(anActor->IsInfinitive())
-         continue;
-       
+          continue;
+        
       vtkFloatingPointType *aBounds = aProp->GetBounds();
       static vtkFloatingPointType MAX_DISTANCE = 0.9*VTK_LARGE_FLOAT;
       // make sure we haven't got bogus bounds
       if ( aBounds != NULL &&
-          aBounds[0] > -MAX_DISTANCE && aBounds[1] < MAX_DISTANCE &&
-          aBounds[2] > -MAX_DISTANCE && aBounds[3] < MAX_DISTANCE &&
-          aBounds[4] > -MAX_DISTANCE && aBounds[5] < MAX_DISTANCE )
+           aBounds[0] > -MAX_DISTANCE && aBounds[1] < MAX_DISTANCE &&
+           aBounds[2] > -MAX_DISTANCE && aBounds[3] < MAX_DISTANCE &&
+           aBounds[4] > -MAX_DISTANCE && aBounds[5] < MAX_DISTANCE )
       {
-       aCount++;
+        aCount++;
 
-       theBounds[0] = min(aBounds[0],theBounds[0]);
-       theBounds[2] = min(aBounds[2],theBounds[2]);
-       theBounds[4] = min(aBounds[4],theBounds[4]);
+        theBounds[0] = min(aBounds[0],theBounds[0]);
+        theBounds[2] = min(aBounds[2],theBounds[2]);
+        theBounds[4] = min(aBounds[4],theBounds[4]);
 
-       theBounds[1] = max(aBounds[1],theBounds[1]);
-       theBounds[3] = max(aBounds[3],theBounds[3]);
-       theBounds[5] = max(aBounds[5],theBounds[5]);
+        theBounds[1] = max(aBounds[1],theBounds[1]);
+        theBounds[3] = max(aBounds[3],theBounds[3]);
+        theBounds[5] = max(aBounds[5],theBounds[5]);
 
       }//not bogus
     }
@@ -194,9 +194,9 @@ ResetCameraClippingRange(vtkRenderer* theRenderer)
 /*!Compute trihedron size.*/
 bool
 ComputeTrihedronSize( vtkRenderer* theRenderer,
-                     vtkFloatingPointType& theNewSize,
-                     const vtkFloatingPointType theSize, 
-                     const vtkFloatingPointType theSizeInPercents )
+                      vtkFloatingPointType& theNewSize,
+                      const vtkFloatingPointType theSize, 
+                      const vtkFloatingPointType theSizeInPercents )
 {
   // calculating diagonal of visible props of the renderer
   vtkFloatingPointType bnd[ 6 ];
@@ -238,11 +238,11 @@ bool IsBBEmpty(vtkRenderer* theRenderer)
     if(VTKViewer_Actor* anActor = VTKViewer_Actor::SafeDownCast(anAct))
       if(anActor->GetVisibility() && !anActor->IsInfinitive())
       {
-       vtkFloatingPointType *aBounds = anActor->GetBounds();
-       if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
-          aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
-          aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
-         isAny = true;
+        vtkFloatingPointType *aBounds = anActor->GetBounds();
+        if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
+           aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
+           aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
+          isAny = true;
       }
   
   return !isAny;
@@ -271,19 +271,19 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]
     {
       if(anActor->GetVisibility() && !anActor->IsInfinitive())
       {
-       vtkFloatingPointType *aBounds = anActor->GetBounds();
-       if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
-          aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
-          aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
-       {
-         for(int i = 0; i < 5; i = i + 2){
-           if(aBounds[i] < aNewBndBox[i]) 
-             aNewBndBox[i] = aBounds[i];
-           if(aBounds[i+1] > aNewBndBox[i+1]) 
-             aNewBndBox[i+1] = aBounds[i+1];
-         }
-         isAny = true;
-       }
+        vtkFloatingPointType *aBounds = anActor->GetBounds();
+        if(aBounds[0] > -VTK_LARGE_FLOAT && aBounds[1] < VTK_LARGE_FLOAT &&
+           aBounds[2] > -VTK_LARGE_FLOAT && aBounds[3] < VTK_LARGE_FLOAT &&
+           aBounds[4] > -VTK_LARGE_FLOAT && aBounds[5] < VTK_LARGE_FLOAT)
+        {
+          for(int i = 0; i < 5; i = i + 2){
+            if(aBounds[i] < aNewBndBox[i]) 
+              aNewBndBox[i] = aBounds[i];
+            if(aBounds[i+1] > aNewBndBox[i+1]) 
+              aNewBndBox[i+1] = aBounds[i+1];
+          }
+          isAny = true;
+        }
       }
     }
   }
@@ -309,8 +309,8 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]
 
     vtkFloatingPointType aWidth = 
       sqrt((aNewBndBox[1]-aNewBndBox[0])*(aNewBndBox[1]-aNewBndBox[0]) +
-          (aNewBndBox[3]-aNewBndBox[2])*(aNewBndBox[3]-aNewBndBox[2]) +
-          (aNewBndBox[5]-aNewBndBox[4])*(aNewBndBox[5]-aNewBndBox[4]));
+           (aNewBndBox[3]-aNewBndBox[2])*(aNewBndBox[3]-aNewBndBox[2]) +
+           (aNewBndBox[5]-aNewBndBox[4])*(aNewBndBox[5]-aNewBndBox[4]));
     
     if(aWidth < MIN_DISTANCE)
       return false;
@@ -327,7 +327,7 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]
   vtkFloatingPointType aBounds[6];
   int aCount = ComputeVisiblePropBounds(theRenderer,aBounds);
   printf("aNewBndBox[0] = %f, aNewBndBox[1] = %f,\naNewBndBox[2] = %f, aNewBndBox[3] = %f,\naNewBndBox[4] = %f, aNewBndBox[5] = %f\n",
-          aBounds[0],aBounds[1],aBounds[2],aBounds[3],aBounds[4],aBounds[5]);
+           aBounds[0],aBounds[1],aBounds[2],aBounds[3],aBounds[4],aBounds[5]);
   printf("aCount = %d\n",aCount);
 
   if(aCount){
@@ -342,8 +342,8 @@ bool ComputeBBCenter(vtkRenderer* theRenderer, vtkFloatingPointType theCenter[3]
 
     vtkFloatingPointType aWidth = 
       sqrt((aBounds[1]-aBounds[0])*(aBounds[1]-aBounds[0]) +
-          (aBounds[3]-aBounds[2])*(aBounds[3]-aBounds[2]) +
-          (aBounds[5]-aBounds[4])*(aBounds[5]-aBounds[4]));
+           (aBounds[3]-aBounds[2])*(aBounds[3]-aBounds[2]) +
+           (aBounds[5]-aBounds[4])*(aBounds[5]-aBounds[4]));
     
     if(aWidth < MIN_DISTANCE)
       return false;
index a9074da59cc17e3badef38d9afdf71d672a06b9a..b52ff5cbe2d35e4f4aafbc7007f048fe7e095735 100755 (executable)
@@ -30,13 +30,13 @@ VTKVIEWER_EXPORT
 extern
 void
 ResetCamera(vtkRenderer* theRenderer, 
-           int theUsingZeroFocalPoint = false);
+            int theUsingZeroFocalPoint = false);
 
 VTKVIEWER_EXPORT
 extern
 int
 ComputeVisiblePropBounds(vtkRenderer* theRenderer, 
-                        vtkFloatingPointType theBounds[6]);
+                         vtkFloatingPointType theBounds[6]);
 
 VTKVIEWER_EXPORT
 extern
@@ -46,9 +46,9 @@ VTKVIEWER_EXPORT
 extern
 bool
 ComputeTrihedronSize(vtkRenderer* theRenderer, 
-                    vtkFloatingPointType& theNewSize, 
-                    const vtkFloatingPointType theSize, 
-                    const vtkFloatingPointType theSizeInPercents);
+                     vtkFloatingPointType& theNewSize, 
+                     const vtkFloatingPointType theSize, 
+                     const vtkFloatingPointType theSizeInPercents);
 
 VTKVIEWER_EXPORT
 extern
@@ -56,5 +56,5 @@ bool IsBBEmpty(vtkRenderer* theRenderer);
 VTKVIEWER_EXPORT
 extern
 bool ComputeBBCenter(vtkRenderer* theRenderer, 
-                    vtkFloatingPointType theCenter[3]);
+                     vtkFloatingPointType theCenter[3]);
 #endif
index 20185b38afc4e90cac1c9d6621283cd051220ee6..454bb73a2a36fe6b70757d59a988f527eb99f490 100755 (executable)
@@ -44,8 +44,8 @@
 /*! Construction*/
 VTKViewer_ViewWindow::VTKViewer_ViewWindow( SUIT_Desktop* theDesktop, 
                                             VTKViewer_Viewer* theModel,
-                                           VTKViewer_InteractorStyle* iStyle,
-                                           VTKViewer_RenderWindowInteractor* rw )
+                                            VTKViewer_InteractorStyle* iStyle,
+                                            VTKViewer_RenderWindowInteractor* rw )
 : SUIT_ViewWindow( theDesktop )
 {
   myModel = theModel;
@@ -579,8 +579,8 @@ QString VTKViewer_ViewWindow::getVisualParameters()
 
   QString retStr;
   retStr.sprintf( "%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e*%.12e", 
-                 pos[0], pos[1], pos[2], focalPnt[0], focalPnt[1], focalPnt[2], viewUp[0], viewUp[1], 
-                 viewUp[2], parScale, scale[0], scale[1], scale[2] );
+                  pos[0], pos[1], pos[2], focalPnt[0], focalPnt[1], focalPnt[2], viewUp[0], viewUp[1], 
+                  viewUp[2], parScale, scale[0], scale[1], scale[2] );
   return retStr;
 }
 
index 3bceda6c595b55ebc9593477346daa9eb07c189d..56b139837ffe36855332d7129f89d8be295ff5bc 100755 (executable)
@@ -49,7 +49,7 @@ class VTKVIEWER_EXPORT VTKViewer_ViewWindow : public SUIT_ViewWindow
 public:
   VTKViewer_ViewWindow( SUIT_Desktop*, VTKViewer_Viewer*,
                         VTKViewer_InteractorStyle* = 0,
-                       VTKViewer_RenderWindowInteractor* = 0 );
+                        VTKViewer_RenderWindowInteractor* = 0 );
   virtual ~VTKViewer_ViewWindow();
   
   /*!Gets tool bar.*/
@@ -61,7 +61,7 @@ public:
   /*!Gets renderer.*/
   vtkRenderer*                      getRenderer()     { return myRenderer;     }
   /*!Gets render window.*/
-  VTKViewer_RenderWindow*          getRenderWindow() { return myRenderWindow; }
+  VTKViewer_RenderWindow*           getRenderWindow() { return myRenderWindow; }
   /*!Gets render window interactor.*/
   VTKViewer_RenderWindowInteractor* getRWInteractor() { return myRWInteractor; }
   bool                              isTrihedronDisplayed();