#include "SVTK_Functor.h"
//#include "SVTK_MainWindow.h"
+#include "VTKViewer_Algorithm.h"
+
#include "SPlot2d_ViewModel.h"
#include "VisuGUI_SetupPlot2dDlg.h"
#include "Plot2d_SetupCurveDlg.h"
vw->unHighlightAll();
if (vtkRenderer *aRen = vw->getRenderer()) {
vtkActor *anActor;
- vtkActorCollection *anActColl = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection *anActColl = aCopy.GetActors();
for (anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL; ) {
if (anActor->GetVisibility() > 0)
if (VISU_Actor* anVISUActor = VISU_Actor::SafeDownCast(anActor)) {
if ( mySelector->HasIndex( myIO ) )
mySelector->GetIndex(myIO, myMapIndex);
- myActor = SVTK::Find<VISU_GaussPtsAct>(anInteractor->getRenderer()->GetActors(),
+ VTK::ActorCollectionCopy aCopy(anInteractor->getRenderer()->GetActors());
+ myActor = SVTK::Find<VISU_GaussPtsAct>(aCopy.GetActors(),
SVTK::TIsSameIObject<VISU_GaussPtsAct>( myIO ));
if ( !myActor )
return aResult;
#include "SVTK_RenderWindowInteractor.h"
#include "VISU_Event.h"
+#include "VTKViewer_Algorithm.h"
+
#include "VisuGUI_Prs3dTools.h"
#include "VisuGUI_ClippingDlg.h"
QVector<SUIT_ViewWindow*> views = vman->getViews();
for ( int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++ ) {
if ( SVTK_ViewWindow* vtkView = dynamic_cast<SVTK_ViewWindow*>( views[i] ) ) {
- vtkActorCollection* allActors = vtkView->getRenderer()->GetActors();
+ VTK::ActorCollectionCopy aCopy(vtkView->getRenderer()->GetActors());
+ vtkActorCollection* allActors = aCopy.GetActors();
allActors->InitTraversal();
while ( vtkActor* actor = allActors->GetNextActor() ) {
if ( actor->GetVisibility() ) { // store only visible actors
#include "SVTK_Selector.h"
#include "SVTK_RenderWindowInteractor.h"
+#include "VTKViewer_Algorithm.h"
+
#include "utilities.h"
// OCCT Includes
aViewWindow->highlight(anIO, true, true);
SVTK_RenderWindowInteractor* anInteractor = aViewWindow->GetInteractor();
- VISU_Actor* anActor = SVTK::Find<VISU_Actor>(anInteractor->getRenderer()->GetActors(),
+ VTK::ActorCollectionCopy aCopy(anInteractor->getRenderer()->GetActors());
+ VISU_Actor* anActor = SVTK::Find<VISU_Actor>(aCopy.GetActors(),
SVTK::TIsSameIObject<VISU_Actor>( anIO ));
anActor->Highlight( anIO );
#include "SVTK_ViewWindow.h"
+#include "VTKViewer_Algorithm.h"
+
#include "SUIT_OverrideCursor.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
myCurrent = 0;
init();
QStringList aPrsNames;
- vtkActorCollection *aCollection = myViewWindow->getRenderer()->GetActors();
+ VTK::ActorCollectionCopy aCopy(myViewWindow->getRenderer()->GetActors());
+ vtkActorCollection *aCollection = aCopy.GetActors();
aCollection->InitTraversal();
while(vtkActor* anActor = aCollection->GetNextActor()){
if (VISU_Actor* anVISUActor = dynamic_cast<VISU_Actor*>(anActor)) {
const char* theActorClassName)
{
vtkRenderer *aRen = theViewWindow->getRenderer();
- vtkActorCollection *anActColl = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection *anActColl = aCopy.GetActors();
vtkProp *prop;
vtkFloatingPointType *bounds;
int somethingVisible = false;
{
if (SVTK_ViewWindow* aViewWindow = GetActiveViewWindow<SVTK_ViewWindow>(theModule)) {
vtkRenderer *aRen = aViewWindow->getRenderer();
- vtkActorCollection *anActColl = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection *anActColl = aCopy.GetActors();
anActColl->InitTraversal();
VISU_Actor* aResActor = NULL;
bool isOk = true;
if (TViewWindow* aViewWindow = GetActiveViewWindow<TViewWindow>(theModule)) {
aViewWindow->unHighlightAll();
if (vtkRenderer *aRen = aViewWindow->getRenderer()) {
- vtkActorCollection *aCollection = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection *aCollection = aCopy.GetActors();
aCollection->InitTraversal();
while (vtkActor *anAct = aCollection->GetNextActor()) {
if (anAct->GetVisibility() > 0)
#include "SVTK_ViewWindow.h"
#include "SVTK_ViewModel.h"
+#include "VTKViewer_Algorithm.h"
#include "SPlot2d_Curve.h"
#include "Plot2d_ViewFrame.h"
#include "Plot2d_ViewWindow.h"
if (!vf) return NULL;
if(MYDEBUG) MESSAGE("UpdateViewer - theDisplaing = "<<theDisplaing<<"; thePrs = "<<thePrs);
vtkRenderer *aRen = vf->getRenderer();
- vtkActorCollection *anActColl = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection* anActColl = aCopy.GetActors();
vtkActor *anActor;
VISU_Actor *anVISUActor = NULL, *aResActor = NULL;
for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL;){
return NULL;
vtkRenderer* aRenderer = theViewWindow->getRenderer();
- vtkActorCollection* anActors = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActors = aCopy.GetActors();
return SVTK::Find<VISU_Actor>(anActors, VISU::TIsSamePrs3d(thePrs3d));
}
return NULL;
vtkRenderer* aRenderer = theViewWindow->getRenderer();
- vtkActorCollection* anActors = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActors = aCopy.GetActors();
return SVTK::Find<VISU_ActorBase>(anActors, VISU::TIsSameActor(theActor));
}
if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
VISU_Actor* anActor = NULL;
- vtkActorCollection *anActColl = vw->getRenderer()->GetActors();
+ VTK::ActorCollectionCopy aCopy(vw->getRenderer()->GetActors());
+ vtkActorCollection *anActColl = aCopy.GetActors();
anActColl->InitTraversal();
vtkActor *aVTKActor = anActColl->GetNextActor();
for (; !anActor && aVTKActor; aVTKActor = anActColl->GetNextActor()) {
#include "SVTK_ViewWindow.h"
#include "SVTK_ViewModel.h"
+#include "VTKViewer_Algorithm.h"
#include "SPlot2d_ViewModel.h"
#include "Plot2d_ViewFrame.h"
{
SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(myViewWindow);
vtkRenderer* aRenderer = aViewWindow->getRenderer();
- vtkActorCollection* anActors = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActors = aCopy.GetActors();
anActors->InitTraversal();
while (vtkActor *anAct = anActors->GetNextActor()) {
if (VISU_ActorBase* anActor = dynamic_cast<VISU_ActorBase*>(anAct)) {