]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To customize ActorFactories - common for VISU_Actors and particular for GaussPtsActors
authorapo <apo@opencascade.com>
Thu, 22 Sep 2005 12:19:20 +0000 (12:19 +0000)
committerapo <apo@opencascade.com>
Thu, 22 Sep 2005 12:19:20 +0000 (12:19 +0000)
14 files changed:
src/OBJECT/Makefile.in
src/OBJECT/VISU_Actor.cxx
src/OBJECT/VISU_Actor.h
src/OBJECT/VISU_ActorFactory.h
src/OBJECT/VISU_GaussPtsAct.cxx
src/OBJECT/VISU_GaussPtsAct.h
src/OBJECT/VISU_GaussPtsActorFactory.h [new file with mode: 0644]
src/VISU_I/VISU_GaussPoints_i.cc
src/VISU_I/VISU_GaussPoints_i.hh
src/VISU_I/VISU_Prs3d_i.cc
src/VISU_I/VISU_Prs3d_i.hh
src/VVTK/Makefile.in
src/VVTK/VVTK_Renderer.cxx
src/VVTK/VVTK_ViewWindow.cxx

index a68549744d5d12cd3c68811ad37fca9757dbba9a..add0114e469d7cfb6e197bc2fda0bf1a204d64bb 100644 (file)
@@ -33,8 +33,9 @@ VPATH=.:@srcdir@:@top_srcdir@/idl
 @COMMENCE@
 
 EXPORT_HEADERS = \
-       VISU_Actor.h \
        VISU_ActorFactory.h \
+       VISU_GaussPtsActorFactory.h \
+       VISU_Actor.h \
        VISU_MeshAct.h \
        VISU_ScalarMapAct.h \
        VISU_GaussPtsAct.h \
index cb8a21cae80cfab5c86013c9a6463b791d91c8f2..596705fcb8b184c728376de4bfb0ed9c09fe183b 100644 (file)
@@ -116,7 +116,7 @@ VISU_Actor
     setName(anActor->getName());
     if(anActor->hasIO()) setIO(anActor->getIO());
   }
-  SALOME_Actor::ShallowCopy(prop);
+  Superclass::ShallowCopy(prop);
 }
 
 //----------------------------------------------------------------------------
@@ -124,7 +124,7 @@ VISU_Actor
 ::~VISU_Actor()
 {
   if(MYDEBUG) MESSAGE("~VISU_Actor() - this = "<<this);
-  SALOME_Actor::SetProperty(NULL);
+  Superclass::SetProperty(NULL);
 }
 
 //----------------------------------------------------------------------------
@@ -132,7 +132,7 @@ void
 VISU_Actor
 ::setIO(const Handle(SALOME_InteractiveObject)& theIO)
 {
-  SALOME_Actor::setIO(theIO); 
+  Superclass::setIO(theIO); 
   myName = theIO->getName(); 
 }
 
@@ -166,19 +166,12 @@ VISU_Actor
   myActorFactory = theActorFactory;
 }
 
-void 
-VISU_Actor
-::Connect(VISU_Actor* theActor)
-{
-  mySetVisibilitySignal.connect(boost::bind(&VISU_Actor::SetVisibility,theActor,_1));
-}
-
 void
 VISU_Actor
 ::Update()
 {
   myActorFactory->UpdateActor(this);
-  SALOME_Actor::Update();
+  Superclass::Update();
 }
 
 
@@ -229,26 +222,11 @@ VISU_Actor
 
 
 //----------------------------------------------------------------------------
-void
-VISU_Actor
-::SetVisibility(int theMode)
-{
-  SALOME_Actor::SetVisibility(theMode);
-  mySetVisibilitySignal(GetVisibility());
-}
-
-int
-VISU_Actor
-::GetVisibility()
-{
-  return SALOME_Actor::GetVisibility();
-}
-
 void
 VISU_Actor
 ::SetRepresentation(int theMode) 
 { 
-  SALOME_Actor::SetRepresentation(theMode);
+  Superclass::SetRepresentation(theMode);
   if(myRepresentation == VTK_POINTS)
     UnShrink();
 }
index f99aad3763fe08e0185b6cc99428c278be290697..523a5e748f0729aa6c99ac515b12eb3023279962 100644 (file)
@@ -51,6 +51,12 @@ class VISU_PipeLine;
 #define VTKOCC_EXPORT VTK_EXPORT
 #endif
 
+namespace VISU 
+{
+  class Prs3d_i;
+}
+
+//----------------------------------------------------------------------------
 class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor 
 {
  public:
@@ -84,10 +90,6 @@ class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor
   void
   SetFactory(VISU::TActorFactory* theActorFactory);
 
-  virtual 
-  void
-  Connect(VISU_Actor* theActor);
-
   virtual
   void
   Update();
@@ -102,14 +104,6 @@ class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor
   SetPipeLine(VISU_PipeLine* thePipeLine) ;
 
   //----------------------------------------------------------------------------
-  virtual
-  void
-  SetVisibility(int theMode);
-
-  virtual
-  int
-  GetVisibility();
-
   virtual
   void
   SetRepresentation(int theMode);
@@ -229,7 +223,6 @@ class VTKOCC_EXPORT VISU_Actor : public SALOME_Actor
   vtkSmartPointer<vtkDataSetMapper> myMapper;
 
   VISU::TActorFactory* myActorFactory;
-  boost::signal1<void,int> mySetVisibilitySignal;
 
   vtkSmartPointer<VTKViewer_ShrinkFilter> myShrinkFilter;
   bool myIsShrinkable;
index a23cbe640b47d176eaa32d4ab1651bf237722d96..29367ebadc7df5b4e74e03f11484493e352efb1f 100644 (file)
 #ifndef VISU_ACTOR_FACTORY_H
 #define VISU_ACTOR_FACTORY_H
 
-#include "SALOME_InteractiveObject.hxx"
-
 class VISU_Actor;
-class vtkImplicitFunction;
 
+//----------------------------------------------------------------------------
 namespace VISU 
 { 
-  class Prs3d_i;
-
   struct TActorFactory
   {
-    virtual 
-    VISU_Actor* 
-    CloneActor(VISU_Actor* theActor) = 0;
-
     virtual 
     void
     UpdateActor(VISU_Actor* theActor) = 0;
-
-    virtual 
-    void
-    UpdateFromActor(VISU_Actor* theActor) = 0;
-
-    virtual 
-    void 
-    SetImplicitFunction(VISU_Actor* theActor, 
-                       vtkImplicitFunction* theImplicitFunction) = 0;
   };
 }
 
index 1b1ce339bf56a7893c7c26bc4d895cbf3947dab4..eb7e7437b7f0446a1e20b1689f3b007a49f011de 100644 (file)
@@ -53,7 +53,6 @@
 #include <vtkObjectFactory.h>
 #include <vtkCallbackCommand.h>
 #include <vtkInteractorStyle.h>
-#include <vtkInteractorObserver.h>
 #include <vtkRenderWindowInteractor.h>
 
 #include <sstream>
@@ -239,7 +238,6 @@ vtkStandardNewMacro(VISU_GaussPtsAct);
 
 VISU_GaussPtsAct
 ::VISU_GaussPtsAct():
-  myInteractorObserver(vtkInteractorObserver::New()),
   myEventCallbackCommand(vtkCallbackCommand::New()),
   myPSMapper(VISU_OpenGLPointSpriteMapper::New()),
   myGaussPointsPL(NULL),
@@ -251,7 +249,6 @@ VISU_GaussPtsAct
   mySphereActor(vtkActor::New()),
   myCursorPyramid(VISU_CursorPyramid::New())
 {
-  myInteractorObserver->Delete();
   myEventCallbackCommand->Delete();
 
   myEventCallbackCommand->SetClientData(this); 
@@ -368,21 +365,47 @@ VISU_GaussPtsAct
   Superclass::SetPipeLine(thePipeLine);
 }
 
+VISU_GaussPointsPL*
+VISU_GaussPtsAct
+::GetGaussPointsPL()
+{
+  return myGaussPointsPL.GetPointer();
+}
+
 void
 VISU_GaussPtsAct
 ::SetFactory(VISU::TActorFactory* theActorFactory)
 { 
-  VISU_Actor::SetFactory(theActorFactory);
-  myUpdatePrs3dSignal.connect(boost::bind(&VISU::TActorFactory::UpdateFromActor,
-                                         theActorFactory,
-                                         _1));
+  using namespace VISU;
+  if(TGaussPtsActorFactory* aFactory = dynamic_cast<TGaussPtsActorFactory*>(theActorFactory)){
+    myUpdatePrs3dSignal.connect(boost::bind(&TGaussPtsActorFactory::UpdateFromActor,
+                                           aFactory,
+                                           _1));
+    VISU_Actor::SetFactory(theActorFactory);
+    myGaussPtsActorFactory = aFactory;
+  }
 }
 
-VISU_GaussPointsPL*
+VISU::TGaussPtsActorFactory*
 VISU_GaussPtsAct
-::GetGaussPointsPL()
+::GetGaussPtsFactory()
 {
-  return myGaussPointsPL.GetPointer();
+  return myGaussPtsActorFactory;
+}
+
+void 
+VISU_GaussPtsAct
+::Connect(VISU_GaussPtsAct* theActor)
+{
+  mySetVisibilitySignal.connect(boost::bind(&VISU_GaussPtsAct::SetVisibility,theActor,_1));
+}
+
+void
+VISU_GaussPtsAct
+::SetVisibility(int theMode)
+{
+  Superclass::SetVisibility(theMode);
+  mySetVisibilitySignal(GetVisibility());
 }
 
 bool
index d7f9e78e2d63266a3505141d5c6c113bc4d6aacb..fd617c997fbca626cbd7aaf606545302b9e4918f 100644 (file)
@@ -30,6 +30,8 @@
 #define VISU_GaussPtsAct_HeaderFile
 
 #include "VISU_ScalarMapAct.h"
+#include "VISU_GaussPtsActorFactory.h"
+
 #include <vtkSmartPointer.h>
 
 class VISU_GaussPointsPL;
@@ -52,7 +54,6 @@ class vtkDataSetMapper;
 class vtkInteractorObserver;
 class vtkCallbackCommand;
 
-
 //----------------------------------------------------------------------------
 class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_ScalarMapAct
 {
@@ -68,12 +69,23 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_ScalarMapAct
   void
   SetPipeLine(VISU_PipeLine* thePipeLine) ;
   
+  VISU_GaussPointsPL*
+  GetGaussPointsPL();
+
   virtual
   void
   SetFactory(VISU::TActorFactory* theActorFactory);
+  
+  VISU::TGaussPtsActorFactory*
+  GetGaussPtsFactory();    
 
-  VISU_GaussPointsPL*
-  GetGaussPointsPL();
+  virtual 
+  void
+  Connect(VISU_GaussPtsAct* theActor);
+
+  virtual
+  void
+  SetVisibility(int theMode);
 
   bool
   ChangeMagnification();
@@ -117,7 +129,6 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_ScalarMapAct
   SetMapperInput(vtkDataSet* theDataSet);
 
   //----------------------------------------------------------------------------
-  vtkSmartPointer<vtkInteractorObserver> myInteractorObserver;
   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
 
   // Main process VTK event method
@@ -130,7 +141,9 @@ class VTKOCC_EXPORT VISU_GaussPtsAct : public VISU_ScalarMapAct
   void
   OnInteractorEvent(unsigned long theEvent);
 
-  boost::signal1<void,VISU_Actor*> myUpdatePrs3dSignal;
+  VISU::TGaussPtsActorFactory* myGaussPtsActorFactory;
+  boost::signal1<void,VISU_GaussPtsAct*> myUpdatePrs3dSignal;
+  boost::signal1<void,int> mySetVisibilitySignal;
   bool myChangeMagnification;
 
   //----------------------------------------------------------------------------
diff --git a/src/OBJECT/VISU_GaussPtsActorFactory.h b/src/OBJECT/VISU_GaussPtsActorFactory.h
new file mode 100644 (file)
index 0000000..5d27310
--- /dev/null
@@ -0,0 +1,53 @@
+//  VISU OBJECT : interactive object for VISU entities implementation
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : VISU_ScalarMapAct.h
+//  Author : Laurent CORNABE with help of Nicolas REJNERI
+//  Module : VISU
+//  $Header$
+
+#ifndef VISU_GAUSSPTS_ACTOR_FACTORY_H
+#define VISU_GAUSSPTS_ACTOR_FACTORY_H
+
+#include "VISU_ActorFactory.h"
+
+class vtkImplicitFunction;
+class VISU_GaussPtsAct;
+
+//----------------------------------------------------------------------------
+namespace VISU 
+{ 
+  struct TGaussPtsActorFactory: virtual TActorFactory
+  {
+    virtual 
+    VISU_GaussPtsAct* 
+    CloneActor(VISU_GaussPtsAct* theActor) = 0;
+
+    virtual 
+    void
+    UpdateFromActor(VISU_GaussPtsAct* theActor) = 0;
+  };
+}
+
+
+#endif
index abd082fbc0a2e7ddcb54c008194b2266d632143a..0e8e12e653b8a461e7ecbebf21e160dfd46ff157 100644 (file)
 //  Module :
 
 #include "VISU_GaussPoints_i.hh"
-#include "VISU_GaussPointsPL.hxx"
-#include "VISU_GaussPtsAct.h"
+
 #include "VISU_Result_i.hh"
+#include "VISU_GaussPtsAct.h"
+#include "VISU_GaussPointsPL.hxx"
+
 
 using namespace VISU;
 using namespace std;
@@ -225,7 +227,12 @@ VISU_PipeLine*
 VISU::GaussPoints_i
 ::GetPipeLine()
 {
-  return GetPL();
+  // We create a new PipeLine instamce in order to provide
+  //   different representation for different actors (basic and segmented)
+  VISU_GaussPointsPL* aPipeLine = VISU_GaussPointsPL::New();
+  aPipeLine->ShallowCopy(myPipeLine);
+  aPipeLine->Update();
+  return aPipeLine;
 }
 
 
@@ -248,11 +255,15 @@ VISU::GaussPoints_i
 }
 
 //----------------------------------------------------------------------------
-VISU_Actor
+VISU_GaussPtsAct
 VISU::GaussPoints_i
-::CloneActor(VISU_Actor* theActor) 
+::CloneActor(VISU_GaussPtsAct* theActor) 
 {
-  VISU::ScalarMap_i::CloneActor(theActor);
+  if(VISU_GaussPtsAct* anActor = dynamic_cast<VISU_GaussPtsAct*>(CreateActor())){
+    theActor->Connect(anActor);
+    return anActor;
+  }
+  return NULL;
 }
 
 //----------------------------------------------------------------------------
@@ -279,23 +290,10 @@ VISU::GaussPoints_i
 //----------------------------------------------------------------------------
 void
 VISU::GaussPoints_i
-::UpdateFromActor(VISU_Actor* theActor) 
-{
-  if(VISU_GaussPtsAct* anActor = dynamic_cast<VISU_GaussPtsAct*>(theActor)){
-    bool aChangeMagnification = anActor->ChangeMagnification();
-    if(MYDEBUG) MESSAGE("GaussPoints_i::UpdateFromActor - this = "<<this<<
-                       "; aChangeMagnification = "<<aChangeMagnification);
-    myGaussPointsPL->ChangeMagnification(aChangeMagnification);
-  }
-  VISU::Prs3d_i::UpdateFromActor(theActor);
-}
-
-//----------------------------------------------------------------------------
-void 
-VISU::GaussPoints_i
-::SetImplicitFunction(VISU_Actor* theActor, 
-                     vtkImplicitFunction* theImplicitFunction)
+::UpdateFromActor(VISU_GaussPtsAct* theActor) 
 {
-  if(VISU_PipeLine* aPipeLine = theActor->GetPipeLine())
-    aPipeLine->SetImplicitFunction(theImplicitFunction);
+  bool aChangeMagnification = theActor->ChangeMagnification();
+  if(MYDEBUG) MESSAGE("GaussPoints_i::UpdateFromActor - this = "<<this);
+  myGaussPointsPL->ChangeMagnification(aChangeMagnification);
+  UpdateActors();
 }
index 0df0a89824bd632819091c4195a7604c65c7b29e..becaaada3afd57b2484aea7681494a6396fc500d 100644 (file)
 #define VISU_GaussPoints_i_HeaderFile
 
 #include "VISU_ScalarMap_i.hh"
+#include "VISU_GaussPtsActorFactory.h"
 
 class VISU_GaussPointsPL;
 
 namespace VISU
 {
   class GaussPoints_i : public virtual POA_VISU::GaussPoints,
+                       public virtual VISU::TGaussPtsActorFactory,
                        public virtual ScalarMap_i
   {
     static int myNbPresent;
@@ -125,8 +127,8 @@ namespace VISU
     CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
 
     virtual 
-    VISU_Actor
-    CloneActor(VISU_Actor* theActor);
+    VISU_GaussPtsAct
+    CloneActor(VISU_GaussPtsAct* theActor);
 
     virtual
     void
@@ -134,13 +136,7 @@ namespace VISU
 
     virtual 
     void
-    UpdateFromActor(VISU_Actor* theActor);
-
-    //----------------------------------------------------------------------------
-    virtual 
-    void 
-    SetImplicitFunction(VISU_Actor* theActor, 
-                       vtkImplicitFunction* theImplicitFunction);
+    UpdateFromActor(VISU_GaussPtsAct* theActor);
   };
 }
 
index bf37395c361aa8099bae37bdff0a56a758b46a1f..14bfe1ab23124974e28925ba3df561021ede52e6 100644 (file)
@@ -206,15 +206,6 @@ VISU::Prs3d_i
   }
 }
 
-VISU_Actor*
-VISU::Prs3d_i
-::CloneActor(VISU_Actor* theActor)
-{
-  VISU_Actor* anActor = CreateActor();
-  theActor->Connect(anActor);
-  return anActor;
-}
-
 void
 VISU::Prs3d_i
 ::UpdateActor(VISU_Actor* theActor) 
@@ -225,14 +216,6 @@ VISU::Prs3d_i
   theActor->Modified();
 }
 
-void
-VISU::Prs3d_i
-::UpdateFromActor(VISU_Actor* theActor) 
-{
-  if(MYDEBUG) MESSAGE("Prs3d_i::UpdateFromActor - this = "<<this);
-  UpdateActors();
-}
-
 void
 VISU::Prs3d_i
 ::UpdateActors()
@@ -244,14 +227,6 @@ VISU::Prs3d_i
 
 
 //----------------------------------------------------------------------------
-void 
-VISU::Prs3d_i
-::SetImplicitFunction(VISU_Actor* theActor, 
-                     vtkImplicitFunction* theImplicitFunction)
-{
-  myPipeLine->SetImplicitFunction(theImplicitFunction);
-}
-
 // Clipping planes
 void
 VISU::Prs3d_i
index 1d8d679224341c1f05ea2bb909ae1e4a7a8c1760..8d5b88e906f46f099b6de779b55673925a07ccff 100644 (file)
@@ -138,28 +138,15 @@ namespace VISU
     VISU_Actor* 
     CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL) = 0;
 
-    virtual 
-    VISU_Actor* 
-    CloneActor(VISU_Actor* theActor);
-
     virtual 
     void
     UpdateActor(VISU_Actor* theActor);
 
-    virtual 
-    void
-    UpdateFromActor(VISU_Actor* theActor);
-
     virtual 
     void
     UpdateActors();
 
     //----------------------------------------------------------------------------
-    virtual 
-    void 
-    SetImplicitFunction(VISU_Actor* theActor, 
-                       vtkImplicitFunction* theImplicitFunction);
-
     // Clipping planes
     void
     RemoveAllClippingPlanes();
index 9b1f80146cf2320a2a22e7fb3f7889cd0b23de03..45d817ffdb0f256c3ce1207f942b68a2d1d3a435 100755 (executable)
@@ -41,12 +41,18 @@ LIB_MOC = \
        VVTK_View.h
 
 CPPFLAGS += \
-       $(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(BOOST_CPPFLAGS) \
+       $(QT_INCLUDES) \
+       $(OCC_INCLUDES) \
+       $(VTK_INCLUDES) \
+       $(BOOST_CPPFLAGS) \
        -I$(KERNEL_ROOT_DIR)/include/salome \
-       -I$(GUI_ROOT_DIR)/include/salome
+       -I$(GUI_ROOT_DIR)/include/salome \
+       -I${MED_ROOT_DIR}/include/salome
 
 LDFLAGS += \
-       $(QT_MT_LIBS) $(OCC_LIBS) $(VTK_LIBS) \
+       $(QT_MT_LIBS) \
+       $(OCC_LIBS) \
+       $(VTK_LIBS) \
        -L$(KERNEL_ROOT_DIR)/lib/salome \
        -L$(GUI_ROOT_DIR)/lib/salome
 
index 9b1eb747865feed2f5e2c00994cab422e244072f..1f2ee772ce0d267ea95c7d0ba607f15bab8abdc1 100644 (file)
@@ -29,6 +29,7 @@
 #include "VVTK_Renderer.h"
 
 #include "VISU_GaussPtsAct.h"
+#include "VISU_GaussPointsPL.hxx"
 #include "VISU_ImplicitFunctionWidget.h"
 
 #include <vtkObjectFactory.h>
@@ -178,11 +179,15 @@ void
 VVTK_Renderer2
 ::AddActor(VTKViewer_Actor* theActor)
 {
-  SVTK_Renderer::AddActor(theActor);
-  if(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(theActor))
-    if(VISU::TActorFactory* aFactory = anActor->GetFactory()){
-      aFactory->SetImplicitFunction(anActor,myImplicitFunction.GetPointer());
+  using namespace VISU;  
+  if(VISU_GaussPtsAct* anActor = dynamic_cast<VISU_GaussPtsAct*>(theActor)){
+    if(TGaussPtsActorFactory* aFactory = anActor->GetGaussPtsFactory()){
+      if(VISU_GaussPtsAct* anActor2 = aFactory->CloneActor(anActor)){
+       anActor2->GetGaussPointsPL()->SetImplicitFunction(myImplicitFunction.GetPointer());
+       SVTK_Renderer::AddActor(theActor);
+      }
     }
+  }
 }
 
 //----------------------------------------------------------------------------
@@ -190,8 +195,13 @@ void
 VVTK_Renderer2
 ::RemoveActor(VTKViewer_Actor* theActor)
 {
-  if(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(theActor))
-    if(VISU::TActorFactory* aFactory = anActor->GetFactory())
-      aFactory->SetImplicitFunction(anActor,NULL);
-  SVTK_Renderer::RemoveActor(theActor);
+  using namespace VISU;  
+  if(VISU_GaussPtsAct* anActor = dynamic_cast<VISU_GaussPtsAct*>(theActor)){
+    if(TGaussPtsActorFactory* aFactory = anActor->GetGaussPtsFactory()){
+      if(VISU_GaussPtsAct* anActor2 = aFactory->CloneActor(anActor)){
+       anActor2->GetGaussPointsPL()->SetImplicitFunction(NULL);
+       SVTK_Renderer::RemoveActor(theActor);
+      }
+    }
+  }
 }
index e5ffb4e100265a7581b199c7bfe1dfe282e74e6d..e27caf2327d128a369e035855dfa612913a4f053 100755 (executable)
 #include "VVTK_ViewModel.h"
 #include "VVTK_View.h"
 
-#include "VISU_GaussPtsAct.h"
-
 #include "SUIT_Session.h"
 
 #include "VVTK_Renderer.h"
+#include "SVTK_Selector.h"
 #include "SVTK_InteractorStyle.h"
 #include "SVTK_RenderWindowInteractor.h"
 #include "SVTK_GenericRenderWindowInteractor.h"
@@ -143,10 +142,7 @@ VVTK_ViewWindow
           bool theIsUpdate)
 {
   myMainWindow1->AddActor(theActor,theIsUpdate);
-  if(VISU_Actor* anAct = dynamic_cast<VISU_Actor*>(theActor))
-    if(VISU::TActorFactory* aFactory = anAct->GetFactory())
-      if(VISU_Actor* anActor = aFactory->CloneActor(anAct))
-       myMainWindow2->AddActor(anActor,theIsUpdate);
+  myMainWindow2->AddActor(theActor,theIsUpdate);
 }
 
 //----------------------------------------------------------------------------